Create a new project by cloning this repo.
src/components
contains all the componentssrc/context
contains all the context providerssrc/fonts
contains font filessrc/res
contains image filessrc/mocks
contains mock data for testingsrc/pages
contains all the pages for routingsrc/styles
contains global stylessrc/types
contains type definitionssrc/utils
contains utility functionssrc/index.tsx
is the entry point for the appsrc/index.html
is the HTML template for the app
Jest ignores assets and CSS files, hence to validate if correct assets and CSS are being imported, you will need to customize jest with your own loaders/presets.
@/
resolves tosrc/
@public/
resolves topublic/
(untested)
MyComponent/
MyComponent.module.css
is the component's stylesMyComponent.test.tsx
is the test fileindex.tsx
exports the component
- Cannot use utility classes in
className
prop of React components - Can use utility classes via
@apply
in CSS files
npm install
npm start
npm install
npm run test
You may build the app and serve it statically in say a python server
npm install
npm run build
python -m http.server --bind 127.0.0.1 -d dist 8080
You may build the app and serve it statically in say a python server
npm install
npm run dev
python -m http.server --bind 127.0.0.1 -d dist 8080