向现有的sass项目添加指南针? [英] Add compass to existing sass project?

查看:129
本文介绍了向现有的sass项目添加指南针?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用香草 SASS 的现有项目,我想添加指南针。我以前使用过Compass,但是只用了 compass create 命令。

I've got an existing project that uses vanilla SASS, and I'd like to add Compass to it. I've used Compass in the past, but have only used it with the compass create command.

m寻找一种能够通过导入与其相关联的SCSS文件来利用罗盘的力量的方法,并且不必遵守其给出的结构。

I'm looking for a way to be able to utilize the power of compass by just importing the SCSS files that are associated with it, and not having to abide by the structure it gives.


推荐答案

在一个独立项目上需要的指南针是gem和 config.rb 。我将配置文件从一个项目复制/粘贴到另一个项目,然后调整设置,如插件要求和文件结构。

All you need for compass on a stand-alone project is the gem and config.rb. I copy/paste the config file from one project to another and then adjust settings such as plugin requirements and file structure. You can use any structure you like, as long as you set it up in the config file.

以下是我当前项目中的一个示例:

Here's an example from one of my current projects:

# Compass CSS framework config file

require 'susy'
require 'modular-scale'
require 'sassy-buttons'
require 'breakpoint'
require 'compass-css-arrow'
require 'rgbapng'
# Require any additional compass plugins here.

project_type = :stand_alone
# Set this to the root of your project when deployed:
http_path = "/"
sass_dir = "sass"
css_dir = "static/css"
images_dir = "static/images"
fonts_dir = "static/fonts"
javascripts_dir = "static/js"
line_comments = false
preferred_syntax = :scss
output_style = :expanded
relative_assets = true

这篇关于向现有的sass项目添加指南针?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆