Hack to fix source map URLs in production brunch.

This commit is contained in:
Nick Winter 2014-11-30 17:06:21 -08:00
parent d007f5337e
commit 1cada9dd77

View file

@ -31,6 +31,15 @@ exports.config =
overrides:
production:
sourceMaps: 'absoluteUrl'
onCompile: (files) ->
# For some reason, production brunch produces two entries, the first of which is wrong:
# //# sourceMappingURL=public/javascripts/app.js.map
# //# sourceMappingURL=/javascripts/app.js.map
# So we remove the ones that have public in them.
exec = require('child_process').exec
for file in files
exec "perl -pi -e 's/\\/\\/# sourceMappingURL=public.*//g' #{file.path}"
exec c
files:
javascripts:
@ -172,7 +181,6 @@ exports.config =
defn = if path in needHeaders then commonjsHeader else ''
return defn
#- Find all .coffee and .jade files in /app
dirStack = ['./app']