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


TypeScript gulp-replace.default函數代碼示例

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


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

示例1: Scaffolding

export default function Scaffolding() {
    let name = helper.getCurrentTarget();
    if (!name) {
        return Promise.reject(new Error("Missing required project name"));
    }
    let projectPath = path.resolve(__dirname, "../../scaffolding", helper.getProjectType());
    return gulp.src(projectPath + '/**/*')
        .pipe(replace("$$NAME", name))
        .pipe(gulp.dest(`./${name}`));
}
開發者ID:mtfranchetto,項目名稱:smild,代碼行數:10,代碼來源:Scaffolding.ts

示例2: html2js

    () => {

        var filename = debuggerIndexFile,
            filePath = path.resolve(__dirname, filename),
            source = fs.readFileSync(filePath, 'utf8');

        var tpl = html2js(source, {
            mode: 'default',
            wrap: false
        });

        return gulp.src(SOURCE_DIR + '/' + DEBUGGER_NAMESPACE + '/debug.js')
            .pipe(template({
                template: tpl
            }))
            .pipe(gulpif(minify, uglify()))
            .pipe(gulpif(env === 'dev', replace(/##host##/g, `${baseUrl}container-debugger`)))
            .pipe(gulp.dest(DEST_DIR + '/' + DEBUGGER_NAMESPACE));

    }
開發者ID:lindsaymacvean,項目名稱:seventag,代碼行數:20,代碼來源:Gulpfile.ts

示例3: packageReplaceReferences

 /**
  * Removes /// <reference from compiled sources.
  */
 @Task()
 packageReplaceReferences() {
     return gulp.src("./build/package/**/*.d.ts")
         .pipe(replace(`/// <reference types="node" />`, ""))
         .pipe(replace(`/// <reference types="chai" />`, ""))
         .pipe(gulp.dest("./build/package"));
 }
開發者ID:waltercassiano,項目名稱:typeorm,代碼行數:10,代碼來源:gulpfile.ts

示例4:

gulp.task('task:commonjs:rewrite_plugins', () => gulp
  .src([
    'tmp/es5/src/plugins/**/*.js'
  ])
  .pipe(replace(/'@angular\/service-worker\/worker'/, "'../../worker'"))
  .pipe(replace(/"@angular\/service-worker\/worker"/g, "'../../worker'"))
  .pipe(gulp.dest('tmp/es5/src/plugins')));
開發者ID:madhu-amrit,項目名稱:mobile-toolkit,代碼行數:7,代碼來源:gulpfile.ts

示例5: bundleRenameDev

function bundleRenameDev() {
  src([
    `${LIB_DIR}/**/*.*`,
  ], { base: './' })
    .pipe(replace('@nebular', '@nebular-dev'))
    .pipe(dest('./'));
}
開發者ID:kevinheader,項目名稱:nebular,代碼行數:7,代碼來源:bundle.ts

示例6: Promise

 return new Promise((resolve, reject) => {
   gulp
     .src('compiled/ngc/modules/**/*')
     .pipe(rename(buildUtils.stripSrcFromPath))
     .pipe(replace(/\.\/src\//g, './'))
     .pipe(gulp.dest('dist'))
     .on('error', reject)
     .on('end', resolve);
 });
開發者ID:vvakame,項目名稱:universal,代碼行數:9,代碼來源:gulpfile.ts

示例7: Promise

  return new Promise((resolve) => {
    var doneCount = 0;
    output.js
      .pipe(rename(buildUtils.stripSrcFromPath))
      .pipe(replace(/\.\/src\//g, './'))
      .pipe(gulp.dest('dist'))
      .on('end', maybeDone),
    output.dts
      .pipe(rename(buildUtils.stripSrcFromPath))
      .pipe(replace(/\.\/src\//g, './'))
      .pipe(gulp.dest('dist'))
      .on('end', maybeDone);

    function maybeDone() {
      doneCount++;
      if (doneCount === 2) {
        resolve();
      }
    }
  });
開發者ID:jeckhart,項目名稱:universal,代碼行數:20,代碼來源:gulpfile.ts

示例8: join

export = () => {
  return gulp.src([
      join(Config.APP_SRC, '**/*.ts'),
      join(Config.APP_SRC, '**/*.json'),
      '!' + join(Config.APP_SRC, '**/*.spec.ts'),
      '!' + join(Config.APP_SRC, '**/*.e2e-spec.ts')
    ])
    // import in dev mode: import * as moment from 'moment';
    // import for rollup:  import moment from 'moment';
    .pipe(replace('import * as moment from \'moment\';', 'import moment from \'moment\';'))
    // .pipe(replace('import * as uuid from \'node-uuid\';', 'import uuid from \'node-uuid\';'))
    .pipe(gulp.dest(Config.TMP_DIR));
};
開發者ID:radiorabe,項目名稱:raar-ui,代碼行數:13,代碼來源:copy.prod.rollup.aot.ts

示例9:

    () => {

        return gulp.src([
            DEST_DIR + '/' + DEBUGGER_NAMESPACE + '/index.test.html',
            DEST_DIR + '/' + DEBUGGER_NAMESPACE + '/index.test.referrer.html'
        ])
            .pipe(ejs({
                getLocale: i18n.getLocale,
                version: versionJson.version,
                __: i18n.__
            }))
            .pipe(replace(/##host##/g, baseUrl + '/' + DEBUGGER_NAMESPACE))
            .pipe(gulp.dest(DEST_DIR + '/' + DEBUGGER_NAMESPACE));

    }
開發者ID:lindsaymacvean,項目名稱:seventag,代碼行數:15,代碼來源:Gulpfile.ts

示例10: packageReadmeFile

 /**
  * This task will replace all typescript code blocks in the README (since npm does not support typescript syntax
  * highlighting) and copy this README file into the package folder.
  */
 @Task()
 packageReadmeFile() {
     return gulp.src("./README.md")
         .pipe(replace(/```typescript([\s\S]*?)```/g, "```javascript$1```"))
         .pipe(gulp.dest("./build/package"));
 }
開發者ID:IrieLabs,項目名稱:ngx-popover,代碼行數:10,代碼來源:gulpfile.ts


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