- Oracle JET for Developers
- Raja Malleswara Rao Pattamsetti
- 314字
- 2021-07-02 22:03:09
Grunt
As discussed in previous chapters, Grunt helps in automating tedious non-functional activities such as minimization, compilation, unit testing, and linting much more easily. The Grunt ecosystem is growing rapidly, with plugins for your routine tasks including Sass, LESS, RequireJS, and CoffeeScript.
We can install grunt-cli using the following command:
npm -g install yo grunt-cli
If we are using NetBeans IDE for web application development in an Oracle JET project, the build command is essential in making the application complete, although key source files are available in the src folder. Grunt tasks, including build and serve, can be enabled within NetBeans IDE to resolve this problem by performing the following steps:
- Right-click on the project's root folder and select Build (as follows), which gives us the option:

- The preceding Build option prompts you to configure project actions to call Grunt tasks from within NetBeans IDE. Choose Yes to open the configuration window:

- Select all the options (checkboxes) and click OK to run Grunt commands enabled through project actions as follows:

- Right-click on the project root folder again and click on the build option to let Grunt build the project within the IDE, as shown in the following screenshot:

At this point, you need to be very careful. The process above has created a web folder. Essentially, developers need to make code changes in the src directory, build the application and then run the application from the web folder. Do remember this cycle and make sure you always make code changes in the src directory only, and if you make changes to the resources under the web directory, they will be lost in the next build.
Once grunt build is successful and the web directory is updated with the latest changes, we can run the grunt serve command to deploy the application and review the output on the browser.
- 構建高可用Linux服務器(第4版)
- 從零開始寫Linux內核:一書學透核心原理與實現
- 混沌工程實戰:手把手教你實現系統穩定性
- 深入理解eBPF與可觀測性
- Microsoft Operations Management Suite Cookbook
- 嵌入式實時操作系統μC/OS原理與實踐
- Linux系統安全基礎:二進制代碼安全性分析基礎與實踐
- Windows 8實戰從入門到精通(超值版)
- 新編電腦辦公(Windows 10+ Office 2013版)從入門到精通
- INSTANT Galleria Howto
- Hands-On GPU Programming with Python and CUDA
- Linux操作系統
- 鴻蒙操作系統設計原理與架構
- Learn SwiftUI
- UI設計手繪表現從入門到精通