wallaby-webpack
Advanced tools
Comparing version 0.0.31 to 0.0.32
19
index.js
@@ -37,3 +37,5 @@ 'use strict'; | ||
this._entryPatterns = this._opts.entryPatterns; | ||
this._preserveEntryFileLoadOrder = this._opts.preserveEntryFileLoadOrder; | ||
delete this._opts.entryPatterns; | ||
delete this._opts.preserveEntryFileLoadOrder; | ||
@@ -90,8 +92,8 @@ if (this._entryPatterns && _.isString(this._entryPatterns)) { | ||
: _.sortBy(_.filter(self._allTrackedFiles, file => { | ||
var satisfiesAnyEntryPattern = _.find(self._entryPatterns, (pattern, patternIndex) => (file.patternIndex = patternIndex, mm(file.path, pattern))); | ||
if (!satisfiesAnyEntryPattern) { | ||
delete file.patternIndex; | ||
} | ||
return satisfiesAnyEntryPattern; | ||
}), 'patternIndex'), | ||
var satisfiesAnyEntryPattern = _.find(self._entryPatterns, (pattern, patternIndex) => (file.patternIndex = patternIndex, mm(file.path, pattern))); | ||
if (!satisfiesAnyEntryPattern) { | ||
delete file.patternIndex; | ||
} | ||
return satisfiesAnyEntryPattern; | ||
}), 'patternIndex'), | ||
function (memo, file) { | ||
@@ -211,6 +213,7 @@ delete file.patternIndex; | ||
if (self._entryPatterns && self._entryFiles && !_.isEmpty(self._entryFiles)) { | ||
var entryFilesToLoad = _.values(self._entryFiles); | ||
createFilePromises.push(wallaby.createFile({ | ||
order: Infinity, | ||
order: self._preserveEntryFileLoadOrder ? entryFilesToLoad[0].order : Infinity, | ||
path: 'wallaby_webpack_entry.js', | ||
content: _.reduce(_.values(self._entryFiles), | ||
content: _.reduce(entryFilesToLoad, | ||
(memo, file) => memo + (file.test ? '' : 'window.__moduleBundler.require(' + JSON.stringify(self._moduleIdByPath[file.fullPath]) + ');'), '') | ||
@@ -217,0 +220,0 @@ })); |
{ | ||
"name": "wallaby-webpack", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "Webpack postprocessor for wallaby.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18850
362