-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
32 lines (26 loc) · 1.06 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var gulp = require('gulp');
var TaskFactory = require('./src/task_factory');
var ProxyFactory = require('./src/proxy_factory');
var GulpPluginRegistery = require('./src/gulp_plugin_registry');
var PluginRegistry = require('./src/plugin_registry');
var Guzzle = function() {
var pluginRegistry = new PluginRegistry();
pluginRegistry.register('dest', require('./src/plugins/dest'));
pluginRegistry.register('merge', require('./src/plugins/merge'));
pluginRegistry.register('on', require('./src/plugins/on'));
pluginRegistry.register('pipe', require('./src/plugins/pipe'));
pluginRegistry.register('src', require('./src/plugins/src'));
var gulpPlugins = new GulpPluginRegistery();
var proxyFactory = new ProxyFactory(gulpPlugins, pluginRegistry);
var taskFactory = new TaskFactory(gulpPlugins, pluginRegistry);
return {
task: taskFactory.build,
src: function() {
var proxy = proxyFactory.build();
return proxy.src.apply(null, arguments);
},
register: gulpPlugins.register
};
};
var guzzle = new Guzzle();
module.exports = guzzle;