[ 
https://issues.apache.org/jira/browse/OFBIZ-11960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17518715#comment-17518715
 ] 

Jacques Le Roux commented on OFBIZ-11960:
-----------------------------------------

About Uglifying/Minifying js scripts, in OFBIZ-9976 I noted:


{quote}
I checked, it would be easy to add {{"uglify-js": "latest"}} as a dependency in 
package.json and so do

{code:java}
+        "uglify-js": "latest"
+    },
+    "scripts": {
+        "uglify": "uglifyjs -o dist/...."
     }
 }
{code}
But that's unnecessary, at least currently, because all used files (js & css) 
under node_modules are already minified, except very little files like 
messages_en.js (1 or 2 kb) and only one is loaded at a time.
{quote}

> Use NPM with gradle to get external JS dependencies
> ---------------------------------------------------
>
>                 Key: OFBIZ-11960
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11960
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: ALL APPLICATIONS
>    Affects Versions: Trunk, Upcoming Branch
>            Reporter: Aditya Sharma
>            Assignee: Jacques Le Roux
>            Priority: Trivial
>
> As discussed 
> [here|https://lists.apache.org/thread.html/re16808eb5b1084f822c74194d23ca073dea4f4df443184f40f5f58c6%40%3Cdev.ofbiz.apache.org%3E],
>  use gradle-js-plugin to ease out managing the JavaScript dependencies. The 
> Gradle plugin allows us to automatically download the js libraries to the 
> user's system like the Gradle dependencies, so we no longer need to include 
> them with the package. It opens door to all the packages and modules 
> available at [npm registry|https://www.npmjs.com/]. Also, it can be clubbed 
> with Grunt or Gulp implementing tasks to minify external JS and CSS files 
> with the custom ones, see 
> [here|https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#how-do-i-run-commands-provided-by-npm-packages].
> 1. Add 
> [gradle-node-plugin|https://github.com/node-gradle/gradle-node-plugin]: 
> Gradle plugin for integrating NodeJS in your build
>  2. Create [NPM|https://www.npmjs.com/] package.json with JS dependencies in 
> webapp
>  3. Use available tasks to install dependencies
>  
> [https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/usage.md#executing-npm-tasks]
>  
>  
> [https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/usage.md#configuring-the-plugin]
>  4. Use the downloaded JS files in node_modules, updating the current path of 
> the JS files.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to