本文整理汇总了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);
};