mirror of
https://codeberg.org/readeck/browser-extension.git
synced 2026-05-08 11:22:27 +00:00
Always minify JS files and add NODE_ENV production on release targets
This commit is contained in:
@@ -97,6 +97,7 @@ release-sources:
|
||||
git archive --format zip --output web-ext-artifacts/$$dest-sources.zip $(shell git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
.PHONY: release-firefox
|
||||
release-firefox: export NODE_ENV=production
|
||||
release-firefox: clean source-lint source-build moz-lint
|
||||
test -d web-ext-artifacts || mkdir web-ext-artifacts
|
||||
set -e ;\
|
||||
@@ -107,6 +108,7 @@ release-firefox: clean source-lint source-build moz-lint
|
||||
--overwrite-dest
|
||||
|
||||
.PHONY: release-chrome
|
||||
release-chrome: export NODE_ENV=production
|
||||
release-chrome: export TARGET_BROWSER=chrome
|
||||
release-chrome: clean source-lint source-build
|
||||
test -d web-ext-artifacts || mkdir web-ext-artifacts
|
||||
|
||||
+1
-2
@@ -66,8 +66,7 @@ function js_bundle(done) {
|
||||
platform: "browser",
|
||||
logLevel: "warning",
|
||||
metafile: false,
|
||||
minifyIdentifiers: process.env.NODE_ENV == "production",
|
||||
minifyWhitespace: process.env.NODE_ENV == "production",
|
||||
minify: true,
|
||||
banner: {
|
||||
js: "//" + LICENSE_HEADER.join("\n//"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user