zoukankan      html  css  js  c++  java
  • compass安装教程

    compass安装教程

    compass和sass相当于,jquery和javascript,一个是封装的css库,另一个是javascript库,它们都目的是一样的,简化开发。

    安装

    一般来说,安装SASS的话,会自动帮助你安装compass。如果不确认是否有安装compass,在cmd中输入

    compass -v
    

    显示 'compass' 不是内部或外部命令,也不是可运行的程序或批处理文件。代表未安装compass。

    显示如下,那么安装成功。

    D:WEBaaamyproject>compass -v
    Compass 1.0.3 (Polaris)
    Copyright (c) 2008-2015 Chris Eppstein
    Released under the MIT License.
    Compass is charityware.
    Please make a tax deductable donation for a worthy cause: http://umdf.org/compass
    

    安装指令

    gem update --system  #先更新gem
    gem install compass  #安裝Compass
    

    其它指令

    gem query –remote #卸载
    
    md mycompass /# md 建立空文件夹
    

    建立compass项目

    cmd进入网站目录,在cmd中,输入以下指令。

    compass create myproject
    

    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     //编译格式指定
    

    编译文件

    执行编译

    compass compile
    

    只有在配置文件下,才能执行编译,不然会找不到.scss文件。

    D:WEBaaamycompassmyprojectsass>compass compile
    Compass 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 argumen
    t.
    Run "compass -h" to get help.
    

    在命令行模式下,除了一次性编译命令,compass还有自动编译命令

    compass watch
    

    结束自动编译按 CTRL + C,同样,也需要在配置文件下执行自动编译,才执行。

    调用模块报错

    如果调用模块报错,有可能是编码错误。

  • 相关阅读:
    Linux oracle操作
    Job
    Oracle创建表空间和用户并分配权限
    Oracle赋予用户查询另一个用户所有表的权限
    plsql中文乱码解决方案
    PLSQL创建Oracle定时任务,定时执行存储过程
    fcntl函数参数F_GETPIPE_SZ、F_SETPIPE_SZ报错引出的关于linux-specific头文件的使用方法
    从Windows Server 2008 迁移mantis到CentOS 6.8
    从Windows Server 2008 迁移VisualSVN到CentOS 6.8
    CentOS 6.8上开启NFS服务给不同用户使用的曲线设置方法
  • 原文地址:https://www.cnblogs.com/Baiang/p/5297113.html
Copyright © 2011-2022 走看看