Opinionated toolbox boilerplate to create Typescript React components
pnpm add ts-react-toolbox -D
After you have installed it, run this from the root of your package:
$ node_modules/.bin/ts-react-toolbox init
That will add all the boilerplate and scripts to your project
- Typescript โ
- React + ReactDom โ
- Webpack + WebpackDevServer โ
- Jest โ
- Examples โ
- StyledComponents boilerplate โ
- Travis config โ
- Static site generation with github pages โ
- Prettier โ
- ES5 support โ
- ES2015 support โ
- Git hooks โ
- Bundle size analyzer โ
__tests__
custom-typings
example
src
- init: Initializes project
- dev: webpack-dev-server
- test: jest + watch mode
- build: Typescript build
- release: build + run tests + version bump + publish to registry
- static: deploys example to github pages
- lint: TODO
- format: prettier
- analyze: webpack-bundle-analyzer
- package.json
"main": "dist/es5/index.js",
"jsnext:main": "dist/es2015/index.js",
"module": "dist/es2015/index.js",
"types": "dist/es5/index.d.ts"
Dan Abramov - The Melting Pot of JavaScript : https://www.youtube.com/watch?v=G39lKaONAlA
All the dependencies are bumped to the latest major version.
- migrate to ESLint / Prettier
- replace Enzyme for RTL