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


TypeScript gulp-concat類代碼示例

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


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

示例1: Promise

 return new Promise((resolve, reject) => {
   gulp.src('src/index.html')
     .pipe(gulp.dest(`www`))
     .on('end', () => {
       count ++
       count === 5 ? resolve() : null
     })
   gulp.src(['./src/images/*'])
     .pipe(gulp.dest(`www/images/`))
     .on('end', () => {
       count ++
       count === 5 ? resolve() : null
     })
   minHtml(target)
   .on('end', () => {
     count ++
     count === 5 ? resolve() : null
   })
   gulp.src([
     'node_modules/ionic-release/fonts/*',
     'tools/libs/fonts/teambition*'
   ])
     .pipe(gulp.dest(`www/fonts/`))
     .on('end', () => {
       count ++
       count === 5 ? resolve() : null
     })
   gulp.src('node_modules/ionic-release/css/ionic.css')
     .pipe(concat('lib.css'))
     .pipe(gulp.dest(`www/css/`))
     .on('end', () => {
       count ++
       count === 5 ? resolve() : null
     })
 })
開發者ID:jianxc,項目名稱:teambition-mobile-web,代碼行數:35,代碼來源:static.ts

示例2: tsCompile

task('e2e.bundle', function () {
  return tsCompile(getTscOptions('es6'), 'system')
    .pipe(babel(babelOptions))
    .pipe(remember('system'))
    .pipe(concat('ionic.system.js'))
    .pipe(dest(`${DIST_NAME}/bundles`))
    .pipe(connect.reload());
});
開發者ID:fsdn,項目名稱:ionic,代碼行數:8,代碼來源:e2e.dev.ts

示例3: Promise

 return new Promise((resolve, reject) => {
   gulp.src('./src/components/et/**/*.html')
     .pipe(compile())
     .pipe(concat('et.js'))
     .pipe(gulp.dest('.tmp/scripts/et/'))
     .on('end', () => {
       resolve()
     })
 })
開發者ID:jianxc,項目名稱:teambition-mobile-web,代碼行數:9,代碼來源:build.et.ts

示例4:

gulp.task("index", [], () => {
    // Combine external scripts into single file
    gulp.src(config.SCRIPT_DEPENDENCIES)
        .pipe(sourcemaps.init())
        .pipe(concat(config.SCRIPT_COMBINED))
        .pipe(sourcemaps.write("."))
        .pipe(gulp.dest(config.APP_DIST));

    // Combine external styles into single file
    gulp.src(config.STYLES_DEPENDENCIES)
        .pipe(sourcemaps.init())
        .pipe(concat(config.STYLES_COMBINED))
        .pipe(sourcemaps.write("."))
        .pipe(gulp.dest(config.APP_DIST));

    // Copy all HTML files
    gulp.src(join(config.APP_SRC, "**/*.html"))
        .pipe(gulp.dest(config.APP_DIST));
});
開發者ID:GreenGeckoZA,項目名稱:Samples,代碼行數:19,代碼來源:Gulpfile.ts

示例5: default

export default (target: string) => {
  const paths = {
    less: [
      './src/less/*.less',
      './src/components/**/*.less',
      `./src/${target}/**/*.less`
    ],
    tbui: [
      './src/less/tb-fonts-variables.less',
      './tools/libs/less/teambition-ui-variables.less',
      './tools/libs/less/teambition-ui-icons.less'
    ]
  }

  const stream = merge2(
    gulp.src(paths.tbui)
      .pipe(concat('tbui.less'))
      .pipe(logError(less())),
    gulp.src(paths.less)
      .pipe(sourcemaps.init({
        loadMaps: true
      }))
      .pipe(logError(less()))
      .pipe(sourcemaps.write())
  )
  .pipe(sourcemaps.init({
    loadMaps: true
  }))
  .pipe(concat('app.css'))
  .pipe(autoprefixer({
    browsers: ['last 2 versions']
  }))
  .pipe(sourcemaps.write())
  .pipe(gulp.dest(`www/css/`))

  return new Promise((resolve, reject) => {
    stream.on('end', () => {
      gutil.log(gutil.colors.yellow('complete less'))
      resolve()
    })
  })
}
開發者ID:jianxc,項目名稱:teambition-mobile-web,代碼行數:42,代碼來源:less.ts

示例6: task

            task(`concat-${taskPostfix}`, [type === 'min' ? 'uglify' : 'babel'], function (done) {
                const stream = gulp.src([vendorPath, getName(bundlePath), getName(templatePath)])
                    .pipe(concat(jsFileName))
                    .pipe(gulp.dest(`${targetPath}/js`));

                stream.on('end', function () {
                    readFile(`${targetPath}/js/${jsFileName}`, { encoding: 'utf8' }).then((file) => {
                        outputFile(`${targetPath}/js/${jsFileName}`, file)
                            .then(() => done());
                    });
                });
            });
開發者ID:beregovoy68,項目名稱:WavesGUI,代碼行數:12,代碼來源:gulpfile.ts

示例7: merge

task('demos.bundle', function () {
  var tsResult = tsCompile(getTscOptions('es6'), 'system')
    .pipe(babel(babelOptions));

  var swiper = src('src/components/slides/swiper-widget.system.js');

  return merge([tsResult, swiper])
    .pipe(remember('system'))
    .pipe(concat('ionic.system.js'))
    .pipe(dest(`${DIST_NAME}/bundles`))
    .pipe(connect.reload());
});
開發者ID:birdplane9527,項目名稱:ionic,代碼行數:12,代碼來源:demos.dev.ts

示例8: filter

gulp.task('default', () => {
    const jsFilter = filter('**/*.js', {restore: true});
    const lessFilter = filter('**/*.less', {restore: true});

    return gulp.src('assets/**')
        .pipe(jsFilter)
        .pipe(concat('bundle.js'))
        .pipe(jsFilter.restore)
        .pipe(lessFilter)
        .pipe(less())
        .pipe(lessFilter.restore)
        .pipe(gulp.dest('out/'));
});
開發者ID:AbraaoAlves,項目名稱:DefinitelyTyped,代碼行數:13,代碼來源:gulp-filter-tests.ts

示例9:

gulp.task('css', () => {
  const files = [
    paths.build + '/**/*.css',
    paths.node_modules + '/ng2-material/ng2-material.css',
    paths.node_modules + '/ng2-material/font/font.css'
  ]
  gulp.src(files)
    .pipe(sourcemaps.init())
    .pipe(concat('app.css'))
    //.pipe(cssmin())
    //.on('error', handleErrors)
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.build + '/app'));
});
開發者ID:Sacret,項目名稱:redmine-charts-ng2,代碼行數:14,代碼來源:gulpfile.ts

示例10: task

            task(`concat-${taskPostfix}`, [type === 'min' ? 'uglify' : 'babel'], function (done) {
                const stream = gulp.src([vendorPath, getName(bundlePath), getName(templatePath)])
                    .pipe(concat(jsFileName))
                    .pipe(gulp.dest(join(targetPath, 'js')));

                stream.on('end', function () {
                    readFile(join(targetPath, 'js', jsFileName), { encoding: 'utf8' }).then((file) => {
                        if (buildName === 'desktop') {
                            file = `(function () {\nvar module = undefined;\n${file}})();`;
                        }
                        outputFile(join(targetPath, 'js', jsFileName), file)
                            .then(() => done());
                    });
                });
            });
開發者ID:wavesplatform,項目名稱:WavesGUI,代碼行數:15,代碼來源:gulpfile.ts


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