touch ups
This commit is contained in:
parent
31e82e31d0
commit
83f97407e8
|
@ -18,6 +18,7 @@ class Pipeline {
|
|||
this.events = options.events;
|
||||
this.logger = options.logger;
|
||||
this.plugins = options.plugins;
|
||||
this.pipelinePlugins = this.plugins.getPluginsFor('pipeline');
|
||||
}
|
||||
|
||||
build(abi, contractsJSON, path, callback) {
|
||||
|
@ -57,6 +58,7 @@ class Pipeline {
|
|||
function (file, fileCb) {
|
||||
self.logger.trace("reading " + file.filename);
|
||||
|
||||
// Not a JS file
|
||||
if (file.filename.indexOf('.js') < 0) {
|
||||
return file.content(function (fileContent) {
|
||||
self.runPlugins(file, fileContent, fileCb);
|
||||
|
@ -73,10 +75,7 @@ class Pipeline {
|
|||
webpackProcess.on('message', function (msg) {
|
||||
if (msg.result === constants.pipeline.built) {
|
||||
webpackProcess.disconnect();
|
||||
if (msg.error) {
|
||||
return next(msg.error);
|
||||
}
|
||||
return next();
|
||||
return next(msg.error);
|
||||
}
|
||||
|
||||
if (msg.result === constants.pipeline.log) {
|
||||
|
@ -154,11 +153,10 @@ class Pipeline {
|
|||
|
||||
runPlugins(file, fileContent, fileCb) {
|
||||
const self = this;
|
||||
let pipelinePlugins = self.plugins.getPluginsFor('pipeline');
|
||||
if (pipelinePlugins.length <= 0) {
|
||||
if (self.pipelinePlugins.length <= 0) {
|
||||
return fileCb(null, {content: fileContent, filename: file.filename, path: file.path, basedir: file.basedir, modified: true});
|
||||
}
|
||||
async.eachSeries(pipelinePlugins,
|
||||
async.eachSeries(self.pipelinePlugins,
|
||||
function(plugin, pluginCB) {
|
||||
if (file.options && file.options.skipPipeline) {
|
||||
return pluginCB();
|
||||
|
|
Loading…
Reference in New Issue