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


TypeScript gulp-load-plugins類代碼示例

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


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

示例1: gulpLoadPlugins

import * as gulpLoadPlugins from "gulp-load-plugins";
import * as util from "gulp-util";

const plugins: any = gulpLoadPlugins();

/**
 * This task runs the xmpl modifier scripts
 * It will modify the input xml files so they are in the correct format to be read by the commadns generator script.
 */
export = () => {
  return plugins.run("../tools/commandsGenerator/ModifyXMLs.ps1", {usePowerShell :true} ).exec();
};
開發者ID:gesh123,項目名稱:MyLibrary,代碼行數:12,代碼來源:generate.commands.modify.xmls.ts

示例2: gulpLoadPlugins

import * as gulp from 'gulp'
import * as gulpLoadPlugins from 'gulp-load-plugins'
import * as runSequence from 'run-sequence'

const $ = gulpLoadPlugins()

gulp.task('chromeManifest', ['js'], () => {
  return gulp
    .src('app/manifest.json')
    .pipe(
      $.chromeManifest({
        buildnumber: true,
        background: {
          target: 'scripts/background.js',
          exclude: ['scripts/chromereload.js']
        }
      })
    )
    .pipe(gulp.dest('dist'))
})

gulp.task('js', () => {
  return gulp
    .src(['app/scripts/options.js', 'app/scripts/popup.js'])
    .pipe(gulp.dest('dist/scripts'))
})

gulp.task('size', () => {
  return gulp.src('dist/**/*').pipe($.size({ title: 'build', gzip: true }))
})
開發者ID:taka-sho,項目名稱:userdive-tag-paster,代碼行數:30,代碼來源:gulpfile.ts

示例3:

/// <reference path="../gulp-concat/gulp-concat" />
/// <reference path="gulp-load-plugins" />

import * as gulp from 'gulp';
import * as gulpConcat from 'gulp-concat';
import * as gulpLoadPlugins from 'gulp-load-plugins';

interface GulpPlugins extends IGulpPlugins {
	concat: typeof gulpConcat;
}

var plugins = gulpLoadPlugins<GulpPlugins>({
    pattern: ['gulp-*', 'gulp.*'],
    config: 'package.json',
    scope: ['dependencies', 'devDependencies', 'peerDependencies'],
    replaceString: /^gulp(-|\.)/,
    camelize: true,
    lazy: true,
    rename: {}
});
plugins = gulpLoadPlugins<GulpPlugins>();

gulp.task('taskName', () => {
	gulp.src('*.*')
		.pipe(plugins.concat('concatenated.js'))
		.pipe(gulp.dest('output'));
});

/*
 * From 0.8.0, you can pass in an object of mappings for renaming plugins. For example,
 * imagine you want to load the  gulp-ruby-sass  plugin, but want to refer to it as just
開發者ID:0815fox,項目名稱:DefinitelyTyped,代碼行數:31,代碼來源:gulp-load-plugins-tests.ts

示例4: task

export function task(taskname: string, option?: string) {
  return require(join('..', 'tasks', taskname))(gulp, plugins(), option);
}
開發者ID:hjc879227,項目名稱:angular2-hot-loader-demo,代碼行數:3,代碼來源:tasks-tools.ts

示例5: task

export function task(taskName: string, option?: string) {
  util.log('loading task', chalk.yellow(taskName, option || ''));
  return require(join('..', 'tasks', taskName))(gulp, gulpLoadPlugins(), option);
}
開發者ID:JayKan,項目名稱:angular2-dashboard,代碼行數:4,代碼來源:tasks_tools.ts

示例6: task

export function task(taskname: string, option?: string) {
  return require(join('.', 'gulp', taskname))(gulp, gulpLoadPlugins(), option);
}
開發者ID:destyjustc,項目名稱:agl2-research,代碼行數:3,代碼來源:gulpfile.ts

示例7: tasks

function tasks(task: string, option?: string) {
  return require('./tools/tasks/' + task)(gulp, plugins(), option);
}
開發者ID:Anhmike,項目名稱:hotelbooking-angular2,代碼行數:3,代碼來源:gulpfile.ts

示例8: task

export function task(taskname: string, option?: string) {
  return require(join("..", "tasks", taskname))(gulp, gulpLoaderPlugins(), option);
}
開發者ID:wuyingki,項目名稱:angular2-seed,代碼行數:3,代碼來源:tasks_tools.ts

示例9: task

export function task(name: string, option?: string) {
    util.log('Loading task', chalk.yellow(name, option || ''));

    return require(`../tasks/${name}`)(gulp, plugins(), option);
};
開發者ID:fellswoop,項目名稱:angular-project-template,代碼行數:5,代碼來源:tasks.ts


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