Monday, July 8, 2019

How to Make JavaScript min code (aaa.js -> aaa.min.js)

* How to Make JavaScript min code (aaa.js -> aaa.min.js)

  1) If not, install Node.js (https://nodejs.org/).

  2) Run 'Command Prompt' (Windows).

  3) Go to the folder that contains the JavaScript file.

  4) Run 'npm init -y' in command line.

  5) Install terser (run 'npm install terser')

  6) Make min code (run 'npx terser -c -m -o aaa.min.js -- aaa.js')

  7) Check the generated file.

No comments:

Post a Comment

How to Make JavaScript min code (aaa.js -> aaa.min.js)

* How to Make JavaScript min code (aaa.js -> aaa.min.js)   1) If not, install Node.js ( https://nodejs.org/ ).   2) Run 'Command ...