简体   繁体   中英

How to integrate GruntJS with Netbeans 8

How to configure Netbeans 8.0.1 with GruntJS?

link to grunt-sass - where and how to use NPM inside netbeans. Where do i use that install command?

I set SASS properly. I cannot find anywhere information how to for example run autoprefixer inside NetBeans using GruntJS on CSS so you can get not needed prefixes away from your CSS.

This is probably the best solution now for vendor prefixies and there is almost no info about it on internet or at least none that are doing it step by step.

In NetBeans 8.0.1, just create a new HTML5 project (or of course use existing....). Right click on the project in Projects window and select New->Other. In opened dialog, select HTML5 category and you can see (among others) JSON file and Gruntfile:

  • create a new JSON file called package.json in project folder, not site root - this is where you will add NPM dependencies. If you now right click on this file or on project again, you'll see NPM install action. If you invoke it, you can install NPM dependencies from NetBeans
  • create a new Gruntfile in project folder, not site root - this will create default "empty" Gruntfile.js and it is up to you do setup your tasks here. If you right click on this file (in Important files) or on project, you should see menu item Grunt tasks , if you select it and wait a moment, it will show list of tasks and you can execute them simply by clicking on them (see this screenshot for reference)

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