0.1.32 • Published 5 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 clone
this repository.- Delete the resulting .git folder and run
git init
to 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
title
option forHtmlWebpackPlugin
in 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 build
ornpm run build
from the command line.- This will output bundles to the dist folder.
Serve Using Express
- Optionally set the
PORT
environment variable if you don't want to use the default port number3000
. - Run
node serve.js
from the command line.
Enable Source Maps
- Set the
NODE_ENV
environment variable todevelopment
and rebuild.
Disable auto-changelog
- Upon running
yarn version
ornode 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 theversion
script 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> --dev
ornpm install @types/<dependency_name> --save-dev
from the command line.