- How to include scripts?
start
(node dist/index.js
),dev
,build
(tsc -p .
setNODE_ENV
),test
(jest
should detect ci and generate coverage, setBABEL_ENV
andNODE_ENV
) - Document the existing configs
- How to update
package.json
with the right scripts? mrm? roll your own? - Add plop?
- Add modules in the root so we don't have to link to
@inpyjamas/scripts/dist/config/eslint/typescript
just@inpyjamas/scripts/eslint-typescript
or one module that exports all the configs{eslint-ts:{…}}
-
Scaffold configs for, prettier, lint-staged, jest, husky, .eslintignore orThis should be done by yo generator!
Add it to an existing project
npm install @inpyjamas/scripts --save-dev --save-exact
Init a new project.@inpyjamas/scripts
in one way or another
npm install --global yo
npm install --global @inpyjamas/generator-defaults
yo @inpyjamas/defaults
You can import any config and extend it.
// this is jest.config.js
const config = require("@inpyjamas/scripts/jest");
config.testPathIgnorePatterns.push("src/scripts/test.ts");
config.collectCoverageFrom.push("!src/scripts/test.ts");
module.exports = config;
The package contains a merge utility for merging more complex scenarios.
// this is jest.config.js
const config = require("@inpyjamas/scripts/jest");
const { merge } = require("@inpyjamas/scripts/utilities");
const localConfig = {
testEnvironment: "jsdom",
coverageThreshold: {
global: {
branches: 75,
functions: 75,
lines: 75,
statements: 75,
},
},
};
module.exports = merge(config, localConfig);
npm version v0.1.x-alpha
- git push --tags
- gh release create