Skip to content

Experimental Plugin to create module by merging files using a module declaration file

Notifications You must be signed in to change notification settings

chaabaj/grunt-module-merge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-module-merge

Experimental Plugin to create module by merging files using a module declaration file

Getting Started

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-module-merge --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-module-merge');

The "module_merge" task

Overview

In your project's Gruntfile, add a section named module_merge to the data object passed into grunt.initConfig().

grunt.initConfig({
  module_merge: {
        files {
            src : ['dir/**/*.json'],
            dest : 'build_dir/scripts/'
        },
    },
  },
})

Sample of module definition

{
  "name" : "module",
  "files" : ["somefile.js", "other.js", "*.js]
}

The base path is the path where is the module definition file. We support also the integration of angular template in the module

Example :

{
  "name" : "module",
  "files" : ["somefile.js", "other.js", "*.js", "*.tpl.html"]
}

Release History

0.1.6

License

Copyright (c) 2014 jalalc. Licensed under the MIT license.

About

Experimental Plugin to create module by merging files using a module declaration file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published