mirror of
https://github.com/hacks-guide/minimal-mistakes.git
synced 2024-12-03 15:12:14 +00:00
Merge banner.js into Rake task
Also let uglify-js produce source map for easier debugging
This commit is contained in:
parent
0b8b5230f9
commit
b278dac7fb
6
Rakefile
6
Rakefile
@ -155,9 +155,9 @@ CLEAN.include(*COPYRIGHT_FILES)
|
||||
JS_FILES = Dir.glob("assets/js/plugins/*.js") + ["assets/js/_main.js"]
|
||||
JS_TARGET = "assets/js/main.min.js"
|
||||
task :js => JS_TARGET
|
||||
file JS_TARGET => JS_FILES do |t|
|
||||
sh Shellwords.join(%w[npx uglifyjs -c -m -o] + [t.name] + t.prerequisites)
|
||||
sh "node banner.js"
|
||||
file JS_TARGET => ["_includes/copyright.js"] + JS_FILES do |t|
|
||||
sh Shellwords.join(%w[npx uglifyjs -c --comments /@mmistakes/ --source-map -m -o] +
|
||||
[t.name] + t.prerequisites)
|
||||
end
|
||||
|
||||
task :watch_js do
|
||||
|
1
assets/js/main.min.js.map
Normal file
1
assets/js/main.min.js.map
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user