我正在尝试将 sass 与 grunt 一起使用。我已经在我的路径中安装了 ruby、sass 和 grunt。
版本是,
节点:0.10.20
npm:11.3.1
grunt-cli:0.1.13
咕噜声:0.4.5
萨斯:3.4.4
我的包 json 是,
"private": true,
"devDependencies": {
"express": "4.x",
"grunt": "~0.4.1",
"grunt-contrib-sass": "~0.3.0",
"grunt-contrib-watch": "~0.4.4"
}
我的咕噜声文件是,
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'style/style.css' : 'sass/home.scss'
}
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['sass']
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}
现在,如果我尝试“grunt”命令,我会收到以下错误。有什么帮助吗?
运行:grunt 或 grunt watch 或 grunt sass
error:
Running "sass:dist" (sass) task
Error: Error generating source map: couldn't determine public URL for the source
stylesheet.
No filename is available so there's nothing for the source map to link
to.
on line of standard input
Use --trace for backtrace.
Warning: Error: Error generating source map: couldn't determine public URL for t
he source stylesheet.
No filename is available so there's nothing for the source map to link
to.
on line of standard input
Use --trace for backtrace. Use --force to continue.
Aborted due to warnings.
任何想法?