本文整理匯總了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();
};
示例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 }))
})
示例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
示例4: task
export function task(taskname: string, option?: string) {
return require(join('..', 'tasks', taskname))(gulp, plugins(), option);
}
示例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);
}
示例6: task
export function task(taskname: string, option?: string) {
return require(join('.', 'gulp', taskname))(gulp, gulpLoadPlugins(), option);
}
示例7: tasks
function tasks(task: string, option?: string) {
return require('./tools/tasks/' + task)(gulp, plugins(), option);
}
示例8: task
export function task(taskname: string, option?: string) {
return require(join("..", "tasks", taskname))(gulp, gulpLoaderPlugins(), option);
}
示例9: task
export function task(name: string, option?: string) {
util.log('Loading task', chalk.yellow(name, option || ''));
return require(`../tasks/${name}`)(gulp, plugins(), option);
};