wfo-cli
v1.9.83
Published
front-end cli generator
Downloads
8
Maintainers
Readme
Webpack Front Office (wfo) cli generator
wfo-cli is a lightweight command line for generating webpack project for HTML + CSS and Javascript.
Installation
npm install -g wfo-cli
# Or
yarn global add wfo-cli
Usage
Generate
front new [name] [options]
Argument
- name: name of the directory which you want to generate project. Default: Current directory
Options
- --git-init [optional]: initialize project with git. Use this option if you don't have
.git
yet. - --using <template> (alias -u) [optional]: Generate the project and using css framework. Available template: bootstrap
Serve
npm start # the application is served on http://localhost:8080
# Or
front serve [options] <value>
Options
- --port (alias -p) [optional]: The port where the application is served. Default: 8080
- --host (alias -h) [optional]: The host where the application is served. Default: localhost
Build
npm run prod
# Or
npm run prod:abs # for absolute public path
# Or
front build [option]
Option
- --absolute (alias -a) [optional]: Set the publicPath into webpack config to absolute path.
- --wp-theme <theme_name> (alias -t): Set publicPath to wordpress theme path
(wp-content/themes/<theme_name>)
Features
- Lazy loading (Short Tuto)
- SCSS
- ES2015+
- Hot Module Replacement
- Live reload