Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2017-05-30 04:34:24 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2017-05-30 04:34:24 +0300
commitdeb364c8eb512bc614a10b27ad2e797c0a428028 (patch)
tree872363b954dcd1b66ecc16f69d0836539d6afa72 /tasks
parent10271eeaa3d38e32686c6f86478cdf7cbea954c8 (diff)
Remove sourceMappingUrls
This gem does not ship with source maps. Fixes #87
Diffstat (limited to 'tasks')
-rw-r--r--tasks/updater/js.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tasks/updater/js.rb b/tasks/updater/js.rb
index b50ab63..32eee9a 100644
--- a/tasks/updater/js.rb
+++ b/tasks/updater/js.rb
@@ -3,8 +3,9 @@ class Updater
def update_javascript_assets
log_status 'Updating javascripts...'
save_to = @save_to[:js]
- read_files('js/dist', bootstrap_js_files).each do |name, file|
- save_file("#{save_to}/#{name}", file)
+ read_files('js/dist', bootstrap_js_files).each do |name, content|
+ content = content.sub(%r{^//# sourceMappingURL=.*\n?\z}, '')
+ save_file("#{save_to}/#{name}", content)
end
log_processed "#{bootstrap_js_files * ' '}"