vfs.src([path.join(modulePath, 'dist', '_static', 'js', '**', '*.js'), path.join('!' + modulePath, 'dist', '_static', 'js', '**','*.min.js')]) .pipe(athenaMate.uglify(jsCompressConf).on('error', $.util.log)) .pipe($.rename(function (path) { path.basename += '.min'; })) .pipe(vfs.dest(path.join(modulePath, 'dist', '_static', 'js')))
vfs.src(path.join(modulePath, 'widget', widgetName, '*.{js,scss,html,json}')) .pipe( es.map(function (data, callback) { var dataReplace = data['_contents'].toString().replace(pattern, widgetName); data['_contents'] = new Buffer(dataReplace); callback(null, data); }) ) .pipe(vfs.dest(path.join(modulePath, 'widget', widgetName)));
streamArr.push( vfs.src(cssArr) .pipe(athenaMate.concatCore(pageName + '_all.css')) .pipe(athenaMate.cssnano({ safe: true, onComplete: function (savedInfo) { Util.generateStatistics(modulePath, 'optimize.css', savedInfo); } })) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output', 's'))) );
vfs.src(path.join(modulePath, 'dist', '_static', '**')) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output'))) .on('end', function () { resolve(); });
vfs.src(cssFile) .pipe($.less()) .pipe(vfs.dest(path.join(modulePath, 'dist', '_', args.serveFolder))) .on('finish', function () { processCss(moduleConf.module).then(resolve, reject); })
vfs.src(path.join(modulePath, 'dist', 'output', 'tpl', '*.?(html|php|vm|ejs)')) .pipe($.flatten()) .pipe(athenaMate.injectServer({ cwd: appPath, module: moduleConf.module, outCSS: tplOutConf.outCSS })) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output', 'tpl'))) .on('end', function () { resolve(); });
streamArr.push( vfs.src(jsArr) .pipe(athenaMate.concatCore(pageName + '_all.js')) .pipe(athenaMate.uglify({ onComplete: function (savedInfo) { Util.generateStatistics(modulePath, 'optimize.js', savedInfo); } }).on('error', $.util.log)) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output', 's'))) );
vfs.src(path.join(modulePath, 'dist', '_static', '**')) .pipe(athenaMate.revServer({ modulePath: modulePath, revName: 'rev' })) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output', 's'))) .on('end', function () { resolve(); });
vfs.src([path.join(modulePath, 'dist', '_static', '**', '*.css'), path.join('!' + modulePath, 'dist', '_static', '**', '*.min.css')]) .pipe(athenaMate.cssnano(cssCompressConf)) .pipe($.rename(function (path) { path.basename += '.min'; })) .pipe(vfs.dest(path.join(modulePath, 'dist', '_static')))
vfs.src(path.join(modulePath, 'dist', '_static', '**')) .pipe(athenaMate.revNoHashServer({ modulePath: modulePath, revName: 'rev' })) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output', 's'))) .on('end', function () { resolve(); });
vfs.src(path.join(modulePath, 'dist', '_static', '{css,js,images}', '**')) .pipe(athenaMate.revNoHash({ modulePath: modulePath, revName: 'rev' })) .pipe(vfs.dest(path.join(modulePath, 'dist', 'output'))) .on('end', function () { resolve(); });
vfs.src([path.join(modulePath, '{page,widget,static,data}', '**'), '!**/*.psd']) .pipe(vfs.dest(path.join(modulePath, 'dist', '_'))) .on('finish', function() { resolve(); })
vfs.src([path.join(modulePath, 'dist', '_static', '**', '*.js'), path.join('!' + modulePath, 'dist', '_static', '**', '*.min.js')]) .pipe(athenaMate.uglify(jsCompressConf).on('error', $.util.log)) .pipe($.rename(function (path) { path.basename += '.min'; })) .pipe(vfs.dest(path.join(modulePath, 'dist', '_static')))
vfs.src(path.join(modulePath, 'dist', '_', '{page,widget,static}', '**', '*.{js,css}')) .pipe(vfs.dest(path.join(modulePath, 'dist', '_static'))) .on('end', function () { resolve(); });