简体   繁体   English

如何将GruntJS与Netbeans 8集成

[英]How to integrate GruntJS with Netbeans 8

How to configure Netbeans 8.0.1 with GruntJS? 如何使用GruntJS配置Netbeans 8.0.1?

link to grunt-sass - where and how to use NPM inside netbeans. 链接到grunt-sass - 在netbeans中使用NPM的位置和方式。 Where do i use that install command? 我在哪里使用该安装命令?

I set SASS properly. 我正确地设置了SASS。 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. 我无法找到任何信息如何在CSS中使用GruntJS在NetBeans中运行autoprefixer,这样你就可以从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....). 在NetBeans 8.0.1中,只需创建一个新的HTML5项目(当然也可以使用现有的....)。 Right click on the project in Projects window and select New->Other. 右键单击Projects窗口中的项目,然后选择New-> Other。 In opened dialog, select HTML5 category and you can see (among others) JSON file and Gruntfile: 在打开的对话框中,选择HTML5类别,您可以看到(以及其他)JSON文件和Gruntfile:

  • create a new JSON file called package.json in project folder, not site root - this is where you will add NPM dependencies. 在项目文件夹中创建一个名为package.json的新JSON文件,而不是站点根目录 - 这是您将添加NPM依赖项的位置。 If you now right click on this file or on project again, you'll see NPM install action. 如果您现在右键单击此文件或再次单击项目,您将看到NPM install操作。 If you invoke it, you can install NPM dependencies from NetBeans 如果调用它,则可以从NetBeans安装NPM依赖项
  • 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. 在项目文件夹中创建一个新的Gruntfile,而不是站点根目录 - 这将创建默认的“空”Gruntfile.js,这取决于你在这里设置你的任务。 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) 如果右键单击此文件(在重要文件中)或在项目上,您应该看到菜单项Grunt tasks ,如果您选择它并稍等片刻,它将显示任务列表,您只需单击它们即可执行它们(看这个截图供参考)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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