Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchmccline/7876861 to your computer and use it in GitHub Desktop.
Save mitchmccline/7876861 to your computer and use it in GitHub Desktop.
SCSS CodeKit WordPress - This is some Ruby that I found that I use while developing WordPress themes with Compass via CodeKit. In the config.rb file that is generated by CodeKit when Compass is installed on a project. When the styles.css file is saved in the css subfolder the code below will take the file and move it to the root of your WP theme…
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
preferred_syntax = :scss
require 'fileutils'
on_stylesheet_saved do |file|
if File.exists?(file) && File.basename(file) == "style.css"
puts "Moving: #{file}"
FileUtils.mv(file, File.dirname(file) + "/../" + File.basename(file))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment