Skip to content

Commit

Permalink
Merge banner.js into Rake task
Browse files Browse the repository at this point in the history
Also let uglify-js produce source map for easier debugging
  • Loading branch information
iBug committed May 4, 2024
1 parent 0b8b523 commit b278dac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions assets/js/main.min.js.map

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions banner.js

This file was deleted.

0 comments on commit b278dac

Please sign in to comment.