This plugin will generate a file which imports all the files in a folder and register them in angular. Useful for registering controllers, directives, services and filters. Used along with ng-app-kit.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tasks
test
.gitignore
.jshintrc
Gruntfile.js
LICENSE
README.md
package.json

README.md

grunt-ng-importer

This plugin will generate a file which imports all the files in a folder and register them in angular. Useful for registering controllers, directives, services and filters. Used along with ng-app-kit.

Here is an article than explains more about this plugin and usage.

Here is sample of how the config object will look like.

module.exports = {
  dev: {
    importData: [{
        src: ['app/controllers/**/*.js'],
        dest: 'app/controllers/index.js',
        base: 'app/controllers/',
        type: 'controller'
      }, {
        src: ['app/directives/**/*.js'],
        dest: 'app/directives/index.js',
        base: 'app/directives/',
        type: 'directive'
      }, {
        src: ['app/services/**/*.js'],
        dest: 'app/services/index.js',
        base: 'app/services/',
        type: 'service'
      }, {
        src: ['app/filters/**/*.js'],
        dest: 'app/filters/index.js',
        base: 'app/filters/',
        type: 'filter'
      }
    ]
  }
};

Features, Issues Or Contributions