zoukankan      html  css  js  c++  java
  • Sass实战之remoteSass插件

    remote-sass可以让sass支持在线远程编译,这样可以共享基础样式模块。

    在静态资源管理方面可以更方便,更通用,省去每次都去寻找相对路径带来的烦恼。

    1.安装ruby

    2.安装sass

    gem install sass

    3.安装compass

    gem install compass

    4.安装remote-sass

    gem install remote-sass

    5.在config.rb中配置

    # import远程scss文件.

    require 'remote-sass'

    RemoteSass.location = "http://dev.shiqudou.com/"

    其中RemoteSass.location是你需要远程引入的http地址的前缀,同时也作为load-path加入到SASS中。

    在test/test.scss中

    @import 'backend/static/bootstrap/scss/bootstrap';
    .ss1{
      color: $gray-darker;
      text-align: center;
    }

    就会去请求http://dev.shiqudou.com/backend/static/bootstrap/scss/bootstrap.scss

    注:引用路径中不能包含下划线

    6.结合开发神器webstorm,开启compass支持

    7.选择filewatchers,新建一个compass scss配置

    8.修改配置项

    program:compass运行路径

    arguments:命令行参数

    把Immediate file synchronization的勾去掉。这样就不会实时编译了,只会在ctrl + s的时候编译。

    点击OK,再点击apply

     

    插件地址:https://github.com/joeellis/remote-sass

  • 相关阅读:
    css
    ubuntu 解压zip 文件乱码
    常用 Git 命令清单
    phpstorm git配置
    github ssh秘钥配置
    ubuntu 安装phpunit
    ubuntu 安装php xdebug
    nginx压缩,缓存
    mysql中max_allowed_packet参数的配置方法(避免大数据写入或者更新失败)
    putty登录显示IP
  • 原文地址:https://www.cnblogs.com/shiqudou/p/4105134.html
Copyright © 2011-2022 走看看