用凉亭安装奇点的正确方法?

时间:2014-03-06 09:08:49

标签: sass yeoman gulp yeoman-generator singularitygs

我在yeoman gulp-webapp项目中遇到了一些麻烦。首先,我用凉亭安装了奇点。

之后我有一个像这样的项目结构:

  My Projekt
    app
       bower_components
         compass_breakpoint
         sassy-maps 
         singularity
       styles
         main.scss

然后我将奇点导入我的 main.scss 文件,如下所示:

@import "../bower_components/singularity/stylesheets/singularitygs";

在_ singularity.scss 中,我将断点的导入路径更正为:

@import "../../compass-breakpoint/stylesheets/breakpoint";

如果我现在在终端中运行gulp,我会收到这个奇怪的错误:

[gulp] Error in plugin 'gulp-ruby-sass':
Syntax error: Invalid CSS after "...ntext holder') ": expected "}", was "!global;"
    on line 47 of  /Users/Shared/Dropbox/Server/htdocs/Frameworks/my-project/app/bower_components/compass-breakpoint/stylesheets/_breakpoint.scss
    from line 4 of /Users/Shared/Dropbox/Server/htdocs/Frameworks/my-project/app/bower_components/singularity/stylesheets/_singularitygs.scss
    from line 1 of /Users/Shared/Dropbox/Server/htdocs/Frameworks/my-project/app/styles/main.scss

at ChildProcess.<anonymous> (/Users/Shared/Dropbox/Server/htdocs/Frameworks/my-project/node_modules/gulp-ruby-sass/index.js:80:25)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)

有没有人知道如何让这个设置运行?

谢谢,Oli

1 个答案:

答案 0 :(得分:0)

虽然您可以通过Bower安装Singularity,但您需要确保运行的是与Sass 3.3兼容的编译器。确保您使用正确版本的Sass的最佳方法是使用Bundler对Ruby进行版本控制。您的Gemfile应如下所示:

source 'https://rubygems.org' gem "sass", "~>3.3.0.rc.3"

然后确保Gulp Ruby Sass正在运行bundleExec