0.1.32 • Published 7 years ago
typescript-boilerplate-test v0.1.32
webpack-typescript-sass-app-boilerplate
Description
Boilerplate to kickstart development of a web app using Webpack, TypeScript and SASS.
How To
Get Started
git clonethis repository.- Delete the resulting .git folder and run
git initto start with a fresh commit history.
- Delete the resulting .git folder and run
- Delete the contents of CHANGELOG.md and README.md.
- Update the fields in package.json with the relevant information (e.g.
name,description,version,license). - Update the
titleoption forHtmlWebpackPluginin webpack.config.js to be used in the generated dist/index.html file. - Replace src/assets/favicon.ico with something relevant to the new web app.
- Add your code to the src folder.
Install & Build
- Install dependencies using
yarn(recommended) ornpm install. - Run webpack using
yarn run buildornpm run buildfrom the command line.- This will output bundles to the dist folder.
Serve Using Express
- Optionally set the
PORTenvironment variable if you don't want to use the default port number3000. - Run
node serve.jsfrom the command line.
Enable Source Maps
- Set the
NODE_ENVenvironment variable todevelopmentand rebuild.
Disable auto-changelog
- Upon running
yarn versionornode version, the auto-changelog tool automatically updates CHANGELOG.md based on git tags and commit history. It requires the usage of semver version numbering. To disable this feature, remove theversionscript from package.json and optionally remove the node module itself as well.
Add Vendor Modules
- Include any third-party vendor modules in src/vendor.ts.
// Example src/vendor.ts
import '@angular/core';
import '@angular/common';
import '@angular/http';
import '@angular/router';
...Add Polyfills For Browser Support
- Include any polyfills in src/polyfills.ts for any functionality that browsers might not natively support yet.
Add Type Definitions
- Run
yarn add @types/<dependency_name> --devornpm install @types/<dependency_name> --save-devfrom the command line.