@shanedg/trshcmpctr v1.0.0
trshcmpctr
"all build config, no substance"
Install
Prefer to install from the lockfile.
npm ciBuild
Build the project in development mode.
npm run buildBuild the project with production optimizations applied.
npm run build:productionStart
Start webpack-dev-server to serve the project, in-memory.
Launch project in browser.
Watch files, rebuilding and reloading incremental changes.
npm startWatch
Build the project in development mode and watch files, rebuilding incremental changes.
npm run watchLint
Lint JavaScript files with ESLint.
npm run lintA Note on Choice of ESLint Parser
This project compiles TypeScript with Babel, not the TypeScript compiler.
Babel discards all type information during transpilation but supports a wider range of syntax than the TypeScript compiler.
For this reason, we use the babel-eslint parser instead of the parser provided by @typescript-eslint.
For more context, see What about Babel and babel-eslint:
The key trade-off can be summarized as:
babel-eslintsupports additional syntax which TypeScript itself does not, buttypescript-eslintsupports creating rules based on type information, which is not available to Babel because there is no type-checker.
Test
Run Jest tests.
npm run testType Check
This project compiles TypeScript with Babel, not the TypeScript compiler. For additional context, see the note on choice of ESLint parser above.
Run tsc against the project's TS files to catch type errors.
npm run type-checkTODO
- Add styles, CSS and some preprocessor
- Add linting for styles
- Add auto versioning via conventional commits
- Also publishing for fun? via Github actions maybe?
- React strict mode
- Acceptance tests
- E2E tests
6 years ago