Skip to content

Instantly share code, notes, and snippets.

@onocom
Last active February 2, 2018 05:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save onocom/29259b091fdea04e159506bcba6d89ff to your computer and use it in GitHub Desktop.
Dreamweaverでcompassを動作させようとした時のconfig.rb 詳しくはブログにまとめました http://onocom.net/blog/dreamweaver-sass-compass/
Encoding.default_external = "UTF-8"
http_path = "/"
css_dir = "/wp-content/themes/THEME_NAME/css/"
sass_dir = "/wp-content/themes/THEME_NAME/scss/"
images_dir = "/wp-content/themes/THEME_NAME/images/"
javascripts_dir = "/wp-content/themes/THEME_NAME/js/"
fonts_dir = "/wp-content/themes/THEME_NAME/fonts/"
output_style = :expanded # :expanded or :nested or :compact or :compressed
sourcemap = true
line_comments = false
relative_assets = true
on_stylesheet_saved do
`compass compile -c wp-content/themes/THEME_NAME/config_prod.rb --force`
end
Encoding.default_external = "UTF-8"
http_path = "/"
css_dir = "/wp-content/themes/THEME_NAME/css/min/"
sass_dir = "/wp-content/themes/THEME_NAME/scss/"
images_dir = "/wp-content/themes/THEME_NAME/images/"
javascripts_dir = "/wp-content/themes/THEME_NAME/js/"
fonts_dir = "/wp-content/themes/THEME_NAME/fonts/"
output_style = :compressed # :expanded or :nested or :compact or :compressed
sourcemap = true
line_comments = false
relative_assets = true
@onocom
Copy link
Author

onocom commented Sep 28, 2017

require 'compass/import-once/activate'
↑こいつがあるとインポートに失敗することを確認↑

@onocom
Copy link
Author

onocom commented Oct 5, 2017

minifyしたCSSも同時に生成する。(ファイル名を.minにはできなかったので、別ディレクトリに置いたけどこの方法だとCSS内の画像参照がおかしくなるのでminifyファイルを使うときは要注意)

@onocom
Copy link
Author

onocom commented Feb 2, 2018

Encoding.default_external = "UTF-8"
を追加しないとコンパイルされない事があったので追記

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment