Whi*_*her 7 gruntjs mean-stack mean.io
我想使用源更少的bootstrap文件构建我自己编译的css文件在我的项目中我使用的是mean.io堆栈.
如何在平均堆栈中集成更少?
我发现那里有很多工具
https://www.npmjs.org/package/grunt-bootstrap
https://github.com/sindresorhus/grunt-recess
https://github.com/gruntjs/grunt-contrib-less
所以我有点困惑^^
我也很满意一些教程
我最终使用了grunt-contrib-less
手动复制文件
/less/bootstrap.less /less/variables.less
在我的src文件夹中,即src/less
而不是我的grunt文件
less: {
bootstrap: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>.css.map',
sourceMapFilename: '<%= distdir %>/css/<%= pkg.name %>.css.map'
},
files: {
'<%= distdir %>/css/<%= pkg.name %>.css': '<%= src.src %>/less/bootstrap.less'
}
}
}
Run Code Online (Sandbox Code Playgroud)
在我的变数中.我能做到
//** Background color for `<body>`.
@body-bg: #F70E29;
//** Global text color on `<body>`.
@text-color: #F70E29;
Run Code Online (Sandbox Code Playgroud)
而且我有最酷的bg身体颜色:)
归档时间: |
|
查看次数: |
1255 次 |
最近记录: |