@roots/bud-compiler 5.0.0-next.11 → 5.0.0-next.15
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/README.md +1 -5
- package/lib/cjs/Compiler/index.js +31 -22
- package/lib/cjs/Compiler/index.js.map +1 -1
- package/lib/esm/Compiler/index.js +31 -22
- package/lib/esm/Compiler/index.js.map +1 -1
- package/lib/tsconfig-esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -6
- package/types/Compiler/index.d.ts +2 -2
- package/types/Compiler/index.d.ts.map +1 -1
package/README.md
CHANGED
@@ -67,8 +67,4 @@ Help support our open-source development efforts by [becoming a patron](https://
|
|
67
67
|
<a href="https://carrot.com/"><img src="https://cdn.roots.io/app/uploads/carrot.svg" alt="Carrot" width="200" height="150"/></a>
|
68
68
|
<a href="https://www.c21redwood.com/"><img src="https://cdn.roots.io/app/uploads/c21redwood.svg" alt="C21 Redwood Realty" width="200" height="150"/></a>
|
69
69
|
<a href="https://wordpress.com/"><img src="https://cdn.roots.io/app/uploads/wordpress.svg" alt="WordPress.com" width="200" height="150"/></a>
|
70
|
-
<a href="https://
|
71
|
-
<a href="https://www.harnessup.com/"><img src="https://cdn.roots.io/app/uploads/harness-software.svg" alt="Harness Software" width="200" height="150"/></a>
|
72
|
-
<a href="https://www.codersclan.com/"><img src="https://cdn.roots.io/app/uploads/coders-clan.svg" alt="Coders Clan" width="200" height="150"/></a>
|
73
|
-
<a href="https://generodigital.com/"><img src="https://cdn.roots.io/app/uploads/genero.svg" alt="Genero" width="200" height="150"/></a>
|
74
|
-
<a href="https://motto.ca/roots"><img src="https://cdn.roots.io/app/uploads/motto.svg" alt="Motto" width="200" height="150"/></a>
|
70
|
+
<a href="https://pantheon.io/"><img src="https://cdn.roots.io/app/uploads/pantheon.svg" alt="Pantheon" width="200" height="150"/></a>
|
@@ -6,7 +6,6 @@ const bud_framework_1 = require("@roots/bud-framework");
|
|
6
6
|
const bud_support_1 = require("@roots/bud-support");
|
7
7
|
const webpack_1 = require("webpack");
|
8
8
|
const { isFunction } = bud_support_1.lodash;
|
9
|
-
const helpful_decorators_1 = require("helpful-decorators");
|
10
9
|
/**
|
11
10
|
* Initial state
|
12
11
|
*
|
@@ -43,13 +42,16 @@ class Compiler extends bud_framework_1.Service {
|
|
43
42
|
this.config = [];
|
44
43
|
}
|
45
44
|
/**
|
46
|
-
*
|
45
|
+
* Service register event
|
47
46
|
*
|
48
47
|
* @public
|
49
48
|
* @decorator `@bind`
|
50
49
|
*/
|
51
50
|
register() {
|
52
|
-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
51
|
+
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
52
|
+
this.app.hooks.filter('event.compiler.register.before', this.app);
|
53
|
+
this.app.hooks.filter('event.compiler.register.after', this.app);
|
54
|
+
});
|
53
55
|
}
|
54
56
|
/**
|
55
57
|
* Initiates compilation
|
@@ -62,7 +64,7 @@ class Compiler extends bud_framework_1.Service {
|
|
62
64
|
compile() {
|
63
65
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
64
66
|
const config = yield this.before();
|
65
|
-
const compiler = yield this.
|
67
|
+
const compiler = yield this.invoke(config);
|
66
68
|
this.app.timeEnd('bud');
|
67
69
|
return compiler;
|
68
70
|
});
|
@@ -71,34 +73,40 @@ class Compiler extends bud_framework_1.Service {
|
|
71
73
|
* @public
|
72
74
|
* @decorator `@bind`
|
73
75
|
*/
|
74
|
-
|
76
|
+
invoke(config) {
|
75
77
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
76
|
-
this.app.hooks.
|
78
|
+
config = yield this.app.hooks.promised('event.compiler.before', config);
|
79
|
+
config = this.app.hooks.filter('config.override', config);
|
77
80
|
this.instance = (0, webpack_1.webpack)(config);
|
78
81
|
this.instance.hooks.done.tap(config[0].name, (stats) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
79
|
-
|
82
|
+
yield this.app.hooks.filter('event.compiler.done', stats);
|
80
83
|
stats && Object.assign(this.stats, stats.toJson());
|
84
|
+
if (this.app.store.is('features.dashboard', false)) {
|
85
|
+
this.log('log', stats.toString({
|
86
|
+
colors: true,
|
87
|
+
modules: false,
|
88
|
+
children: false,
|
89
|
+
chunks: false,
|
90
|
+
chunkModules: false,
|
91
|
+
entrypoints: false,
|
92
|
+
performance: false,
|
93
|
+
}));
|
94
|
+
}
|
81
95
|
if (this.app.isProduction) {
|
82
96
|
this.instance.close(err => {
|
83
97
|
if (err) {
|
98
|
+
err = this.app.hooks.filter('compiler.error', err);
|
84
99
|
this.stats.errors.push(err);
|
85
100
|
this.log('error', err);
|
86
101
|
}
|
87
|
-
this.app.close(
|
102
|
+
!this.app.dashboard.instance && this.app.close();
|
88
103
|
});
|
89
104
|
}
|
90
|
-
else {
|
91
|
-
((_b = (_a = this.app.server.middlewareStack) === null || _a === void 0 ? void 0 : _a.hot) === null || _b === void 0 ? void 0 : _b.publish) &&
|
92
|
-
this.app.server.middlewareStack.hot.publish({
|
93
|
-
action: 'webpack_stats',
|
94
|
-
data: { stats: this.stats },
|
95
|
-
});
|
96
|
-
}
|
97
105
|
}));
|
98
106
|
new webpack_1.ProgressPlugin((...args) => {
|
99
107
|
this.progress = args;
|
100
108
|
}).apply(this.instance);
|
101
|
-
this.app.hooks.filter('
|
109
|
+
this.app.hooks.filter('event.compiler.after');
|
102
110
|
return this.instance;
|
103
111
|
});
|
104
112
|
}
|
@@ -157,13 +165,13 @@ class Compiler extends bud_framework_1.Service {
|
|
157
165
|
* here we parse the callback args so that we dont have to
|
158
166
|
* duplicate the callback.
|
159
167
|
*/
|
160
|
-
|
168
|
+
let [err, stats] = args.length > 1 ? args : [null, args.pop()];
|
161
169
|
if ((stats === null || stats === void 0 ? void 0 : stats.toJson) && isFunction(stats.toJson)) {
|
162
170
|
this.stats = stats.toJson((_a = this.app.build.config.stats) !== null && _a !== void 0 ? _a : { preset: 'normal' });
|
163
|
-
this.app.
|
164
|
-
this.app.log(stats.toString());
|
171
|
+
this.stats = this.app.hooks.filter('compiler.stats', this.stats);
|
165
172
|
}
|
166
173
|
if (err) {
|
174
|
+
err = this.app.hooks.filter('compiler.error', err);
|
167
175
|
this.stats.errors.push(err);
|
168
176
|
this.app.store.is('features.dashboard', false) &&
|
169
177
|
this.log('error', err);
|
@@ -174,14 +182,15 @@ class Compiler extends bud_framework_1.Service {
|
|
174
182
|
bud_support_1.bind
|
175
183
|
], Compiler.prototype, "register", null);
|
176
184
|
(0, tslib_1.__decorate)([
|
177
|
-
bud_support_1.bind
|
185
|
+
bud_support_1.bind,
|
186
|
+
bud_support_1.once
|
178
187
|
], Compiler.prototype, "compile", null);
|
179
188
|
(0, tslib_1.__decorate)([
|
180
189
|
bud_support_1.bind
|
181
|
-
], Compiler.prototype, "
|
190
|
+
], Compiler.prototype, "invoke", null);
|
182
191
|
(0, tslib_1.__decorate)([
|
183
192
|
bud_support_1.bind,
|
184
|
-
|
193
|
+
bud_support_1.once
|
185
194
|
], Compiler.prototype, "before", null);
|
186
195
|
(0, tslib_1.__decorate)([
|
187
196
|
bud_support_1.bind
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Compiler/index.ts"],"names":[],"mappings":";;;;AAAA,wDAG6B;AAC7B,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Compiler/index.ts"],"names":[],"mappings":";;;;AAAA,wDAG6B;AAC7B,oDAAqD;AACrD,qCAAiE;AACjE,MAAM,EAAC,UAAU,EAAC,GAAG,oBAAM,CAAA;AAE3B;;;;GAIG;AACH,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;CACb,CAAA;AAED;;;;GAIG;AACH,MAAa,QAAS,SAAQ,uBAAO;IAArC;;QAQE;;;;WAIG;QACI,UAAK,GAAqB,aAAa,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ind, lodash } from '@roots/bud-support';
|
3
|
+
import { bind, lodash, once } from '@roots/bud-support';
|
4
4
|
import { ProgressPlugin, webpack } from 'webpack';
|
5
5
|
const { isFunction } = lodash;
|
6
|
-
import { once } from 'helpful-decorators';
|
7
6
|
/**
|
8
7
|
* Initial state
|
9
8
|
*
|
@@ -40,13 +39,16 @@ export class Compiler extends Service {
|
|
40
39
|
this.config = [];
|
41
40
|
}
|
42
41
|
/**
|
43
|
-
*
|
42
|
+
* Service register event
|
44
43
|
*
|
45
44
|
* @public
|
46
45
|
* @decorator `@bind`
|
47
46
|
*/
|
48
47
|
register() {
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
49
|
+
this.app.hooks.filter('event.compiler.register.before', this.app);
|
50
|
+
this.app.hooks.filter('event.compiler.register.after', this.app);
|
51
|
+
});
|
50
52
|
}
|
51
53
|
/**
|
52
54
|
* Initiates compilation
|
@@ -59,7 +61,7 @@ export class Compiler extends Service {
|
|
59
61
|
compile() {
|
60
62
|
return __awaiter(this, void 0, void 0, function* () {
|
61
63
|
const config = yield this.before();
|
62
|
-
const compiler = yield this.
|
64
|
+
const compiler = yield this.invoke(config);
|
63
65
|
this.app.timeEnd('bud');
|
64
66
|
return compiler;
|
65
67
|
});
|
@@ -68,34 +70,40 @@ export class Compiler extends Service {
|
|
68
70
|
* @public
|
69
71
|
* @decorator `@bind`
|
70
72
|
*/
|
71
|
-
|
73
|
+
invoke(config) {
|
72
74
|
return __awaiter(this, void 0, void 0, function* () {
|
73
|
-
this.app.hooks.
|
75
|
+
config = yield this.app.hooks.promised('event.compiler.before', config);
|
76
|
+
config = this.app.hooks.filter('config.override', config);
|
74
77
|
this.instance = webpack(config);
|
75
78
|
this.instance.hooks.done.tap(config[0].name, (stats) => __awaiter(this, void 0, void 0, function* () {
|
76
|
-
|
79
|
+
yield this.app.hooks.filter('event.compiler.done', stats);
|
77
80
|
stats && Object.assign(this.stats, stats.toJson());
|
81
|
+
if (this.app.store.is('features.dashboard', false)) {
|
82
|
+
this.log('log', stats.toString({
|
83
|
+
colors: true,
|
84
|
+
modules: false,
|
85
|
+
children: false,
|
86
|
+
chunks: false,
|
87
|
+
chunkModules: false,
|
88
|
+
entrypoints: false,
|
89
|
+
performance: false,
|
90
|
+
}));
|
91
|
+
}
|
78
92
|
if (this.app.isProduction) {
|
79
93
|
this.instance.close(err => {
|
80
94
|
if (err) {
|
95
|
+
err = this.app.hooks.filter('compiler.error', err);
|
81
96
|
this.stats.errors.push(err);
|
82
97
|
this.log('error', err);
|
83
98
|
}
|
84
|
-
this.app.close(
|
99
|
+
!this.app.dashboard.instance && this.app.close();
|
85
100
|
});
|
86
101
|
}
|
87
|
-
else {
|
88
|
-
((_b = (_a = this.app.server.middlewareStack) === null || _a === void 0 ? void 0 : _a.hot) === null || _b === void 0 ? void 0 : _b.publish) &&
|
89
|
-
this.app.server.middlewareStack.hot.publish({
|
90
|
-
action: 'webpack_stats',
|
91
|
-
data: { stats: this.stats },
|
92
|
-
});
|
93
|
-
}
|
94
102
|
}));
|
95
103
|
new ProgressPlugin((...args) => {
|
96
104
|
this.progress = args;
|
97
105
|
}).apply(this.instance);
|
98
|
-
this.app.hooks.filter('
|
106
|
+
this.app.hooks.filter('event.compiler.after');
|
99
107
|
return this.instance;
|
100
108
|
});
|
101
109
|
}
|
@@ -154,13 +162,13 @@ export class Compiler extends Service {
|
|
154
162
|
* here we parse the callback args so that we dont have to
|
155
163
|
* duplicate the callback.
|
156
164
|
*/
|
157
|
-
|
165
|
+
let [err, stats] = args.length > 1 ? args : [null, args.pop()];
|
158
166
|
if ((stats === null || stats === void 0 ? void 0 : stats.toJson) && isFunction(stats.toJson)) {
|
159
167
|
this.stats = stats.toJson((_a = this.app.build.config.stats) !== null && _a !== void 0 ? _a : { preset: 'normal' });
|
160
|
-
this.app.
|
161
|
-
this.app.log(stats.toString());
|
168
|
+
this.stats = this.app.hooks.filter('compiler.stats', this.stats);
|
162
169
|
}
|
163
170
|
if (err) {
|
171
|
+
err = this.app.hooks.filter('compiler.error', err);
|
164
172
|
this.stats.errors.push(err);
|
165
173
|
this.app.store.is('features.dashboard', false) &&
|
166
174
|
this.log('error', err);
|
@@ -171,11 +179,12 @@ __decorate([
|
|
171
179
|
bind
|
172
180
|
], Compiler.prototype, "register", null);
|
173
181
|
__decorate([
|
174
|
-
bind
|
182
|
+
bind,
|
183
|
+
once
|
175
184
|
], Compiler.prototype, "compile", null);
|
176
185
|
__decorate([
|
177
186
|
bind
|
178
|
-
], Compiler.prototype, "
|
187
|
+
], Compiler.prototype, "invoke", null);
|
179
188
|
__decorate([
|
180
189
|
bind,
|
181
190
|
once
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Compiler/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,OAAO,GACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,oBAAoB,CAAA;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Compiler/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,OAAO,GACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAC,cAAc,EAAoB,OAAO,EAAC,MAAM,SAAS,CAAA;AACjE,MAAM,EAAC,UAAU,EAAC,GAAG,MAAM,CAAA;AAE3B;;;;GAIG;AACH,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,OAAO,QAAS,SAAQ,OAAO;IAArC;;QAQE;;;;WAIG;QACI,UAAK,GAAqB,aAAa,CAAA;QAS9C;;;;WAIG;QACI,eAAU,GAAY,KAAK,CAAA;QAElC;;WAEG;QACI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