-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
配置报错 #29
Comments
看看你的配置。 |
//排除非项目文件
fis.config.set('project.exclude', [
"output/**",
'README.md',
/\.(sh)$/i,
'node_modules/**',
'bower_components/**'
]);
//排除不监听的文件
fis.config.set('project.watch.exclude', [
"output",
'README.md',
/\.(scss|sh)$/i,
'node_modules',
'bower_components',
'scss'
]);
fis.config.set('pack', {
'pkg/lib.js': [
'/modules/jquery/**.js'
]
});
//静态资源域名,使用pure release命令时,添加--domains或-D参数即可生效
//fis.config.set('roadmap.domain', 'http://127.0.0.1:8080');
//如果要兼容低版本ie显示透明png图片,请使用pngquant作为图片压缩器,
//否则png图片透明部分在ie下会显示灰色背景
//使用spmx release命令时,添加--optimize或-o参数即可生效
fis.config.set('settings.optimzier.png-compressor.type', 'pngquant');
//设置jshint插件要排除检查的文件,默认不检查lib、jquery、backbone、underscore等文件
//使用pure release命令时,添加--lint或-l参数即可生效
fis.config.set('settings.lint.jshint.ignored', [ 'lib/**', /jquery/i ]);
//csssprite处理时图片之间的边距,默认是3px
fis.config.set('settings.spriter.csssprites.margin', 20);
//开启autoCombine可以将零散资源进行自动打包
fis.config.set('settings.postpackager.simple.autoCombine', true);
fis.config.merge('modules.parser', {
sass : 'sass',
scss: 'sass'
});
fis.config.merge('roadmap.ext', {
sass: 'css',
scss: 'css'
});
fis.config.set('settings.parser.sass', {
// 加入文件查找目录
include_paths: [
'scss',
'pages',
'modules'
]
}); |
fis.config.merge 与set不同,后面接的是object,所以这样配置是错误的。正确的写法应该是: fis.config.merge({
modules : {
parser : {
sass : 'sass',
scss : 'sass'
}
},
roadmap : {
ext : {
sass : 'css',
scss : 'css'
}
}
}) 另外FIS2中roadmap覆盖原有的path配置时需要注意写法,具体参考文档 http://fex-team.github.io/fis-site/docs/advance/roadmap.html FIS3 在配置易用性有了很大的提升,可以了解下 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提醒
用的pure的解决方案,不知道跟具体方案有没有关系
The text was updated successfully, but these errors were encountered: