项目作者: martincleto

项目描述 :
Webpack 2 + ES6 boilerplate
高级语言: JavaScript
项目地址: git://github.com/martincleto/webpack2-es6.git
创建时间: 2017-01-12T15:27:36Z
项目社区:https://github.com/martincleto/webpack2-es6

开源协议:GNU General Public License v3.0

下载


webpack2-es6

Webpack 2 + ES6 boilerplate (currently WIP)

Requisites

  • node.js v6 or higher
  • npm v3 or higher

Installation

  • $ git clone git@github.com:martincleto/webpack2-es6.git
    or alternatively $ git clone https://github.com/martincleto/webpack2-es6.git
  • Into the folder you have downloaded this repository in your file system, run $ npm install
  • To run the tests, type $ npm test

Usage

  • $ npm start creates a development build and starts a web server at http://localhost:8080
  • $ npm run build generates a production build
  • $ npm run watch watches the updates on your project files

Notes for developers

SASS libraries

This boilerplate comes with Bourbon library for convenient SASS development.

If you want to use other SASS libraries (or no libraries at all) just follow these steps

PostCSS

This boilerplate includes PostCSS via Webpack postcss-loader for enabling autoprefixer plugin.

If you want to add or remove PostCSS plugins you need to update the postcss section into package.json

Profiling and analyzing the bundle

In order to improve and lint your bundle, you might want to inspect and analyze it. A bundle-stats npm script is available for this purpose.

  • Create a new folder stats into your project root folder: $ mkdir stats
  • $ npm run bundle-stats: a webpack-bundle-stats.json file will be created into stats/ folder
  • Browse https://webpack.github.io/analyse and upload the JSON file. A comprehensive profiling UI will be loaded based on you bundle stats.

Edit package.json to change path and JSON file name at your convenience.

To do