當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript gulp-plumber類代碼示例

本文整理匯總了TypeScript中gulp-plumber的典型用法代碼示例。如果您正苦於以下問題:TypeScript gulp-plumber類的具體用法?TypeScript gulp-plumber怎麽用?TypeScript gulp-plumber使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了gulp-plumber類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: processCSS

export default function processCSS() {
  return gulp.src(project.cssProcessor.source)
    .pipe(changedInPlace({ firstPass: true }))
    .pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
    .pipe(sourcemaps.init())
    .pipe(less())
    .pipe(build.bundle());
}
開發者ID:jugglingthebits,項目名稱:C3,代碼行數:8,代碼來源:process-css.ts

示例2: buildTypeScript

function buildTypeScript() {
  typescriptCompiler = ts.createProject('tsconfig.json', {
    typescript: require('typescript')
  });
  let src = gulp.src(project.transpiler.source).pipe(changedInPlace({ firstPass: true }));
  return eventStream
    .merge(src)
    .pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
    .pipe(typescriptCompiler())
    .pipe(gulpif(isJsFile, build.bundle()));
}
開發者ID:aurelia,項目名稱:aurelia,代碼行數:11,代碼來源:transpile.ts

示例3: compileJs

function compileJs(src: string[], dest: string, inlineTpl?: boolean): NodeJS.ReadWriteStream {

  const result = gulp.src(['./tools/typings/tsd/tsd.d.ts', './tools/typings/*.ts'].concat(src))
    .pipe(plumber())
    .pipe(sourcemaps.init());

  return result
    .pipe(typescript(tsProject)).js
    .pipe(ngAnnotate())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(dest));
}
開發者ID:australdev,項目名稱:app,代碼行數:12,代碼來源:gulpfile.ts

示例4: tslint

 /**
  * Typescript lint task
  */
 @Task('ts::lint')
 tslint() {
   let lintoptions: any = {
     emitError: false,
     sort: true,
     bell: true
   }
   return gulp.src(this.config.paths.source)
     .pipe(plumber())
     .pipe(tslint())
     .pipe(tslint.report(require('tslint-stylish'), lintoptions));
 }
開發者ID:molecuel,項目名稱:mlcl_log,代碼行數:15,代碼來源:gulpclass.ts

示例5: processMarkup

export default function processMarkup() {
  return gulp.src(project.markupProcessor.source)
    .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
    .pipe(changedInPlace({firstPass:true}))
    .pipe(htmlmin({
        removeComments: true,
        collapseWhitespace: true,
        minifyCSS: true,
        minifyJS: true,
        ignoreCustomFragments: [/\${.*?}/g] // ignore interpolation expressions
    }))
    .pipe(build.bundle());
}
開發者ID:AshleyGrant,項目名稱:cli,代碼行數:13,代碼來源:process-markup.ts

示例6: buildJavaScript

function buildJavaScript() {
  if (!typescriptCompiler) {
    typescriptCompiler = typescript.create(require('../../tsconfig.json').compilerOptions);
  }

  return gulp.src(project.paths.dtsSource.concat(project.paths.source))
    .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
    .pipe(changed(project.paths.output, {extension: '.js'}))
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(typescriptCompiler())
    .pipe(sourcemaps.write({includeContent: false, sourceRoot: '/src'}))
    .pipe(gulp.dest(project.paths.output));
}
開發者ID:itainteasy,項目名稱:cli,代碼行數:13,代碼來源:build-javascript.ts

示例7: merge

  /**
   * Typescript compile task
   */
  @Task('ts::compile')
  tscompile(): any {
    let sourcepaths = ['typings/main.d.ts'];
    sourcepaths.push(this.config.paths.source);
    var tsResult = gulp.src(sourcepaths)
      .pipe(plumber())
      .pipe(ts(this.tsProject));

    return merge([
      tsResult.dts.pipe(gulp.dest('definitions')),
      tsResult.js.pipe(gulp.dest(this.config.paths.dist))
    ]);
  }
開發者ID:molecuel,項目名稱:mlcl_log,代碼行數:16,代碼來源:gulpclass.ts

示例8: compileTs

function compileTs(src: string | string[], dest: string, inlineTpl?: boolean): NodeJS.ReadWriteStream {

  let result = gulp.src(src)
    .pipe(plumber())
    .pipe(sourcemaps.init());

  if (inlineTpl) {
    result = result.pipe(inlineNg2Template({ base: PATH.src.base }));
  }

  return result.pipe(typescript(tsProject))
    .js.pipe(sourcemaps.write())
    .pipe(gulp.dest(dest));
}
開發者ID:kgeorgieva,項目名稱:kristina-georgieva-angular2-site,代碼行數:14,代碼來源:gulpfile.ts

示例9: buildTypeScript

function buildTypeScript() {
  if(!typescriptCompiler) {
    typescriptCompiler = ts.createProject('tsconfig.json', {
      "typescript": require('typescript')
    });
  }

  return gulp.src(project.transpiler.dtsSource.concat(project.transpiler.source))
    .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
    .pipe(changedInPlace({firstPass:true}))
    .pipe(sourcemaps.init())
    .pipe(ts(typescriptCompiler))
    .pipe(build.bundle());
}
開發者ID:agileraymond,項目名稱:cli,代碼行數:14,代碼來源:transpile.ts

示例10:

gulp.task("build.css.dev", () => {
    gulp.src(["src/themes/*.scss"])
        .pipe(plumber())
        .pipe(sourcemaps.init())
        .pipe(sass({
            includePaths: ["src/**/*.scss"],
        }))
        .pipe(autoprefixer({
            browsers: ["last 2 versions"],
            cascade: false
        }))
        .pipe(sourcemaps.write("./"))
        .pipe(plumber.stop())
        .pipe(gulp.dest("./dist/dev"))
});
開發者ID:damyanpetev,項目名稱:zero-blocks,代碼行數:15,代碼來源:gulpfile.ts


注:本文中的gulp-plumber類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。