Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
//需求场景示例,FIS 纯前端项目,不使用前端模板,通过inline共用同样的头部区块,但希望构建后动态替换里面的各个页面title等 | |
//注意如果已经有使用prepckager处理器,按先后顺序添加到数组中 | |
fis.config.merge({ | |
modules: { | |
prepackager: [function(ret, conf, settings, opt){ | |
//需要替换的字符串,支持正则。 | |
//配置方式字符串|处理 | |
var settings = { | |
'/a.html': { | |
'#TITLE#': 'page a' |
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.