-
-
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
1 parent
4086ca2
commit cfe4d1c
Showing
14 changed files
with
8,147 additions
and
4,782 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/** | ||
* Cz-customizable config.. | ||
* | ||
* @description Cz-customizable config. | ||
* @see https://github.com/leoforfree/cz-customizable | ||
*/ | ||
|
||
module.exports = { | ||
types : [ | ||
{ | ||
value : ':sparkles: feat', | ||
name : '✨ feat:\tAdding a new feature', | ||
}, | ||
{ | ||
value : ':bug: fix', | ||
name : '🐛 fix:\tFixing a bug', | ||
}, | ||
{ | ||
value : ':memo: docs', | ||
name : '📝 docs:\tAdd or update documentation', | ||
}, | ||
{ | ||
value : ':lipstick: style', | ||
name : '💄 style:\tAdd or update styles, ui or ux', | ||
}, | ||
{ | ||
value : ':recycle: refactor', | ||
name : '♻️ refactor:\tCode change that neither fixes a bug nor adds a feature', | ||
}, | ||
{ | ||
value : ':zap: perf', | ||
name : '⚡️ perf:\tCode change that improves performance', | ||
}, | ||
{ | ||
value : ':white_check_mark: test', | ||
name : '✅ test:\tAdding tests cases', | ||
}, | ||
{ | ||
value : ':truck: chore', | ||
name : '🚚 chore:\tChanges to the build process or auxiliary tools\n\t\tand libraries such as documentation generation', | ||
}, | ||
{ | ||
value : ':rewind: revert', | ||
name : '⏪️ revert:\tRevert to a commit', | ||
}, | ||
{ | ||
value : ':construction: wip', | ||
name : '🚧 wip:\tWork in progress', | ||
}, | ||
{ | ||
value : ':construction_worker: build', | ||
name : '👷 build:\tAdd or update regards to build process', | ||
}, | ||
{ | ||
value : ':green_heart: ci', | ||
name : '💚 ci:\tAdd or update regards to build process', | ||
}, | ||
], | ||
|
||
scopes : [ | ||
{ | ||
name : 'lib', | ||
}, | ||
{ | ||
name : 'all', | ||
}, | ||
], | ||
|
||
scopeOverrides : { | ||
fix : [ | ||
{ | ||
name : 'merge', | ||
}, | ||
{ | ||
name : 'style', | ||
}, | ||
{ | ||
name : 'test', | ||
}, | ||
{ | ||
name : 'hotfix', | ||
}, | ||
], | ||
}, | ||
|
||
allowCustomScopes : true, | ||
allowBreakingChanges : [ | ||
'feat', 'fix', | ||
], | ||
// skip any questions you want | ||
// skipQuestions: ['body'], | ||
subjectLimit : 100, | ||
} |
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,59 @@ | ||
/** | ||
* Change GH Data. | ||
* | ||
* @description Change GH Data. | ||
*/ | ||
const { exec } = require( 'child_process' ) | ||
const { promisify } = require( 'util' ) | ||
const { join } = require( 'path' ) | ||
const fs = require( 'fs' ) | ||
const execPromise = promisify( exec ) | ||
|
||
const tempFilePath = join( __dirname, 'topics.json' ); | ||
|
||
( async () => { | ||
|
||
try { | ||
|
||
const pkg = await require( '../package.json' ) | ||
pkg.keywords = Array.isArray( pkg.keywords ) ? pkg.keywords.slice( 0, 19 ) : [] | ||
|
||
const repoOwner = 'pigeonposse' | ||
const topicData = { | ||
names : pkg.keywords, | ||
} | ||
fs.writeFileSync( tempFilePath, JSON.stringify( topicData ) ) | ||
|
||
const cmds = [ | ||
`gh repo edit ${pkg.repository.url} -d "${pkg.description}" -h "${pkg.homepage}"`, | ||
`gh api -X PUT /repos/${repoOwner}/${pkg.name}/topics --input '${tempFilePath}'`, | ||
] | ||
|
||
for ( const cmd of cmds ) { | ||
|
||
try { | ||
|
||
const { stdout, stderr } = await execPromise( cmd ) | ||
if ( stderr ) throw Error( stderr ) | ||
console.log( `✅ Successfully exec "${cmd}".\n\tstdout: ${stdout || 'Nothing'}` ) | ||
|
||
} catch ( error ) { | ||
|
||
throw Error( `CMD "${cmd}":` + error.message ) | ||
|
||
} | ||
|
||
} | ||
|
||
} catch ( error ) { | ||
|
||
console.error( 'Error in gh update.', error ) | ||
process.exit() | ||
|
||
}finally{ | ||
|
||
fs.unlinkSync( tempFilePath ) | ||
|
||
} | ||
|
||
} )() |
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,9 @@ | ||
############################################################################### | ||
# COMMIT MESSAGE | ||
# | ||
# @description runs after creating the COMMIT message | ||
# @see https://typicode.github.io/husky/ | ||
# @see https://git-scm.com/docs/git-commit#_hooks | ||
############################################################################### | ||
|
||
pnpm commitlint --edit $1 |
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,13 @@ | ||
############################################################################### | ||
# PRE COMMIT | ||
# | ||
# @description runs before creating the COMMIT message | ||
# @see https://typicode.github.io/husky/ | ||
# @see https://git-scm.com/docs/git-commit#_hooks | ||
# @see https://www.npmjs.com/package/lint-staged | ||
############################################################################### | ||
|
||
# Run linters against staged git files and don't let 💩 slip into your code base! | ||
pnpm exec lint-staged | ||
|
||
# exec < /dev/tty && node_modules/.bin/cz --hook || true |
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,23 @@ | ||
# ############################################################################# | ||
# EditorConfig config. | ||
# ############################################################################# | ||
# | ||
# @description Used to maintain consistent code formatting across different code editors and IDEs in a software project. | ||
# @see https://EditorConfig.org | ||
# | ||
# ############################################################################# | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
# Matches multiple files with brace expansion notation | ||
# Set default charset | ||
[*.{js,cjs,mjs,ts,html,svelte}] | ||
charset = utf-8 |
Oops, something went wrong.