首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grunt+Foundation: css/foundation.css创建,内容[对象]

Grunt+Foundation: css/foundation.css创建,内容[对象]
EN

Stack Overflow用户
提问于 2015-04-08 20:22:57
回答 1查看 196关注 0票数 1

我刚开始使用Bolt.cm (CMS),这是与前端基金会一起提供的。

我安装了Node,NPM,Node-sass,Bower和Grund,并在主题目录中启动了一个“咕噜表”。

Grunt正在运行(“等待”),当我在scss文件夹中编辑一个文件(当然是来自主题的文件,而不是来自bower_components的文件,我知道我不应该编辑它们),任务就成功地执行了:

运行"sass:dist“(sass)任务。 文件“css/oundation.css”创建。 完成了,没有错误。

主题和版本:

问题

当我打开CSS /oundation.css时,文件不包含CSS代码,而只包含[object Object]作为文本。

这是我运行grunt --verbose时的输出

代码语言:javascript
复制
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.
EN

回答 1

Stack Overflow用户

发布于 2015-04-14 15:04:17

通过进入node_modules文件夹,删除和重新安装grunt-sass和node,我成功地解决了这个问题:

rm -rf node-sass rm -rf grunt-sass npm install node-sass npm install grunt-sass

重新安装的grunt sass更新了我的基础-libsass模板回购,这是我认为的问题所在。

它可能是你甚至不需要触摸节点-sass,所以也许先给咕噜-sass一步。

希望这能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29524642

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档