
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
gulp-angular-module
Advanced tools
#gulp-angular-module
Dymaic angular module extension
##Usage
Install gulp-angular-module
as a development dependency:
npm install gulp-angular-module --save-dev
Then add it to your gulpfile.js
:
var angularModule = require('gulp-angular-module'),
gulp = require('gulp');
gulp.task('module', function(){
gulp.sr('./src/app/*.js')
.pipe(angularModule())
.pipe(gulp.dest('./dist/'));
});
####moduleDefinitionFileName
Type: String
If defined then all module definitions will be placed here. The default behaviour will place a module definition in a file named the same as the module.
####masterModule
Type: String
If set will add all modules found as a dependency to this module.
####masterVendorModules
Type: Array
Possible 3rd party vendor modules to add to the master module.
Let's say you have a very large angular app that you've separated into different modules
|
+- src
| +- modules
| +- admin
| +- userManagmentController.js
| +- userService.js
| +- ui
| +- specialButtonDirective.js
| +- awesomeSliderDirective.js
+- dist
In the src/modules/admin/userManagmentController.js
You have the following code
angular.module('admin',['fooVendorModule'])
.controller('userManagement', function(fooService){
...
});
And in src/modules/admin/userService.js
You have
angular.module('admin',['barVendorModule'])
.service('userService', function(barService){
...
});
There would be an issue because angular only allows a module to be defined once. To fix this you then have to create an app.js at root of the module and redefine all the dependencies there, whilst also having to replace all of the module definitions up in all your controllers, constants, directives, ect.
angular.module('admin',['barVendorModule','fooVendorModule']);
As you can guess this becomes a very large cognitive load as your app gets very large and this plugin automates this process.
FAQs
Allows for dynamic module extension
We found that gulp-angular-module demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.