目前,我有app/styles/main.scss,我的sass被分解成多个结构化文件并导入到main.scss中。在我的index.html中,我有以下内容:
<!-- build:css styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->我正在使用我在Gruntfile.js中看到的grunt-contrib sass指南针,现在我想另外编译一个文件,即app/styles/modules/_infowindow.scss
我尝试过以下几种方法:
sass: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/styles/modules',
src: ['_infowindow.scss'],
dest: '.tmp/cdn/'
}]
}
},终端输出如下:
Running "sass:dist" (sass) task
Verifying property sass.dist exists in config...OK
Files: app/styles/modules/_infowindow.scss -> .tmp/cdn/_infowindow.css
Options: (none)但是当我检查.tmp的目录时,没有cdn的目录。
其他:
这是我当前的指南针设置;
// Compiles Sass to CSS and generates necessary files if requested
compass: {
options: {
sassDir: '<%= yeoman.app %>/styles',
cssDir: '.tmp/styles',
generatedImagesDir: '.tmp/images/generated',
imagesDir: '<%= yeoman.app %>/images',
javascriptsDir: '<%= yeoman.app %>/scripts',
fontsDir: '<%= yeoman.app %>/fonts',
importPath: './bower_components',
httpImagesPath: '/images',
httpGeneratedImagesPath: '/images/generated',
httpFontsPath: '/fonts',
relativeAssets: false,
assetCacheBuster: false,
raw: 'Sass::Script::Number.precision = 10\n'
},
dist: {
options: {
generatedImagesDir: '<%= yeoman.dist %>/images/generated'
}
},
server: {
options: {
sourcemap: true
}
}
}https://stackoverflow.com/questions/41352431
复制相似问题