0.0.8 • Published 8 years ago

grunt-hub-json-creator v0.0.8

Weekly downloads
24
License
-
Repository
-
Last release
8 years ago

grunt-hub-json-creator

Grunt plugin to create JSON file to be used in HUB.

This JSON will consist of following:

  • Menuitems to be used for creating left navigation into HUB. It will also have data related to category-component relationship.
  • jsDependencies to be included in HUB component page to include necessary functionality to run that component.
  • isJqueryPartialsAvailable flag to notify HUB for Jquery partials availability for current library.

Getting Started

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command

npm install grunt-hub-json-creator --save-dev

Once that's done, add this line to your project's Gruntfile

grunt.loadNpmTasks('grunt-hub-json-creator');

Config

Inside your Gruntfile.js file, add a section named hubjson. Here's a simple example

hubjson: {
    target: {
        options: {
            libraryName: 'reference-library',
            partialsFolderPath: 'dist/partials/toolkit',
            partialsFileExt: 'html',
            catCompSeparator: '.',
            dest: 'dist/reference-library',
            jsDependencies: ['reference-library.min.js', 'demoControllers.js'],
            isJqueryPartialsAvailable: true,
            allowedCategories: ['array of category names'],
            allowedComponents: ['array of components name']
        }
    }
}

Options

libraryName

default 'Package name from package.json'

Name of the library.

partialsFolderPath

default 'dist/partials'

Path to folder from where it will search for partial files.

partialsFileExt

default 'html'

Extension of partial folder.

catCompSeparator

default '.'

Separator used to separate category and component name in filename.

dest

default 'dist/libraryNameFromPackageJson'

Destination folder path.

jsDependencies

default

List of files to be included as dependency for this library.

isJqueryPartialsAvailable

default true

Flag to notify HUB that jquery partials are available for this library or not.

allowedCategories

default

list of categories which will be included in json file to be used by HUB.

allowedComponents

default

list of components which will be included in json file to be used by HUB.

License

MIT License

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago