📦 Build modern ES6+ web applications with Typescript and (S)CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
src
static
.babelrc
.gitignore
README.md
package-lock.json
package.json
tsconfig.json
tslint.json
webpack.dev.js
webpack.prod.js

README.md

Typescript Starter


Build modern ES6+ web applications with Typescript and (S)CSS.

Files and folders

Path Description
src/* Place your Typescript, Javascript and (S)CSS files here
src/index.ts Entry file for compilation
static/* All files here will be copied to /dist/* on build, making it suitable for assets
public/index.html The file Webpack uses to build the final index.html

Alias

Use @/ as prefix for your imports to write paths relative to the src/ folder.

// Will import file at <PROJECT_ROOT>/src/style.scss
import '@/style.scss';

Project setup

Install dependencies.

$ npm install

Compiles and hot-reloads for development

Run development server with HMR support, available via http://localhost:8080.

$ npm run serve

Compiles and minifies for production

The minified files will be available in the /dist folder.

$ npm run build

Lints files

Write unified code by linting your files.

$ npm run lint

Dependecies

Dependency Purpose
@babel/core Babel core library
@babel/preset-env Add support for next generation of javascript
@babel/preset-typescript Add Typescript support
@babel/polyfill Add Promise support and more
babel-loader Use Babel with Webpack
babel-plugin-transform-class-properties Add support for class properties
clean-webpack-plugin Clear dist folder on build
copy-webpack-plugin Copy certain files on build
css-loader Use CSS files
friendly-errors-webpack-plugin Get improved error reporting in terminal
html-webpack-plugin Generate HTML web page on build
mini-css-extract-plugin Extract stylesheet to dedicated file
node-sass Add SCSS support
sass-loader Use SCSS with Webpack
style-loader Enable style HMR on development server
tslint Enable code linting
tslint-config-airbnb Used tslint config
tslint-loader Use tslint with Webpack
typescript Add Typescript support
webpack Transpile, pack and host code on build
webpack-cli Webpack CLI tools
webpack-dev-server Setup server for development