@amjs/react-tools
v1.0.2
Published
Development tools for building and compiling your ReactJS application
Downloads
7
Readme
@amjs/react-tools
Provides development tools for ReactJS based projects with Webpack4 and JEST.
Installation
$ npm i --save @amjs/react-tools
Usage
Add following scripts to package.json
file:
{
"scripts": {
"dev": "NODE_ENV=development node node_modules/@amjs/react-tools/scripts/server.js",
"build": "NODE_ENV=production node node_modules/@amjs/react-tools/scripts/build.js",
"test": "NODE_ENV=test node node_modules/@amjs/react-tools/scripts/jest.js",
"format": "prettier --config node_modules/@amjs/react-tools/.prettierrc --write 'src/**/*.js'",
"lint:css": "sass-lint --config node_modules/@amjs/react-tools/.sass-lint.yml -v",
"lint:js": "eslint --fix --config node_modules/@amjs/react-tools/.eslintrc.yml --ext .js src __tests__",
"e2e": "node node_modules/@amjs/react-tools/scripts/e2e chrome && node node_modules/.bin/nightwatch"
}
}
Tools
@amjs/react-tools provides a set-up of tools to use in any ReactJS project.
Fetch mock for tests
Just add following line to test file:
import '%/tests/utils/fetch';