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
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2017-10-23 15:42:36 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2017-10-23 15:42:36 +0300
commitd5fedb89b3f6b860e074505d976bfb9b8aff6546 (patch)
treef242ba21aa98b1113e0fa814099ed9c33094d10f /tasks/updater
parentf54ea0fee77dd7fed5f971830a6589d1cdfc5421 (diff)
Remove sourceMappingURL - Refs #124
Diffstat (limited to 'tasks/updater')
-rw-r--r--tasks/updater/js.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/tasks/updater/js.rb b/tasks/updater/js.rb
index 0c5109b..b07febd 100644
--- a/tasks/updater/js.rb
+++ b/tasks/updater/js.rb
@@ -6,8 +6,7 @@ class Updater
log_status 'Updating javascripts...'
save_to = @save_to[:js]
read_files('js/dist', bootstrap_js_files).each do |name, content|
- content = content.sub(%r{^//# sourceMappingURL=.*\n?\z}, '')
- save_file("#{save_to}/#{name}", content)
+ save_file("#{save_to}/#{name}", remove_source_mapping_url(content))
end
log_processed "#{bootstrap_js_files * ' '}"
@@ -23,7 +22,7 @@ class Updater
'assets/javascripts/bootstrap.js' => dist_js['bootstrap.js'],
'assets/javascripts/bootstrap.min.js' => dist_js['bootstrap.min.js'],
}.each do |path, content|
- save_file path, content
+ save_file path, remove_source_mapping_url(content)
log_processed path
end
end
@@ -42,6 +41,10 @@ class Updater
end
end
+ def remove_source_mapping_url(content)
+ content.sub(%r{^//# sourceMappingURL=.*\n?\z}, '')
+ end
+
class Deps
include TSort