compass安装教程
compass安装教程
安装一般来说,安装
显示 ' 显示如下,那么安装成功。 D:/WEB/aaa/myproject>compass -vCompass 1.0.3 (Polaris)Copyright (c) 2008-2015 Chris EppsteinReleased under the MIT License.Compass is charityware.Please make a tax deductable donation for a worthy cause: http://umdf.org/compass 安装指令 gem update --system #先更新gemgem install compass #安裝Compass 其它指令
建立compass项目cmd进入网站目录,在cmd中,输入以下指令。
myproject是项目的名字,执行后,会下载compass项目文件到指定目录下: - config.rb -> 配置文件 - .sass-cache -> 缓存文件 - sass -> sass文件 - stylesheets -> sass编译文件 cofing.rb 配置文件http_path = "/" css_dir = "stylesheets"sass_dir = "sass"images_dir = "images"javascripts_dir = "javascripts"//可以外加指令output_style = :compressed //编译格式指定 编译文件执行编译
只有在配置文件下,才能执行编译,不然会找不到.scss文件。 D:/WEB/aaa/mycompass/myproject/sass>compass compileCompass can't find any Sass files to compile.Is your compass configuration correct?.If you're trying to start a new project, you have left off the directory argument.Run "compass -h" to get help. 在命令行模式下,除了一次性编译命令,compass还有自动编译命令 compass watch 结束自动编译按 调用模块报错如果调用模块报错,有可能是编码错误。
|