Timeline application to handle
I've created this starter very simple: only few lines of codes, just enough to illustrate the usage of react, redux, jest and storybook. All the tools around are configured and working. The goal here is simple: start immediately to code. No questions asked. Just coding.
Folder | Description |
---|---|
build/ |
The build result of your application. See npm run build bellow |
doc/ |
All generated documentations |
doc/jsdoc |
Documentation generated by JSDoc. See npm run doc . |
doc/storybook |
Documentation generated by storybook. See npm run doc . |
reports/ |
Contain all generated reports |
reports/analysis |
Reports generated by plato |
reports/coverage |
Coverage reports generated by Jest |
src/ |
Source of your application |
src/components |
React components and containers. See Usage with React - redux.js.org. |
src/containers |
React components and containers. See Usage with React - redux.js.org. |
src/redux |
Redux actions, action creators and reducers. See Ducs pattern. |
- Add Selenium for integration tests.
- Add a styleguide generator
git clone https://github.com/AbrahamTewa/starter.reactjs.git
cd starter.reactjs
npm install
During development:
npm run watch
To build for production mode:
npm run build
To serve the application (after build)
npm start
or you can launch the build/index.html
file in your browser.
Run a code analysis using Plato.
The output result is stored in the reports/analysis
directory.
Run the build of the application in production configuration.
The builder will create a new build/
folder in which the build will be added, along with source maps (js and css).
- Lint the repository a. eslint b. stylelint c. json-lint
- Clean the
build
folder - Copy
src/index.html
into thebuild
folder - Make the build : a. Generate CSS files from *.sass b. Minify CSS files (using clean-css) c. Generate js files using webpack and minify using uglify-es.
Build the documentation of the project :
To build individually each project, use on of the following:
npm run doc:jsdoc
npm run doc:storybook
Running all linters on the source files and the tooling files (e.g .babelrc
).
The linters are :
Start a simple express server to serve the HTML file.
Alias: npm run test
Execute all unit tests. Tests use jest and enzyme.
Like npm test
, but will also update jest snapshots.
The test-cov
will run tests and coverage.
Will run a webpack in watch mode to rebuild the app each time a file in the src
folder is updated.
The Hot Module Replacement (HMR) is enabled on javascript and sass files. Before each reloads, eslint and stylelint are runned.
Enable storybook development server. The server will watch file modifications and update in real time your
storybook using the Hot Module Replacement mechanism.
Storybook will be served on http://localhost:9001
.