Development tools for sifrr packages, webapps
| Type | Size |
|---|---|
Normal (dist/sifrr.dev.cjs.js) |
getRollupConfigRollup configs to bundle JavaScript/TypeScript for node packages, es modules and browser packs. Supports node syntax as well as es module syntax, and TypeScript.generateChangelogGenerate Changelog during releaseloadDirLoad directory recursivelyeslintrcESLint config and prettierdeepMergeDeep Merge ObjectscheckTagcheck if a tag exists on githubexecasync execute a shell command with stdout and stderrgitAddCommitPushrun command > git add files > git commit > git pushrunTestsRun a full fledged test suite using mocha, chai, sinon, puppeteer, etc. Supports node syntax as well as es module syntax.
- @commitlint/cli - Linting commits
- Husky - Git hooks made easy
- browserslist - browserlist used by babel, eslint, postcss, etc.
- coveralls - upload coverage to coveralls.io
- mock-require - Simple, intuitive mocking of Node.js modules.
Just add .huskyrc and you are good to go.
Add this to your eslintrc config
{
extends: ['sifrr']
}and add pre-commit hook in your .huskyrc
{
"hooks": {
"pre-commit": "yarn eslint --fix \"src/**/*.js\" && git add -A"
}
}sifrr eslint config extends prettier config and plugin, you can add prettier.config.js if you want to change default options for prettier.
add commit-msg hook in your .huskyrc
{
"hooks": {
"commit-msg": "yarn commitlint -e $HUSKY_GIT_PARAMS"
}
}
add commitlint.config.js to your root folder
module.exports = {
extends: ['@commitlint/config-conventional']
};set COVERALLS_REPO_TOKEN environment variable, run tests with lcov reporter, Upload with this command:
cat ./coverage/lcov.info | yarn coverallsAdd tihs to your .eslintrc.js
module.exports = {
extends: ['@sifrr']
};Add prettier.config.js, and it will be picked by eslint. Add prettier extension in code editor you use for best use.