Last active
January 8, 2016 03:26
-
-
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…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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