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 fbioryarn global add fbi
fbi v3.0+node v7.6+
- Support pure
HTMLand Handlebars template. - Support pure
CSSand 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-projector
$ fbi add https://github.com/fbi-templates/fbi-project-fullpack.git
$ cd path/to/empty-folder
$ fbi init fullpackShow available tasks
$ fbi lsRun 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=9999fbi s -tfbi 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 -tfbi b -t=truefbi b -test=truefbi b --pfbi b -d
- Description: Clean up destinations.
- Params: none
- Alias:
c - Examples:
fbi cfbi 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
fbifolder. 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-bakfolder.
| 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-stylishplugin - Update
html-inline-webpack-plugin - Replace
eslint-config-airbnbwitheslint-config-standard
-
v3.1.1 (2018.06.14)
- Add 'typescript' option for enable or turn off typescript support
- Remove
webpack.NamedModulesPluginon production mode
-
v3 (2018.06.08)
- Update dependencies.
- Using
webpack 4now. - 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.commonswith old version
- Compatible
-
v2.0.2 (2017.12.09)
- Update package info. Add
.editorconfigpreviously.
- Update package info. Add
-
v2.0.0 (2017.12.09)
- initialization