Compass installation tutorial-Baiang

Source: Internet
Author: User
Compass installation tutorial-Baiang Compass installation tutorial

Compass and sass are equivalent to jquery and javascript. One is the encapsulated css library and the other is the javascript library. They both aim at the same and simplify development.

Install

Generally, installSASSIt will automatically help you install compass. If you are not sure whether compass is installed, enter

compass -v

Display'compass'It is not an internal or external command, nor a program or batch file that can be run. Indicates that compass is not installed.

As shown below, the installation is successful.

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

Installation instructions

Gem update -- system # update gemgem install compass # install Compass

Other commands

Gem query-remote # uninstall md mycompass/# create an empty folder in md
Create a compass project

Go to the website directory in cmd and enter the following command.

compass create myproject

Myproject is the project name. After execution, the compass project file will be downloaded to the specified directory:-config. rb-> Configuration File -. sass-cache-> cache file-sass-> sass file-stylesheets-> sass compilation File

Cofing. rb configuration file
Http_path = "/" css_dir = "stylesheets" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" // The command output_style =: compressed // specify the compilation format
Compile a file

Execute Compilation

compass compile

Compilation can be performed only in the configuration file, or the. scss file cannot be found.

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.

In command line mode, in addition to one-time compilation commands, compass also has automatic compilation commands.

compass watch

End automatic compilationCTRL + CIn the same way, you also need to execute automatic compilation in the configuration file.

Call module Error

If the call module reports an error, it may be an Encoding Error.

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.