-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
c5a7bb7
commit 38e988f
Showing
27 changed files
with
1,051 additions
and
618 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,10 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'scope-enum': [ | ||
2, | ||
'always', | ||
['', 'docs', 'example', 'release', 'wallet'], | ||
], | ||
}, | ||
}; |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx commitlint --config ./.commitlintrc.cjs --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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,17 @@ | ||
/** | ||
* Thanks: https://github.com/vitebook/vitebook/tree/main/.scripts | ||
*/ | ||
|
||
if (!/pnpm/.test(process.env.npm_execpath || '')) { | ||
console.warn( | ||
`\n⚠️ \u001b[33mThis repository requires using PNPM as the package manager ` + | ||
` for scripts to work properly.\u001b[39m` + | ||
'\n\n1. Install Volta to automatically manage it by running: \x1b[1mcurl https://get.volta.sh | bash\x1b[0m', | ||
'\n2. Install PNPM by running: \x1b[1mvolta install pnpm@6\x1b[0m', | ||
"\n3. Done! Run `pnpm` commands as usual and it'll just work :)", | ||
'\n\nSee \x1b[1mhttps://volta.sh\x1b[0m for more information.', | ||
'\n', | ||
); | ||
|
||
process.exit(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,31 @@ | ||
/** | ||
* Thanks: https://github.com/vitebook/vitebook/tree/main/.scripts | ||
*/ | ||
|
||
import { exec } from 'child_process'; | ||
import { promisify } from 'util'; | ||
|
||
async function main() { | ||
const nodeV = await promisify(exec)('node -v'); | ||
const nodeVersion = parseInt(nodeV.stdout.slice(1).split('.')[0]); | ||
|
||
if (nodeVersion < 16) { | ||
console.warn( | ||
'\n', | ||
`⚠️ \u001b[33mThis package requires your Node.js version to be \`>=16\`` + | ||
` to work properly.\u001b[39m`, | ||
'\n\n1. Install Volta to automatically manage it by running: \x1b[1mcurl https://get.volta.sh | bash\x1b[0m', | ||
'\n2. Install Node.js by running: \x1b[1mvolta install node@16\x1b[0m', | ||
"\n3. Done! Run `npm` commands as usual and it'll just work :)", | ||
'\n\nSee \x1b[1mhttps://volta.sh\x1b[0m for more information.', | ||
'\n', | ||
); | ||
|
||
process.exit(1); | ||
} | ||
} | ||
|
||
main().catch((err) => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.