Lighter & No complex config Starter
- TypeScript
- React
- Mobx
- Koa
- Webpack
yarn install
npm run dll # only once
npm run build
npm run server
-
lint
npm run lint.client && npm run lint.nodejs
- pre-commit quality works, here is a sample
#!/bin/sh function check_result { if [ $? -ne 0 ]; then exit 1 fi } echo "\033[32mlint ...\033[0m"; npm run lint.nodejs && npm run test; check_result
-
console
console.warn
as debug infoconsole.info
as logs
-
throw
- just ignore, like
try { JSON.parse(data) } catch(e) {}
- continue throw, like
try { await getUserId() } catch(e) { throw e }
- report to errors handle platform, like
sentry
- just ignore, like
-
DO NOT USE
console.log
console.error
(better is throw a erroreval
https://github.com/dengwanc/dengwanc.github.io/issues/20
- P0 unit test history router
- P0 css solution
- P1 webpack production config
- P1 load ${business}.file advance
- P2 server rendering
P0 publish blog as readMe prototypeP2 open controled browser instanceP0 add npm run test precommitP0 e2e test frameworkP0 e2e test --watch optionsP0 generate unit test entry fileP0 History RouterP0 tslintp0 nodejs simple test framework