Skip to content

Instantly share code, notes, and snippets.

@onocom onocom/config.rb
Last active Feb 2, 2018

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

onocom commented Sep 28, 2017

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

@onocom

This comment has been minimized.

Copy link
Owner Author

onocom commented Oct 5, 2017

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

@onocom

This comment has been minimized.

Copy link
Owner 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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.