本文整理汇总了TypeScript中gulp-debug.default方法的典型用法代码示例。如果您正苦于以下问题:TypeScript gulp-debug.default方法的具体用法?TypeScript gulp-debug.default怎么用?TypeScript gulp-debug.default使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gulp-debug
的用法示例。
在下文中一共展示了gulp-debug.default方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: size
gulp.task('default', () => {
let s = size();
return gulp.src('fixture.js')
.pipe(s)
.pipe(gulp.dest('dist'))
.pipe(debug({title: 'Total size ' + s.prettySize}));
});
示例2: processExternalCss
// This takes, PROD_DEPENDENCIES from config, and looks for CSS files in specified path, minifies them
// adds them to a common css bundle and saves them to a CSS_DEST.
function processExternalCss() {
return gulp.src(getExternalCss().map(r => r.src))
.pipe(debug({title:'html_css.processExternalCss.src'}))
.pipe(plugins.cssnano())
.pipe(debug({title:'html_css.processExternalCss.cssnano'}))
.pipe(plugins.concat(CSS_PROD_BUNDLE))
.pipe(debug({title:'html_css.processExternalCss.CSS_PROD_BUNDLE'}))
.pipe(gulp.dest(CSS_DEST))
.pipe(debug({title:'html_css.processExternalCss.CSS_DEST'}));
}
示例3: minifyComponentCss
// This method collects component's CSS files, minifies them and pushed them to TMP_DIR.
function minifyComponentCss() {
return gulp.src([
join(APP_SRC, '**', '*.css'),
// This line restricts any other css place in folders under assets from being picked.
'!' + join(APP_SRC, 'assets', '**', '*.css')
])
.pipe(debug({title:'html_css.minifyComponentCss.src'}))
.pipe(plugins.cssnano())
.pipe(debug({title:'html_css.minifyComponentCss.cssnano'}))
.pipe(gulp.dest(TMP_DIR))
.pipe(debug({title:'html_css.minifyComponentCss.dist'}));
}
示例4: bundleShims
// This takes, PROD_DEPENDENCIES from config, and looks for JS,SHIMS,Libs files in specified path
// adds them to a common JS bundle (Shimps.js) and saves them to a JS_DEST.
function bundleShims() {
return gulp.src(getShims())
// Strip comments and sourcemaps
.pipe(debug({title:'build.bundle.getShims.src'}))
.pipe(plugins.uglify({
mangle: false
}))
.pipe(debug({title:'build.bundle.getShims.uglify'}))
.pipe(plugins.concat(JS_PROD_SHIMS_BUNDLE))
.pipe(debug({title:'build.bundle.JS_PROD_SHIMS_BUNDLE.concat'}))
.pipe(gulp.dest(JS_DEST))
.pipe(debug({title:'build.bundle.JS_DEST.concat'}));
}
示例5: function
return function () {
return gulp.src([ // picks source files, except HTML, CSS and ts files
join(APP_SRC, '**'),
'!' + join(APP_SRC, '**', '*.ts'),
'!' + join(APP_SRC, '**', '*.css'),
'!' + join(APP_SRC, '**', '*.html'),
])
// .pipe(debug({title:'ASSETS.prodW.src'}))
.pipe(onlyDirs(es)) // Allows to copy only non empty directories.
.pipe(debug({title:'ASSETS.prodW.onlyDIRs'}))
.pipe(gulp.dest(APP_DEST)) // adds files to APP_DEST directory.
.pipe(debug({title:'ASSETS.prodW.DEST'}));
};
示例6:
@Task('ts::lint')
tslint() {
gulp.src(['./app/**/*.ts'])
.pipe(tslint())
.pipe(tslint.report('verbose'))
.pipe(debug());
}
示例7: join
export = () => {
let debug: boolean = argv.debug;
let dir=join(Config.TMP_DIR, 'jslocal');
let serviceWorkerFiles = join(dir, '**/service-worker*.js');
let normalFiles=[join(dir, '**/*.js'),
'!' + serviceWorkerFiles];
if (debug) {
console.log('copy.js.local - normal files: ', normalFiles);
console.log('copy.js.local - service worker files: ', serviceWorkerFiles);
}
gulp.src(normalFiles)
.pipe(gulpif(debug, gulpdebug({title:'copy.js.local normal files'})))
.pipe(gulp.dest(Config.JS_DEST));
gulp.src(serviceWorkerFiles)
.pipe(gulpif(debug, gulpdebug({title:'copy.js.local service worker files'})))
.pipe(gulp.dest(Config.PROD_DEST));
};
示例8: function
return function () {
let tsProject = tsProjectFn(plugins);
util.log('BUILD JS Prod: tsProject', chalk.yellow(tsProject));
let src = [
'typings/browser.d.ts',
'tools/manual_typings/**/*.d.ts',
join(APP_SRC, '**/*.ts'),
'!' + join(APP_SRC, '**/*.spec.ts'),
'!' + join(APP_SRC, '**/*.e2e.ts')
];
let result = gulp.src(src)
.pipe(debug({title:'buildJS.Prod.src'}))
.pipe(plugins.plumber())
.pipe(debug({title:'buildJS.Prod.plumbr'}))
.pipe(plugins.inlineNg2Template(INLINE_OPTIONS))
.pipe(debug({title:'buildJS.Prod.inlineNG2'}))
.pipe(plugins.typescript(tsProject));
return result.js
.pipe(debug({title:'buildJS.Prod.resultJS.tsProject'}))
.pipe(plugins.template(templateLocals()))
.pipe(debug({title:'buildJS.Prod.resultJS.templateLocals'}))
.pipe(gulp.dest(TMP_DIR))
.pipe(debug({title:'buildJS.Prod.resultJS.dir'}));
};
示例9: prepareTemplates
// This method collects component's HTML files and pushed them to TMP_DIR.
function prepareTemplates() {
return gulp.src(join(APP_SRC, '**', '*.html'))
.pipe(debug({title:'html_css.prepareTemplates.src'}))
.pipe(gulp.dest(TMP_DIR))
.pipe(debug({title:'html_css.prepareTemplates.dist'}));
}