Including certain modules in angularJS application builds -
i have feature modules in angular application , looking way create builds include features.
for example:
/app | |--/components | |--/core | |--/dataservices | |--/features | |--/customers | |--/orders
so wanted produce build included orders module, there tools out there can in achieving this?
i using gulp, , wondered being able configure gulp task took in arguments specify modules include , use file globbing patterns or similar target folders/files in build.
can offer suggestions\approaches?
thanks
yes, let's wanted gulp task globs js in orders folder , sub folders. gulp task looks following
// gulp orders task gulp.task('orders', function() { return gulp.src('features/orders/**/**.js') .pipe(concat('orders.js')) .pipe(gulp.dest('app/build/js')) .pipe(browsersync.reload({ stream: true })); });
what task globs js, concatenates js 1 orders.js file new folder called build. it's smart use browserync reload page during development when js files change.
your orders specific js end being app/build/js/orders.js
.
the variables need
var concat = require('gulp-concat'); var browsersync = require('browser-sync').create();
Comments
Post a Comment