1.2.0 • Published 4 years ago
boilerplate-babel-webpack v1.2.0
boilerplate-babel-webpack
:fork_and_knife: Starter with Babel.js and Webpack
Features
- :white_check_mark: Webpack
v4.43.0
- :white_check_mark: Babel (Core)
v7.9.6
- :white_check_mark: Support syntax
ES2015+
- :white_check_mark: Static directory
dist/
- :white_check_mark: Development with
webpack-dev-server
- :white_check_mark: Hosting with
http-server
- :white_check_mark: Bundle file size analytics with
webpack-bundle-analyzer
- :white_check_mark: Two build strategies: dev (with source maps) & prod (compress file)
Getting started
You can start in two ways:
Use Git
mkdir PROJECT_NAME
cd $_ # Note: "$_" is last argument of previous command
git init # Note: branch "master" is created
git remote add boilerplate git@github.com:piecioshka/boilerplate-babel-webpack.git
git pull boilerplate master
git remote remove boilerplate
or ...
Use Zip
- Download package file: https://github.com/piecioshka/boilerplate-babel-webpack/archive/master.zip
- Extract it to your project directory.
How to build an application?
development
npm run build
production
npm run build:production
Open dist/
directory in browser by npm start
.
How to develop an application?
npm run dev # use webpack-dev-server
npm run watch # use webpack -w
Open dist/
directory in browser by npm start
.
Remove generated directory
If you would like to remove dist/
directory:
npm run clear
If you would like to remove node_modules/
and remove dist/
npm run clear:all
Count LOC (Lines of Code)
If you would like to know how many lines of code you write:
npm run count
Analysis of bundle file weight
If you would like to check how much a bundle file weight:
npm run build:development -- --env.addons bundleanalyzer
npm run build:production -- --env.addons bundleanalyzer
License
The MIT License @ 2017-2020