DeprecatedThis package is deprecated
@inpyjamas/scripts
This is totally Work In Progress. Please ignore An opinionated toolkit for setting up projects. Inspired (and plugged a lot) from react-scripts and kcd-scripts
Todos/Ideas
- How to include scripts?
start(node dist/index.js),dev,build(tsc -p .setNODE_ENV),test(jestshould detect ci and generate coverage, setBABEL_ENVandNODE_ENV) - Document the existing configs
- How to update
package.jsonwith 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/typescriptjust@inpyjamas/scripts/eslint-typescriptor 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!
Installation
Add it to an existing project
npm install @inpyjamas/scripts --save-dev --save-exact
Init a new project. Not yet implemented
Most of the templates use @inpyjamas/scripts in one way or another
npm install --global yo
npm install --global @inpyjamas/generator-defaults
yo @inpyjamas/defaults
Usage
Included configs
Extending configs
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);
Release
npm version v0.1.x-alpha- git push --tags
- gh release create