Skip to content

andreasonny83/angular2-sonny-webpack

Repository files navigation

Angular2 Sonny Webpack

angular2-logo

A Webpack starter kit for you Angular2+ progressive web app

Table of contents

Installation

Clone this repository

$ git clone https://github.com/andreasonny83/angular2-sonny-webpack.git

Change directory to our repo

$ cd angular2-sonny-webpack

Install the node dependencies

# You can either use npm with
$ npm install
# Or Yarn for a faster installation
$ yarn install

Usage

Development

$ npm start

To start the application and automatically recompile on file-changes.

Progressive WebApp

This boilerplate will help you create a progressive web app in line with the Google directives. The project contains an app manifest.json to add installable support. Also, a service-worker will automatically been generated after the build process to grant offline support to your app.

Build

To build a distribution version of your Angular2 app, run:

$ npm run build

This will generate a clean new dist folder containing your production-ready app. A service worker will also being created in your distribution folder using the sw-precache node package.

Test the distribution version

To serve your generated distribution version of the app, run:

$ npm run server:prod

This will open your distribution version of the app inside your browser. From here you may also being able to test the offline support.

Contributing

  1. Fork and clone it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a Pull Request

Changelog

Changelog available here

License

MIT License © Andrea SonnY