Compass Installation Tutorials
Compass and sass are equivalent to jquery and JavaScript, one is the encapsulated CSS Library and the other is the JavaScript library, all of which are designed to be the same, simplifying development.
Installation
In general, installation SASS
will automatically help you to install compass. If you are not sure if there is a compass installed, enter it in cmd
compass -v
Display ' compass
is not an internal or external command, it is not a running program or a batch file. The representative does not have compass installed.
Shown below, then the installation is successful.
D:\web\aaa\myproject>compass-vcompass 1.0.3 (Polaris) Copyright (c) 2008-2015 Chris eppsteinreleased under the MIT Lic Ense. Compass is charityware. Deductable donation for a worthy Cause:http://umdf.org/compass
Installation Instructions
Gem Update--system #先更新gemgem install compass #安裝Compass
Other directives
gem query –remote #卸载md mycompass /# md 建立空文件夹
Building Compass Projects
CMD into the site directory, in CMD, enter the following instruction.
compass create myproject
MyProject is the name of the project, and after execution, the Compass project file is downloaded to the specified directory:-config.rb--configuration file--. Sass-cache--cache file-sass-FILE-Sass S--Sass Compile file
COFING.RB configuration file
Http_path = "/" Css_dir = "stylesheets" Sass_dir = "sass" Images_dir = "Images" Javascripts_dir = "javascripts"//Can be applied with instruction OUTPU T_style =: Compressed //compile format specified
Compiling files
Perform the compilation
compass compile
You can only perform compilation under the configuration file, or you will not find the. scss file.
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 and you have left off the directory argument. Run "Compass-h" to get help.
In command-line mode, Compass has an auto-compile command in addition to a one-time compilation command
Compass Watch
To end the automatic compilation press CTRL + C
, also need to perform the automatic compilation under the configuration file before executing.
Call Module Error
If the calling module errors, it is possible that the encoding error.
Compass Installation Tutorials