fis.set('project.exclude', ['**.svn', '**.git', 'sass/**/*.scss', 'Gruntfile.js', 'package.json', 'docs/**', '**.cmd', '**.sh', 'bin/**', 'tpl/**.tmpl']); fis.set('project.ignore', ['**.cmd', '**.sh', 'fis3-conf.js', 'fis-conf.js', 'js/libs/treeTable/**']); /*设置编译范围*/ fis.set('project.files', ['src/**']); /*设置发布路径*/ fis.match(/^\/src\/(.*)/i, { release: '/$1', url: '/$1' }); // 启用 fis-spriter-csssprites 插件 fis.match('::package', { spriter: fis.plugin('csssprites-ouj', { scale : 0.5, rem : 20, margin: 10 }) }).match('*.scss', { rExt: '.css', parser: fis.plugin('node-sass') // parser: fis.plugin('sass') //旧版 }).match('*.tmpl', { isJsLike: true, parser: fis.plugin('utc') }).match('*.png', { // fis-optimizer-png-compressor 插件进行压缩,已内置 optimizer: fis.plugin('png-compressor', { // pngcrush or pngquant, default is pngcrush type : 'pngcrush' }) }).match('*.{js,tmpl,tpl,html}', { postprocessor: fis.plugin('require-async') }).match('*.js', { postprocessor: fis.plugin('jswrapper') }).match(/^\/sass\/((.*)\.(css|less|scss|sass))$/i, { useSprite: true, postprocessor: fis.plugin('autoprefixer', { browsers: ['> 1%', 'last 2 versions'], cascade: true }), url: '/css/$1', release: '/css/$1' }).match(/^\/sass\/(.*\.(png|jpg|gif|jpeg))$/i, { release: 'img/sprite/$1', url: 'img/sprite/$1' }).match('_*.scss', { release: false }) fis.media('dev').match('*.js', { useHash: false, optimizer: null }); var domain = "http://assets.dwstatic.com/"; var path = "special/s7talent/"; var version = "1.0.0"; fis.media('prod').match('*.{scss,css}', { useHash: true, optimizer: fis.plugin('clean-css') }).match('*.{jpg,png,jpeg,gif,css,scss,js}', { domain: domain + path + version, });