@bengo.co/typescript-web-starter
v1.0.2
Published
A simple website project written in TypeScript. Use this as a starting point for your project.
Downloads
19
Readme
typescript-web-starter
A simple website project written in TypeScript. Use this as a starting point for your project.
Save yourself some time. Launch sooner.
Features
- React for view composition
- Material UI react components for common UI elements like buttons, grid, etc. Type-checked.
- client-side state management with Redux
- web server using koa
- server side rendering (SSR) - Faster apparent page loads + your website will load for end-users without JavaScript.
- Hot Module Replacement (HMR) - When running the web server with NODE_ENV=development, saving any file (e.g. a React Component) will instantly reload and re-render your app.
- Testing:
- Convention to be able to run any test file (or all) using ./src/test/cli. No magic tests runner CLIs
- Tests are type-checked, thanks to alsatian-test
- VS Code Project
- Debug projects in VS Code GUI with ts-node launcher
- prettier - standard code formatting
- tslint - Consistent coding practices, enforced.
Usage
- Fork or clone this repository.
npm install
- to download dependencies
- dev mode (HMR enabled):
npm run dev
- or
NODE_ENV=development npm start
- or
- build assets for production:
npm run build
- production mode
- first, compile JS to be loaded in the browser:
npm run build
npm start
- first, compile JS to be loaded in the browser:
- test:
npm test
- tslint:
npm run tslint
- prettier:
npm run prettier