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.

License

Notifications You must be signed in to change notification settings

blessanm86/grunt-ng-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published