Compass Installation Tutorials

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.