gulp.task('vendor', () => { bower(); paths.vendor.forEach((module) => { // copy each lib to it's destination in the project gulp.src(module.entry) .pipe(gulp.dest(module.dest)); }); });
gulp.task('bower:install', ['clean', 'bower:configure'], function() { if (globalVar.bowerPackages) { return bower({ cmd: 'install', cwd: globalVar.publicDir, interactive: true }, [globalVar.bowerPackages]); } else { gutil.log('No --package provided. Using package(s) from bower_components folder.'); return gulp.src('./bower_components/**/*', {base: '.'}).pipe(gulp.dest(globalVar.publicDir)); } });
gulp.task('bower', function() { gulp.src('sources/vendor', { read: false }) .pipe(clean()); bower() .pipe(gulp.dest('sources/vendor/')); });
gulp.task("bower-command", ['bower_files'],function(){ var source_path = path.join(src_dir,'assets'); var dest_path = path.join(build_dir,'assets'); return bower({ cwd: dest_path }) .pipe(gulp.dest(dest_path )) ; });
return gulp.src(['pmodules/*/public/bower.json']).pipe(map(function(file, cb) { var path = file.history[0]; path = path.substring(0, path.length - 'bower.json'.length); bower({ cwd: path, interactive: true }).pipe(map(function() { cb(null, file); })); })).pipe(gulp.dest('build/'));
gulp.task('bower', function() { return bower('.tmp/lib') .pipe(exclude('**/README.md')) .pipe(exclude('**/test/**')) .pipe(exclude('**/tests/**')) .pipe(exclude('**/demos/**')) .pipe(exclude('**/demo.html')) .pipe(exclude('**/bower.json')) .pipe(exclude('**/.bower.json')) .pipe(gulp.dest('dist/lib')); });
gulp.task('bower', function() { return bower() .pipe(gulp.dest(config.bowerDir)) .on('end', function() { // Add Glyphicons to fonts dir gulp.src(config.bowerDir + '/bootstrap-sass-official/assets/fonts/*/*') .pipe(gulp.dest(config.fontPath)); }); });
gulp.task('bower', function() { return bower('./bower_components') //валится ошибка, пока не разобралась почему //.pipe(filterJs) //.pipe(uglify()) //.pipe(filterJs.restore()) //.pipe(filterCss) //.pipe(minCss({})) //.pipe(filterCss.restore()) .pipe(gulp.dest(dirName)); });
gulp.task('gh-pages', function() { var pkgName = getPackage().name; return merge( gulp.src(gitFiles()) .pipe(copy('.tmp/' + pkgName)), bower('.tmp') .pipe(add( 'index.html', '<meta http-equev="refresh" content="0;' + pkgName + '/">' )) ).pipe(ghPages()).on('end', function() { del(['.tmp', '.publish']); }); });
gulp.task('bower', function() { bower({ cmd: 'update' }) .pipe(gulp.dest(config.bowerDir)) .on('end', function() { // Add Glyphicons to fonts dir gulp.src(config.bowerDir + '/bootstrap-sass-official/assets/fonts/*/*') .pipe(gulp.dest(config.fontPath)); // Add FontAwesome fonts to fonts dir gulp.src(config.bowerDir + '/font-awesome/fonts/*') .pipe(gulp.dest(config.fontPath + '/font-awesome')); }); });
function updateBowerDependencies(){ bower() .on('end', function(){ gulp.src('./bower_components/pagedown/index.zip') .pipe(unzip()) .pipe(gulp.dest('./bower_components/pagedown')) .on('end', function(){ gulp.src('./bower_components/pagedown/pagedown-*/Markdown.Converter.js') .pipe(uglify()) .pipe(rename('pagedown.min.js')) .pipe(gulp.dest('./distr/dependencies')); }); gulp.src('./bower_components/jquery/dist/jquery.min.js') .pipe(gulp.dest('./distr/dependencies')); }); }
gulp.task('bower', function() { bower() .pipe(gulp.dest(config.componentsPath)) .on('end', function() { // Add Glyphicons to fonts dir gulp.src(config.componentsPath + '/bootstrap-sass-official/assets/fonts/*/*') .pipe(gulp.dest(config.fontPath)); // Add Font Awesome fonts to fonts dir gulp.src(config.componentsPath + '/font-awesome/fonts/*') .pipe(gulp.dest(config.fontPath + '/font-awesome')); // Add Weather Icons fonts to fonts dir gulp.src(config.componentsPath + '/weather-icons/font/*') .pipe(gulp.dest(config.fontPath + '/weather-icons')); }); });
gulp.task('default', function () { var overrides = { "chosen": {main: ['chosen.jquery.js']}, "float-labels.js": {main: ['dist/float-labels.js', 'src/scss/float-labels.scss']}, "Flot": {main: ['jquery.flot.js', 'jquery.flot.time.js', 'jquery.flot.resize.js']}, "flot.orderbars": {main: ['js/jquery.flot.orderBars.js']}, "jquery": {ignore: true}, "magnific-popup": {main: ['dist/jquery.magnific-popup.js', 'src/css/*.scss']}, "qtip2": {main: ['jquery.qtip.js', 'jquery.qtip.css'], dependencies: null} }; // run bower install bower() .pipe(gulp.dest('bower')) .on('end', function () { // copy bower plugin scripts to assets gulp.src(bowerMain({overrides: overrides})) .pipe(filter(['*.js'])) .pipe(gulp.dest('assets/js/plugins/')) .on('end', function () { // copy bower plugin (s)css to assets gulp.src(bowerMain({overrides: overrides})) .pipe(filter(['*.css', '*.scss'])) .pipe(rename(function (path) { path.extname = '.scss'; if (path.basename === 'main') { path.basename = 'magnific-popup'; } else if (path.basename === 'jquery.qtip') { path.basename = 'qtip'; } })) .pipe(gulp.dest('assets/scss/plugins/')) .on('end', function () { // ... and now we run all the tasks! gulp.start('watch', 'admin_styles', 'frontend_styles', 'scripts', 'concat_scripts'); }); }); }); });
gulp.task('bower', function() { bower().on('end', function() { var jsFilter = filter('**/*.js'), cssFilter = filter('**/*.{css,css.map}'), lessFilter = filter('**/*.less'), fontFilter = filter('**/*.{ttf,eot,svg,woff}'), imgFilter = filter('**/*.{png,jpeg,jpg,gif}'), gulpFiles = gulpBowerFiles(); //js files gulp.src(gulpFiles) .pipe(jsFilter) .pipe(sourcemaps.init()) .pipe(uglify()) .pipe(sourcemaps.write()) .pipe(gulp.dest('./public/js/ext')) .pipe(jsFilter.restore()) //css .pipe(cssFilter) .pipe(gulp.dest('./public/css/ext')) .pipe(cssFilter.restore()) //less .pipe(lessFilter) .pipe(gulp.dest('./public/less/ext')) .pipe(lessFilter.restore()) //fonts .pipe(fontFilter) .pipe(gulp.dest('./public/fonts/ext')) .pipe(fontFilter.restore()) //images .pipe(imgFilter) .pipe(gulp.dest('./public/images/ext')) .pipe(imgFilter.restore()); }); });
gulp.task('default', ['listen'], function() { bower() .pipe(gulp.dest('public/bower_components/')); //TODO ensure bower end deployIEScripts(); gulp.src(['public/*', 'public/templates/*', 'public/scripts/*']) .pipe(watch()) .pipe(livereload(server)); gulp.src('less/*.less') .pipe(watch()) .pipe(less()) .pipe(gulp.dest('public/css/')) .pipe(livereload(server)); concatJs(); });
gulp.task('bower', function() { return bower() .pipe(gulp.dest(dir.client + '/js/vendor')); });
gulp.task('bower', function () { return bower(); });
gulp.task('bower', function() { return bower() .pipe(gulp.dest('dist/bower_components/')); });
gulp.task('bower:install', function() { return bower(); });
gulp.task('bower', 'Install all bower dependencies specify in bower.json from bower repository', function () { return bower(); });
gulp.task('bower', function() { return bower() .pipe(gulp.dest('public/lib/')) });
gulp.task('gulp-init', function() { return bower("install"); });
gulp.task('bower', ['clean:bower'], function() { return bower() .pipe(gulp.dest('vendor/')) });
gulp.task('bower', function() { return bower({ cmd: 'update'}); });
gulp.task("bower", function() { bower(); });
return bower() });
gulp.task('init', ['clean:script', 'compile:script'], function() { return bower(); });
gulp.task('bower-styles', function() { return bower({ cwd: dir.client + '/styles' }); });
gulp.task('bower', function() { bower(); });
gulp.task('bower', ['bower-clean'], function() { bower().pipe(gulp.dest('bower_components')); });