Adding a Grunt Plugin to JET by Paul Thaden

Posted: August 24, 2016 in JDeveloper & ADF
Tags: , , , ,

clip_image001

 

So let’s say we’re cool with the whole Grunt-for-a-JET-project thing and now want to extend the scripts by adding a new plugin.

We’ll add something simple first. I like time-grunt because I’m always curious about the metrics. Adding it to our project will display the elapsed execution time of all of the tasks whenever we run Grunt.

First we need to download and install the plugin. Then we need to configure our Grunt scripts to fire it up.

Grunt plugins are installed via npm and registered in the package.json file in the root of your JET project. Execute this command to download and install time-grunt:

npm install time-grunt --save-dev

The npm install part pulls down the code needed for time-grunt and puts it in your node_modules folder. The --save-dev part adds an entry to your package.json file.

Now we need to add it to the Gruntfile so that it will run on every invocation of grunt. Because it’s watching over everything Grunt does and measuring the time it takes, time-grunt loads differently than normal task modules and we don’t use the load-grunt-config pattern of adding a scripts/grunt/config file like a task. Instead, we put it directly in the Gruntfile, despite the fact that the generated JET code leans on the load-grunt-config approach for all of its other plugins. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Technorati Tags: JET,WebLogic Community,Oracle,OPN,Jürgen Kress

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s