This boilerplate support both yarn and npm.
- The first step after you using this boilerplate, Please using "npm run install"/"yarn install".
- After you install all packages, you can using yarn start and go localhost:4001 / 0.0.0.0:4001 to view.
JEST and Enzyme have been set done for this boilerplate.
- When you want to create a test file for your components or containers, creating a test file named "*.test.js" is recomended.
- You can use npm run test or yarn test.
- We set the "esModuleInterop" in tsconfig.json, if you change it to false, all the import will need to change to "import * as LibName from 'Lib';", otherwise the unit test will be failed.
Some paths already set which including:
- API: path.resolve(__dirname, 'src/api/'),
- Assets: path.resolve(__dirname, 'src/assets/'),
- Components: path.resolve(__dirname, 'src/components/'),
- Containers: path.resolve(__dirname, 'src/containers/'),
- Pages: path.resolve(__dirname, 'src/pages/'),
- Theme: path.resolve(__dirname, 'src/theme/') ...
You can create some documents named them as above. and if you want to add absolute path please add in both webpack.config.js
and tsconfig.json
.
You can add any third part libs when you want. If you need any help please leave message on GitHub.