@coderesque/resque-scripts-frontend v2.0.1
@coderesque/resque-scripts-frontend
Scripts for building and maintaining TypeScript-based React libraries
Install
yarn add --exact @coderesque/resque-scripts-frontendUsage
Add the following scripts to package.json.
{
"scripts": {
"prebuild": "resque-scripts-frontend test",
"build": "resque-scripts-frontend build",
"test": "resque-scripts-frontend test",
"css:lint": "resque-scripts-frontend css-lint",
"ts:check": "resque-scripts-frontend ts-check",
"ts:lint": "resque-scripts-frontend ts-lint",
"ts:test": "resque-scripts-frontend ts-test",
}
}Add a babel.config.json file in the same folder as package.json.
/* eslint-env node */
module.exports = require('@coderesque/babel-config-frontend');Add a tsconfig.json file in the same folder as package.json.
{
"extends": "@coderesque/typescript-config-frontend",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
}
}> resque-scripts-frontendTasks
Sequence tasks
These tasks will be run in silent mode, which means the output for each individual task will be minimal.
build
Run all necessary tasks to generate a fresh build in the dist folder.
empty-distts-compilefor development envts-compilefor production envts-declarationsgenerate-licensefilter-dist
test
Run all necessary tasks to test the quality of the project.
ts-checkts-lintts-testcss-lint
Simple tasks
empty-dist (alias: clean)
Empty the dist folder.
filter-dist
Remove unwanted test and source map files from the dist folder.
generate-license
Generate a project license in the dist folder.
css-lint
Lint SCSS source files using stylelint.
ts-check
Type-check TypeScript.
ts-compile
Compile TypeScript to JavaScript and put the output in the dist folder.
ts-declarations
Generate TypeScript declarations.
ts-lint
Lint source files using ESLint.
ts-test
Run tests using Jest.
Note
This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.
License
MIT