简体   繁体   中英

How to integrate GruntJS with Netbeans 7.3?

How do I integrate Grunt into Netbeans 7.3, or alternatively allow Netbeans define some external script/program to exec as part of a build.

This is so I can setup Netbeans to compile Less into CSS automatically.

You don't have to change anything in Netbeans.

You should only use the Grunt to compile LESS into CSS, minify your scripts, etc.

Grunt will run in the background and will compile your LESS files into CSS files whenever you make any changes in this files.

  1. Install Node.js (Grunt is running on node.js) https://nodejs.org/en/download/package-manager/

  2. Install Grunt http://gruntjs.com/getting-started

  3. On grunt webpage go to plugins subpage and install:

    • grunt-contrib-watch

    • grunt-contrib-less

On each plugins subpage you have exact instructions how to set them up.

您可以使用java从less转换为css.Or为什么需要在NetBeans中进行配置?您可以创建一个grunt任务,使用终端调用它,任务将转换您需要的内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM