Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rupert-ong/5459466 to your computer and use it in GitHub Desktop.
Save rupert-ong/5459466 to your computer and use it in GitHub Desktop.
Wordpress: Sass - Move style.css to parent directory (config.rb)
# Move style.css to parent (root) directory of theme
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