【发布时间】:2015-04-08 20:22:57
【问题描述】:
我刚开始使用 Bolt.cm (CMS),它与 Foundation for frontend 一起提供。
我已经安装了 Node、NPM、Node-sass、Bower 和 Grund,并在主题目录中启动了“grunt watch”。
Grunt 正在运行(“等待”),当我在 scss 文件夹中编辑一个文件(当然是来自主题的文件,而不是来自 bower_components,我知道我不应该编辑它们)任务成功执行:
运行“sass:dist”(sass)任务。
文件“css/foundation.css”已创建。
完成,没有错误。
主题和版本:
- 我复制了这个主题在本地修改:https://github.com/bolt/base-2014
- Grunt 版本是 grunt-cli v0.1.13
- NPM 版本 1.3.10
- 凉亭版本 1.4.1
问题
当我打开 css/foundation.css 时,该文件不包含 CSS 代码,而只有 [object Object] 作为文本。
这是我运行grunt --verbose时的输出:
grunt --verbose
Initializing
Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK
Registering "grunt-sass" local Npm module tasks.
Reading /var/www/bolt/theme/avoe/node_modules/grunt-sass/package.json...OK
Parsing /var/www/bolt/theme/avoe/node_modules/grunt-sass/package.json...OK
Loading "sass.js" tasks...OK
+ sass
Registering "grunt-contrib-watch" local Npm module tasks.
Reading /var/www/bolt/theme/avoe/node_modules/grunt-contrib-watch/package.json...OK
Parsing /var/www/bolt/theme/avoe/node_modules/grunt-contrib-watch/package.json...OK
Loading "watch.js" tasks...OK
+ watch
Loading "Gruntfile.js" tasks...OK
+ build, default
No tasks specified, running default tasks.
Running tasks: default
Running "default" task
Running "build" task
Running "sass" task
Running "sass:dist" (sass) task
Verifying property sass.dist exists in config...OK
Files: scss/foundation.scss -> css/foundation.css
Options: includePaths=["bower_components/foundation/scss"], outputStyle="compressed", sourceComments="none"
Writing css/foundation.css...OK
File "css/foundation.css" created.
【问题讨论】:
标签: gruntjs zurb-foundation grunt-contrib-watch