app-bundler 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bundler.js +7 -0
- package/lib/cli.js +7 -0
- package/package.json +1 -1
package/lib/bundler.js
CHANGED
|
@@ -2615,6 +2615,7 @@ class SolutionOpts extends SolutionOptsBase {
|
|
|
2615
2615
|
mainPage: 'main',
|
|
2616
2616
|
mainBundle: '',
|
|
2617
2617
|
mainContent: null,
|
|
2618
|
+
ignore: null,
|
|
2618
2619
|
outputBase: '',
|
|
2619
2620
|
outputAppBase: '/',
|
|
2620
2621
|
output: '',
|
|
@@ -11605,6 +11606,12 @@ var ResourceLoader;
|
|
|
11605
11606
|
? Configuration_1.Configuration.Instance.get('readDirectory')
|
|
11606
11607
|
: Configuration_1.Configuration.Instance.get('readFile');
|
|
11607
11608
|
let content = await reader(this.resource.filename, this.opts);
|
|
11609
|
+
if (this.resource.isGlob && Array.isArray(content) && this.solution.opts.ignore) {
|
|
11610
|
+
let rgxArr = this.solution.opts.ignore.map(path => new RegExp(path, 'i'));
|
|
11611
|
+
content = content.filter(path => {
|
|
11612
|
+
return rgxArr.some(rgx => rgx.test(path)) === false;
|
|
11613
|
+
});
|
|
11614
|
+
}
|
|
11608
11615
|
let handler = this.solution.handlers.find(x => x.parser.accepts(this.resource.type));
|
|
11609
11616
|
if (((_a = handler === null || handler === void 0 ? void 0 : handler.parser) === null || _a === void 0 ? void 0 : _a.transpile) != null) {
|
|
11610
11617
|
let result = await handler.parser.transpile(content, this.resource);
|
package/lib/cli.js
CHANGED
|
@@ -2617,6 +2617,7 @@ class SolutionOpts extends SolutionOptsBase {
|
|
|
2617
2617
|
mainPage: 'main',
|
|
2618
2618
|
mainBundle: '',
|
|
2619
2619
|
mainContent: null,
|
|
2620
|
+
ignore: null,
|
|
2620
2621
|
outputBase: '',
|
|
2621
2622
|
outputAppBase: '/',
|
|
2622
2623
|
output: '',
|
|
@@ -11607,6 +11608,12 @@ var ResourceLoader;
|
|
|
11607
11608
|
? Configuration_1.Configuration.Instance.get('readDirectory')
|
|
11608
11609
|
: Configuration_1.Configuration.Instance.get('readFile');
|
|
11609
11610
|
let content = await reader(this.resource.filename, this.opts);
|
|
11611
|
+
if (this.resource.isGlob && Array.isArray(content) && this.solution.opts.ignore) {
|
|
11612
|
+
let rgxArr = this.solution.opts.ignore.map(path => new RegExp(path, 'i'));
|
|
11613
|
+
content = content.filter(path => {
|
|
11614
|
+
return rgxArr.some(rgx => rgx.test(path)) === false;
|
|
11615
|
+
});
|
|
11616
|
+
}
|
|
11610
11617
|
let handler = this.solution.handlers.find(x => x.parser.accepts(this.resource.type));
|
|
11611
11618
|
if (((_a = handler === null || handler === void 0 ? void 0 : handler.parser) === null || _a === void 0 ? void 0 : _a.transpile) != null) {
|
|
11612
11619
|
let result = await handler.parser.transpile(content, this.resource);
|