Skip to content

Instantly share code, notes, and snippets.

View yanhaijing's full-sized avatar
🏠
Working for jsmini.cc

颜海镜 yanhaijing

🏠
Working for jsmini.cc
View GitHub Profile
@zhangtao07
zhangtao07 / fis-conf.js
Last active December 30, 2015 03:30
FIS构建产出替换字符串
//需求场景示例,FIS 纯前端项目,不使用前端模板,通过inline共用同样的头部区块,但希望构建后动态替换里面的各个页面title等
//注意如果已经有使用prepckager处理器,按先后顺序添加到数组中
fis.config.merge({
modules: {
prepackager: [function(ret, conf, settings, opt){
//需要替换的字符串,支持正则。
//配置方式字符串|处理
var settings = {
'/a.html': {
'#TITLE#': 'page a'
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* 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'),
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.

Sass/Less Comparison

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.

Variables