-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ángel Albiñana Espejo
authored and
Ángel Albiñana Espejo
committed
Aug 25, 2024
1 parent
3a5d806
commit 471b85c
Showing
362 changed files
with
19,898 additions
and
11,403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { nav } from './nav.mjs' | ||
import { sidebar } from './sidebar.mjs' | ||
|
||
export { | ||
nav, | ||
sidebar, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { joinPath } from '@clippo/config/core' | ||
|
||
import { | ||
extra, | ||
funding, | ||
} from '../../package.json' | ||
|
||
export const nav = [ | ||
{ | ||
text : 'Home', | ||
link : '/', | ||
}, | ||
{ | ||
text : 'Guide', | ||
link : joinPath( extra.docsPath.guide, 'index.md' ), | ||
}, | ||
{ | ||
text : 'Articles', | ||
link : joinPath( extra.docsPath.posts ), | ||
}, | ||
{ | ||
text : 'Donate', | ||
link : funding.url, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { | ||
joinPath, | ||
joinUrl, | ||
} from '@clippo/config/core' | ||
|
||
import { | ||
extra, | ||
bugs, | ||
repository, | ||
} from '../../package.json' | ||
import { getSidebarUtils } from '../typedoc/get-sidebar.mjs' | ||
|
||
const sidebarConstructor = [ | ||
{ | ||
text : 'Introduction', | ||
items : [ { | ||
text : 'What is CLIPPO?', | ||
link : joinPath( extra.docsPath.guide, '/' ), | ||
} ], | ||
}, | ||
{ | ||
text : 'Reference', | ||
items : [ | ||
{ | ||
text : '📚 Library', | ||
collapsed : true, | ||
items : [ { | ||
text : '🏁 Get started', | ||
link : joinPath( extra.docsPath.lib, 'index.md' ), | ||
} ], | ||
|
||
}, | ||
{ | ||
text : '🛠️ Utils', | ||
collapsed : true, | ||
items : await getSidebarUtils(), | ||
|
||
}, | ||
{ | ||
text : '🎉 Create (setup)', | ||
link : joinPath( extra.docsPath.create, 'index.md' ), | ||
}, | ||
{ | ||
text : '🖼️ Themes', | ||
link : joinPath( extra.docsPath.themes, 'index.md' ), | ||
}, | ||
], | ||
}, | ||
{ | ||
text : 'Contribute', | ||
items : [ { | ||
text : 'Report issues', | ||
link : bugs.url, | ||
}, { | ||
text : 'Todo', | ||
link : joinPath( extra.docsPath.todo, '/v1' ), | ||
} ], | ||
}, | ||
{ | ||
text : 'Articles, tutorials etc', | ||
link : joinPath( extra.docsPath.posts ), | ||
}, | ||
{ | ||
text : 'About', | ||
items : [ { | ||
text : 'License', | ||
link : joinUrl( repository.url, 'blob/main/LICENSE' ), | ||
}, { | ||
text : 'More projects', | ||
link : extra.collective.web, | ||
} ], | ||
}, | ||
] | ||
|
||
export const sidebar = { | ||
'/guide/' : sidebarConstructor, | ||
'/todo/' : sidebarConstructor, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/** | ||
* TODO prompt. | ||
* | ||
* @description Add prompt for edit project TODO List. | ||
*/ | ||
|
||
import { | ||
exec, | ||
execProcess, | ||
joinUrl, | ||
paths, | ||
prompt, | ||
readJSON, | ||
initCache, | ||
} from '@clippo/config/core' | ||
|
||
await execProcess( { | ||
name : 'PUSH REPO', | ||
on : async ( { log } ) => { | ||
|
||
const data = { | ||
update : 'update', | ||
add : 'add', | ||
origin : 'origin', | ||
workflow : 'workflow', | ||
} | ||
|
||
const cache = await initCache( { | ||
id : 'push', | ||
values : { | ||
[ data.update ] : false, | ||
[ data.add ] : '.', | ||
[ data.origin ] : 'main', | ||
[ data.workflow ] : false, | ||
}, | ||
} ) | ||
|
||
const getRepoUrl = async () => { | ||
|
||
const packageJsonPath = paths.workspacePkg | ||
const packageJson = await readJSON( packageJsonPath ) | ||
return joinUrl( packageJson.repository.url ) | ||
|
||
} | ||
const preAnswer = await prompt( [ { | ||
type : 'confirm', | ||
name : data.update, | ||
default : cache.get( data.update ), | ||
message : 'Do yo want update version?', | ||
} ] ) | ||
|
||
if( preAnswer.update ) await import( './update-version.mjs' ) | ||
|
||
const answers = await prompt( [ { | ||
type : 'input', | ||
name : data.add, | ||
default : cache.get( data.add ), | ||
message : 'Git add', | ||
}, { | ||
type : 'input', | ||
name : data.origin, | ||
default : cache.get( data.origin ), | ||
message : 'Add origin branch', | ||
} ] ) | ||
|
||
await exec( `git add ${answers.add} && pnpm cm && git push -f origin ${answers.origin}` ) | ||
|
||
log.success( `Successfully commit to ${await getRepoUrl()}\n` ) | ||
|
||
const answersAfter = await prompt( [ { | ||
type : 'confirm', | ||
name : data.workflow, | ||
default : cache.get( data.workflow ), | ||
message : 'Run workflow', | ||
} ] ) | ||
|
||
cache.set( answers ) | ||
if( answersAfter.workflow ) await import( './workflow.mjs' ) | ||
|
||
}, | ||
} ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { joinUrl } from '@clippo/config/core' | ||
|
||
export const info = pkg => `- [Documentation](${pkg.homepage}) | ||
- [Installation](${joinUrl( pkg.homepage, 'guide/getting-started#installation' )})` | ||
|
Oops, something went wrong.