Opinionated toolbox boilerplate to create Typescript React components, based on ts-react-toolbox
yarn add --dev @theuiteam/lib-builder
After you have installed it, run this from the root of your package:
$ node_modules/.bin/lib-builder init
That will add all the boilerplate and scripts to your project
- Typescript ✅
- React + ReactDom ✅
- Webpack + WebpackDevServer ✅
- Jest ✅
- Travis config ✅
- TSLint ✅
- Prettier ✅
- ES5 support ✅
- ES2015 support ✅
- Git hooks ✅
- Bundle size analyzer ✅
__tests__
example
src
-
init: Initializes project
-
test: jest + watch mode
-
build: Typescript build
-
docz:dev Dev mode
-
release: build + run tests + version bump + publish to registry
-
static: deploys example to github pages
-
lint: tslint
-
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