Skip to content

Commit

Permalink
build(package): add doctoc to npm format script
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Oct 20, 2022
1 parent fa4f9ee commit 112d42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"__test:repeat:all": "echo 'Repeating test suite [initializing]...'; (i=0; while [ \"$((( i += 1 ) <= 100 ))\" -ne 0 ]; do sleep 0.1 && echo \"\\r\\033[1A\\033[0KRepeating test suite [run $i/100]...\" && JEST_SILENT_REPORTER_SHOW_WARNINGS=true NODE_ENV=test jest --reporters=jest-silent-reporter || exit; done) && echo \"All tests passed! Congrats!\"",
"__test:repeat:unit": "echo 'Repeating test suite [initializing]...'; (i=0; while [ \"$((( i += 1 ) <= 100 ))\" -ne 0 ]; do sleep 0.1 && echo \"\\r\\033[1A\\033[0KRepeating test suite [run $i/100]...\" && JEST_SILENT_REPORTER_SHOW_WARNINGS=true NODE_ENV=test jest --reporters=jest-silent-reporter --testPathIgnorePatterns test/integration-*.test.ts dist || exit; done) && echo \"All tests passed! Congrats!\"",
"clean": "git ls-files --exclude-standard --ignored --others --directory | grep -vE '^((\\.(env|vscode|husky))|next-env\\.d\\.ts|node_modules)($|\\/)' | xargs -p rm -rf",
"format": "sort-package-json && MD_FILES=`find . -type f -iname '*.md' -not \\( -path '*/node_modules/*' -prune \\) -not \\( -path './.git/*' -prune \\) -exec bash -c '! git -c core.excludesFile=.prettierignore check-ignore -q {}' \\; -print` && echo $MD_FILES | xargs doctoc --no-title --maxlevel 3 --update-only && echo $MD_FILES | NODE_ENV=format xargs remark --output --frail && echo $MD_FILES | xargs prettier --write && if [ -z \"$ALLOW_DISABLED_LINKS\" ] && grep -qR --exclude-dir=node_modules --include='*.md' '\\\\\\[[^\\]*\\]\\\\' .; then echo '---\nWARNING: disabled links were found in the following files:'; grep -R --color=always --exclude-dir=node_modules --include='*.md' '\\\\\\[[^\\]*\\]\\\\' .; echo '(to ignore this error, run this command again with ALLOW_DISABLED_LINKS=1)'; exit 1; fi",
"format": "sort-package-json && MD_FILES=$(node -e 'console.log(require(`glob-gitignore`).sync(`**/*.md`, { ignore: require(`fs`).readFileSync(`.prettierignore`, `utf8`).split(`\n`).filter(Boolean), dot: true }).join(`\n`))') && echo $MD_FILES | xargs doctoc --no-title --maxlevel 3 --update-only && echo $MD_FILES | NODE_ENV=format xargs remark --output --frail && echo $MD_FILES | xargs prettier --write && if [ -z \"$ALLOW_DISABLED_LINKS\" ] && grep -qR --exclude-dir=node_modules --include='*.md' '\\\\\\[[^\\]*\\]\\\\' .; then echo '---\nWARNING: disabled links were found in the following files:'; grep -R --color=always --exclude-dir=node_modules --include='*.md' '\\\\\\[[^\\]*\\]\\\\' .; echo '(to ignore this error, run this command again with ALLOW_DISABLED_LINKS=1)'; exit 1; fi",
"lint": "stdbuf -i0 -o0 -e0 tsc --project tsconfig.lint.json; X=$?; stdbuf -i0 -o0 -e0 eslint --parser-options=project:tsconfig.lint.json packages; Y=$?; NODE_ENV=lint remark --quiet --no-stdout '{{,.}*.md,!(node_modules)/**/{,.}*.md,.*/**/{,.}*.md}'; Z=$?; [ $X -eq 0 ] && [ $Y -eq 0 ] && [ $Z -eq 0 ]",
"list-tasks": "node -e 'console.log(Object.keys(require(\"./package.json\").scripts).join(\"\\n\"))' && npm run -ws list-tasks --if-present",
"prepare": "if [ -z \"$CI\" ] && ([ -z \"$NODE_ENV\" ] || [ \"$NODE_ENV\" = \"development\" ]); then husky install; if [ -r .husky/post-checkout ]; then .husky/post-checkout; fi; else echo 'skipped installing husky git hooks'; fi",
Expand Down

0 comments on commit 112d42c

Please sign in to comment.