Progressive frontend project template.
This is a fbi project template. If you haven't installed fbi yet, use the following command to install.
$ npm i -g fbi
oryarn global add fbi
fbi v3.0+
node v7.6+
- Support pure
HTML
and Handlebars template. - Support pure
CSS
and Sass-like PostCSS - Support
ES5
,ES2015
,ES2016
,ES2017
. Adds specific imports for polyfills automatically when they are used in each file. (polyfills will increase the file size, please use as appropriate.) see more - Support WebAssembly, Web Worker, Typescript
- Unlimited environment data.
- Http proxy.
- Paths mapping.
- Javascript linting and CSS linting.
- Minify.
- Highly configurable.
Create a project
$ cd path/to/workspace
$ fbi init https://github.com/fbi-templates/fbi-project-fullpack.git my-project
or
$ fbi add https://github.com/fbi-templates/fbi-project-fullpack.git
$ cd path/to/empty-folder
$ fbi init fullpack
Show available tasks
$ fbi ls
Run a task
$ fbi <task> [params]
- Description: Start development server.
- Params:
port
{Number}
Server starting port. If occupied, switch automatically.p
,prod
{Boolean}
Serve production dist folder.t
,test
{Boolean}
Serve test dist folder.
- Alias:
s
- Examples:
fbi s -port=9999
fbi s -t
fbi s -p
- Description: Build the project for the specified environment.
- Params:
p
,prod
{Boolean}
(default) Production environment.t
,test
{Boolean}
Test environment.d
,dev
{Boolean}
Development environment.
- Alias:
b
- Examples:
fbi b -t
fbi b -t=true
fbi b -test=true
fbi b --p
fbi b -d
- Description: Clean up destinations.
- Params: none
- Alias:
c
- Examples:
fbi c
fbi clean
How to change the build configuration?
- Initialize the options file to the project directory.
$ cd path/to/project
$ fbi init -o # or `--options`
- The options file will be located at
fbi/options.js
, includes instructions.
How to change the build logic?
- Initialize options file and tasks to the project directory.
$ cd path/to/project
$ fbi init -t # or `--tasks`
- Files will be located at
fbi
folder. Do what you want to do.
Where is the build dependencies?
Build dependencies are by default in fbi's store. You can use the following command to download to the project.
$ fbi init -a # or `--all`
Note: If local tasks or options exist, the original files will be backed up in
fbi-bak
folder.
Property | Description | Links |
---|---|---|
data | Environment data | source |
proxy | Http proxy | koa-proxies node-http-proxy |
mapping | Paths mapping | source |
server | Development Server config | source |
webpack | Webpack simple config | source |
lint | Code linting options | eslint-config-airbnb-base stylelint-config-standard |
minify | Minify options | html-minifier uglifyjs-webpack-plugin cssnano |
copy | Copy options | copy-webpack-plugin |
templates | Template engine name | source |
scripts | babel-loader options | babel-loader |
styles | PostCSS options | postcss-loader |
-
v3.1.2 (2018.06.26)
- Add Page Index when serving static
- Add
tslint
- Remove
webpack-stylish
plugin - Update
html-inline-webpack-plugin
- Replace
eslint-config-airbnb
witheslint-config-standard
-
v3.1.1 (2018.06.14)
- Add 'typescript' option for enable or turn off typescript support
- Remove
webpack.NamedModulesPlugin
on production mode
-
v3 (2018.06.08)
- Update dependencies.
- Using
webpack 4
now. - Added support for 'web worker', WebAssembly, Typescript.
-
v2.1.5 (2018.01.26)
- BugFixes: ES6 compilation failed(babel-loader options include)
-
v2.1.0 (2017.12.10)
- Refactor: building logic, project structure.
-
v2.0.3 (2017.12.09)
- Compatible
webpack.commons
with old version
- Compatible
-
v2.0.2 (2017.12.09)
- Update package info. Add
.editorconfig
previously.
- Update package info. Add
-
v2.0.0 (2017.12.09)
- initialization