Closed Awea closed 10 years ago
This bug is a feature of sass, not a bug of sinatra-assetpack. See #102 also.
May be it can be solve using some Sprockets stuff. Or using an other gem like https://github.com/kalasjocke/sinatra-asset-pipeline.
Here is how I solved the problem using Guard Shell (https://github.com/hawx/guard-shell). Note that it is important that your 'manifest' file is not watched, or you will end up in an infinite loop.
# Workaround for https://github.com/rstacruz/sinatra-assetpack/issues/139
# Note: As of writing this, Guard-Shell gem needs file permissions loosened:
# https://github.com/hawx/guard-shell/issues/14
guard :shell do
watch (%r{^app/assets/stylesheets/(.*)/(.*)\.scss}) do |m|
# Notify me that the file has changed
puts m[0] + " has changed."
manifest = "#{ Dir.pwd }/app/assets/stylesheets/application.scss"
command = "touch #{ manifest }"
puts command # Nice to see in the terminal, Guard is a developer tool after all...
`#{ command }`
end
end
@leebrooks0 Seems good ! This issue is not related to this gem but to our environment of development. So I close it ^^
@Awea :+1: Helpful solution, perhaps should be added to README.md
.
I'm using the following
application.sass
file :With the following configuration :
It work well. But when I change something in an included sass file, I need to save the
application.sass
too to get the changes.