Skip to content

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.

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

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.

Resources

License

Releases

No releases published

Packages

No packages published