Skip to content

Commit

Permalink
使用uglifyjs
Browse files Browse the repository at this point in the history
  • Loading branch information
axiaoxin committed Jul 24, 2021
1 parent 197a6d5 commit 5c61e3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/scripts/app.min.js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NOW=$(date "+%Y%m%d-%H%M%S")
NEW_NAME=app.min.${NOW}.js

echo "压缩js..."
curl -X POST -s --data-urlencode "input@${SRC_PATH}/app.js" https://javascript-minifier.com/raw > ${SRC_PATH}/${NEW_NAME} && \
uglifyjs --compress --mangle --output ${SRC_PATH}/${NEW_NAME} -- ${SRC_PATH}/app.js && \

echo "替换html..."
sed -i '' -e "s|x-stock/js/app.*.js\"{{ else }}|x-stock/js/${NEW_NAME}\"{{ else }}|g" ${PROJECT_PATH}/statics/html/base.html && \
Expand Down

0 comments on commit 5c61e3a

Please sign in to comment.