WhiteStorm TypeScript Boilerplate is a starter kit for crafting 3D applications using modern technologies:
This starter kit also uses the following libraries and tools:
- React DOM for views.
- React Router to handle in-app routing.
- React-Redux to use React-Redux bindings.
- React-Router-Redux to keep application state sync with route changes.
- Redux Thunk for dispatching async actions.
- Redux Connect for resolving async props in react-router.
- React Helmet
- classnames
- Webpack for bundling.
- Awesome TypeScript Loader as ts loader.
- Babel Loader as js loader.
- React Hot Loader for providing hot reload capability to our development server
- Style Loader
- CSS Loader
- PostCSS Loader
- JSON Loader
- File Loader
- URL Loader
- Sourcemap Loader
- Manifest Plugin
- Extract Text Plugin for exporting bundled css.
- tslint Loader for using tslint as preloader on build process.
- stylelint Loader for using stylelint as preloader on build process.
- Webpack Dev Server
- Express for running server both on client and server side.
- Compression for gzip compression
- Serve Favicon for serving favicon.
- Typings for installing type definitions of external libraries.
- tslint for linting TypeScript files.
- stylelint for linting styles.
- Redux Logger
- Redux DevTools
- Chalk for colored terminal logs.
- Jest for unit testing.
- Fetch Mock for testing async actions.
- Redux Mock Store for creating mock stores.
.
βββ build # Built, ready to serve app.
βββ config # Root folder for configurations.
β βββ types # Global type definitions, written by us.
β βββ webpack # Webpack configurations.
β βββ main.ts # Generic App configurations.
βββ node_modules # Node Packages.
βββ src # Source code.
β βββ app # App folder.
β β βββ components # React Components.
β β βββ containers # React/Redux Containers.
β β βββ helpers # Helper Functions & Components.
β β βββ redux # Redux related code aka data layer of the app.
β β β βββ modules # Redux modules.
β β β βββ reducers.ts # Main reducers file to combine them.
β β β βββ store.ts # Redux store, contains global app state.
β β βββ routes.tsx # Routes.
β βββ client.tsx # Entry point for client side rendering.
β βββ index.html # root page template
β βββ server.tsx # Entry point for server of static content.
βββ typings # Type definitions installed with typings.
βββ .gitignore # Tells git which files to ignore.
βββ .stylelintrc # Configures stylelint.
βββ Dockerfile # Dockerfile.
βββ favicon.ico # Favicon.
βββ package.json # Package configuration.
βββ README.md # This file
βββ tsconfig.json # TypeScript transpiler configuration.
βββ tslint.json # Configures tslint.
βββ typings.json # Typings package configuration.
You can clone from this repository or install the latest version as a zip file.
$ git clone https://github.com/whitestormJS/whitestorm-typescript-boilerplate
$ cd whitestorm-typescript-boilerplate
$ npm install
All commands defaults to development environment. You can set NODE_ENV
to production
or use the shortcuts below.
# Running
$ npm start # This starts the app in development mode
# Starting it with the production build
$ NODE_ENV=production npm start # or
$ npm run start:prod
# Building
$ npm build # This builds the app in development mode
# Commands below builds the production build
$ NODE_ENV=production npm build # or
$ npm run build:prod
# Testing
$ npm test
# If you want install additional libraries, you can also install their typings from DefinitelyTyped
$ typings install dt~<package> --global --save
# or if it's located on npm
$ typings install <package> --save-dev