@roots/bud-build 5.3.2 → 5.6.0
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 -1
- package/lib/cjs/Build/config/builder.js +117 -0
- package/lib/cjs/Build/config/builder.unwrap.js +35 -0
- package/lib/cjs/Build/config/filenameFormat.js +17 -0
- package/lib/cjs/Build/config/index.js +24 -0
- package/lib/cjs/Build/index.js +157 -50
- package/lib/cjs/Build/items.js +101 -111
- package/lib/cjs/Build/loaders.js +55 -53
- package/lib/cjs/Build/rules.js +18 -25
- package/lib/cjs/Item/index.js +36 -24
- package/lib/cjs/Loader/index.js +10 -56
- package/lib/cjs/Rule/index.js +29 -43
- package/lib/cjs/index.js +1 -8
- package/lib/cjs/shared/Base.js +10 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/types/Build/config/builder.d.ts +15 -0
- package/types/Build/config/builder.d.ts.map +1 -0
- package/types/Build/config/builder.unwrap.d.ts +19 -0
- package/types/Build/config/builder.unwrap.d.ts.map +1 -0
- package/types/Build/config/filenameFormat.d.ts +13 -0
- package/types/Build/config/filenameFormat.d.ts.map +1 -0
- package/types/Build/config/index.d.ts +3 -0
- package/types/Build/config/index.d.ts.map +1 -0
- package/types/Build/index.d.ts +66 -15
- package/types/Build/index.d.ts.map +1 -1
- package/types/Build/items.d.ts +62 -71
- package/types/Build/items.d.ts.map +1 -1
- package/types/Build/loaders.d.ts +45 -54
- package/types/Build/loaders.d.ts.map +1 -1
- package/types/Build/rules.d.ts +13 -14
- package/types/Build/rules.d.ts.map +1 -1
- package/types/Item/index.d.ts +19 -11
- package/types/Item/index.d.ts.map +1 -1
- package/types/Loader/index.d.ts +10 -24
- package/types/Loader/index.d.ts.map +1 -1
- package/types/Rule/index.d.ts +25 -33
- package/types/Rule/index.d.ts.map +1 -1
- package/types/index.d.ts +1 -8
- package/types/index.d.ts.map +1 -1
- package/types/shared/Base.d.ts +5 -1
- package/types/shared/Base.d.ts.map +1 -1
- package/lib/cjs/Build/config.js +0 -265
- package/lib/cjs/Item/item.dependencies.js +0 -6
- package/lib/cjs/Item/item.interface.js +0 -7
- package/types/Build/config.d.ts +0 -10
- package/types/Build/config.d.ts.map +0 -1
- package/types/Item/item.dependencies.d.ts +0 -4
- package/types/Item/item.dependencies.d.ts.map +0 -1
- package/types/Item/item.interface.d.ts +0 -2
- package/types/Item/item.interface.d.ts.map +0 -1
package/types/Rule/index.d.ts
CHANGED
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
import { Framework,
|
|
1
|
+
import { Framework, Items, Rule as Contract } from '@roots/bud-framework';
|
|
2
2
|
import { Base } from '../shared/Base';
|
|
3
|
+
export declare namespace Rule {
|
|
4
|
+
type ConstructorOptions = Partial<Contract.Options>;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Framework Rule
|
|
5
8
|
*
|
|
6
9
|
* @public
|
|
7
10
|
*/
|
|
8
|
-
export declare class Rule extends Base implements
|
|
9
|
-
app: Framework;
|
|
11
|
+
export declare class Rule extends Base implements Contract {
|
|
10
12
|
/**
|
|
11
13
|
* {@inheritDoc @roots/bud-framework#Rule.Abstract.test}
|
|
12
14
|
*
|
|
13
15
|
* @public
|
|
14
16
|
*/
|
|
15
|
-
test
|
|
17
|
+
test: Contract['test'];
|
|
16
18
|
/**
|
|
17
19
|
* {@inheritDoc @roots/bud-framework#Rule.Abstract.use}
|
|
18
20
|
*
|
|
19
21
|
* @public
|
|
20
22
|
*/
|
|
21
|
-
use?:
|
|
23
|
+
use?: Array<keyof Items & string>;
|
|
22
24
|
/**
|
|
23
25
|
* Include paths
|
|
24
26
|
*/
|
|
25
|
-
include?:
|
|
27
|
+
include?: Contract['include'];
|
|
26
28
|
/**
|
|
27
29
|
* {@inheritDoc @roots/bud-framework#Rule.Abstract.exclude}
|
|
28
30
|
*
|
|
29
31
|
* @public
|
|
30
32
|
*/
|
|
31
|
-
exclude?:
|
|
33
|
+
exclude?: Contract['exclude'];
|
|
32
34
|
/**
|
|
33
35
|
* {@inheritDoc @roots/bud-framework#Rule.Abstract."type"}
|
|
34
36
|
*
|
|
35
37
|
* @public
|
|
36
38
|
*/
|
|
37
|
-
type?:
|
|
39
|
+
type?: Contract['type'];
|
|
38
40
|
/**
|
|
39
41
|
* Generator factory
|
|
40
42
|
*
|
|
41
43
|
* @public
|
|
42
44
|
*/
|
|
43
|
-
parser?:
|
|
45
|
+
parser?: Contract['parser'];
|
|
44
46
|
/**
|
|
45
47
|
* Generator factory
|
|
46
48
|
*
|
|
47
49
|
* @public
|
|
48
50
|
*/
|
|
49
|
-
generator?:
|
|
51
|
+
generator?: Contract['generator'];
|
|
50
52
|
/**
|
|
51
53
|
* Class constructor
|
|
52
54
|
*
|
|
53
55
|
* @public
|
|
54
56
|
*/
|
|
55
|
-
constructor(
|
|
57
|
+
constructor(_app: () => Framework, options?: Contract.Options);
|
|
56
58
|
/**
|
|
57
59
|
* Test value
|
|
58
60
|
*
|
|
@@ -68,63 +70,63 @@ export declare class Rule extends Base implements FrameworkRule.Interface {
|
|
|
68
70
|
* @public
|
|
69
71
|
* @decorator `@bind`
|
|
70
72
|
*/
|
|
71
|
-
setTest(test:
|
|
73
|
+
setTest(test: Rule['test']): Rule;
|
|
72
74
|
/**
|
|
73
75
|
* Get parser value
|
|
74
76
|
*
|
|
75
77
|
* @public
|
|
76
78
|
* @decorator `@bind`
|
|
77
79
|
*/
|
|
78
|
-
getParser():
|
|
80
|
+
getParser(): Contract.Parser;
|
|
79
81
|
/**
|
|
80
82
|
* Set parser value
|
|
81
83
|
*
|
|
82
84
|
* @public
|
|
83
85
|
* @decorator `@bind`
|
|
84
86
|
*/
|
|
85
|
-
setParser(parser:
|
|
87
|
+
setParser(parser: Contract['parser']): Rule;
|
|
86
88
|
/**
|
|
87
89
|
* Get use value
|
|
88
90
|
*
|
|
89
91
|
* @public
|
|
90
92
|
* @decorator `@bind`
|
|
91
93
|
*/
|
|
92
|
-
getUse():
|
|
94
|
+
getUse(): Array<`${keyof Items & string}`>;
|
|
93
95
|
/**
|
|
94
96
|
* Set use value
|
|
95
97
|
*
|
|
96
98
|
* @public
|
|
97
99
|
* @decorator `@bind`
|
|
98
100
|
*/
|
|
99
|
-
setUse(use:
|
|
101
|
+
setUse(input: Array<keyof Items & string> | ((use: Array<keyof Items & string>, app: Framework) => Array<keyof Items & string>)): Rule;
|
|
100
102
|
/**
|
|
101
103
|
* Get exclude value
|
|
102
104
|
*
|
|
103
105
|
* @public
|
|
104
106
|
* @decorator `@bind`
|
|
105
107
|
*/
|
|
106
|
-
getInclude(): string
|
|
108
|
+
getInclude(): Array<string | RegExp>;
|
|
107
109
|
/**
|
|
108
110
|
* Set exclude value
|
|
109
111
|
*
|
|
110
112
|
* @public
|
|
111
113
|
* @decorator `@bind`
|
|
112
114
|
*/
|
|
113
|
-
setInclude(include:
|
|
115
|
+
setInclude(include: Contract['include']): Rule;
|
|
114
116
|
/**
|
|
115
117
|
* Get exclude value
|
|
116
118
|
*
|
|
117
119
|
* @public
|
|
118
120
|
* @decorator `@bind`
|
|
119
121
|
*/
|
|
120
|
-
getExclude(): RegExp
|
|
122
|
+
getExclude(): Array<string | RegExp>;
|
|
121
123
|
/**
|
|
122
124
|
* Set exclude value
|
|
123
125
|
*
|
|
124
126
|
* @public
|
|
125
127
|
* @decorator `@bind`
|
|
126
128
|
*/
|
|
127
|
-
setExclude(exclude:
|
|
129
|
+
setExclude(exclude: Contract['exclude']): Rule;
|
|
128
130
|
/**
|
|
129
131
|
* Get type value
|
|
130
132
|
*
|
|
@@ -152,7 +154,7 @@ export declare class Rule extends Base implements FrameworkRule.Interface {
|
|
|
152
154
|
* @public
|
|
153
155
|
* @decorator `@bind`
|
|
154
156
|
*/
|
|
155
|
-
setGenerator(generator:
|
|
157
|
+
setGenerator(generator: Contract['generator']): Rule;
|
|
156
158
|
/**
|
|
157
159
|
* Produce final Base output
|
|
158
160
|
*
|
|
@@ -162,18 +164,8 @@ export declare class Rule extends Base implements FrameworkRule.Interface {
|
|
|
162
164
|
* @public
|
|
163
165
|
* @decorator `@bind`
|
|
164
166
|
*/
|
|
165
|
-
|
|
167
|
+
toWebpack(): {
|
|
166
168
|
test: RegExp;
|
|
167
|
-
|
|
168
|
-
loader: string;
|
|
169
|
-
options?: {
|
|
170
|
-
[key: string]: any;
|
|
171
|
-
};
|
|
172
|
-
}[];
|
|
173
|
-
exclude?: RegExp;
|
|
174
|
-
type?: string;
|
|
175
|
-
parser?: FrameworkRule.Parser;
|
|
176
|
-
generator?: any;
|
|
177
|
-
}>;
|
|
169
|
+
};
|
|
178
170
|
}
|
|
179
171
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Rule/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Rule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAC,MAAM,sBAAsB,CAAA;AAGvE,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAA;AAInC,yBAAiB,IAAI,CAAC;IACpB,KAAY,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC3D;AAED;;;;GAIG;AACH,qBAAa,IAAK,SAAQ,IAAK,YAAW,QAAQ;IAChD;;;;OAIG;IACI,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAE7B;;;;OAIG;IACI,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAA;IAExC;;OAEG;IACI,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;IAEpC;;;;OAIG;IACI,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;IAEpC;;;;OAIG;IACI,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAE9B;;;;OAIG;IACI,MAAM,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAElC;;;;OAIG;IACI,SAAS,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAA;IAExC;;;;OAIG;gBACgB,IAAI,EAAE,MAAM,SAAS,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO;IAcpE;;;;;;;OAOG;IAEI,OAAO,IAAI,MAAM;IAIxB;;;;;OAKG;IAEI,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI;IAKxC;;;;;OAKG;IAEI,SAAS,IAAI,QAAQ,CAAC,MAAM;IAInC;;;;;OAKG;IAEI,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI;IAKlD;;;;;OAKG;IAEI,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC;IAIjD;;;;;OAKG;IAEI,MAAM,CACX,KAAK,EACD,KAAK,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAC3B,CAAC,CACC,GAAG,EAAE,KAAK,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,EAChC,GAAG,EAAE,SAAS,KACX,KAAK,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,GACpC,IAAI;IAQP;;;;;OAKG;IAEI,UAAU,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAI3C;;;;;OAKG;IAEI,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI;IAKrD;;;;;OAKG;IAEI,UAAU,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAI3C;;;;;OAKG;IAEI,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,IAAI;IAKrD;;;;;OAKG;IAEI,OAAO;IAId;;;;;OAKG;IAEI,OAAO,CAAC,IAAI,KAAA,GAAG,IAAI;IAK1B;;;;;OAKG;IAEI,YAAY;IAInB;;;;;OAKG;IAEI,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI;IAK3D;;;;;;;;OAQG;IAEI,SAAS;;;CAkBjB"}
|
package/types/index.d.ts
CHANGED
|
@@ -4,14 +4,7 @@
|
|
|
4
4
|
* @see https://roots.io/bud
|
|
5
5
|
* @see https://github.com/roots/bud
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
8
|
-
* - 💁 Composable - Build exceptional applications with a modular, configurable build system
|
|
9
|
-
*
|
|
10
|
-
* - 💪 Modern - Modern framework written in TypeScript with an expressive API
|
|
11
|
-
*
|
|
12
|
-
* - 🌱 Easy - Low bundle size and fast build times
|
|
13
|
-
*
|
|
14
|
-
* @packageDocumentation
|
|
7
|
+
* @packageDocumentation
|
|
15
8
|
*/
|
|
16
9
|
export { Build } from './Build';
|
|
17
10
|
export { Loader } from './Loader';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAE3B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AACtC,OAAO,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAC,CAAA"}
|
package/types/shared/Base.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Framework } from '@roots/bud-framework';
|
|
2
2
|
export declare class Base {
|
|
3
|
-
|
|
3
|
+
private _app;
|
|
4
|
+
get app(): Framework;
|
|
5
|
+
constructor(_app: () => Framework);
|
|
6
|
+
wrap<T = any>(input: T | ((app: Framework) => T)): (app: Framework) => T;
|
|
7
|
+
unwrap<T = any>(input: T | ((app: Framework, ...options: Array<any>) => T), ...options: Array<any>): T;
|
|
4
8
|
}
|
|
5
9
|
//# sourceMappingURL=Base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../src/shared/Base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAKnD,qBAAa,IAAI;
|
|
1
|
+
{"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../src/shared/Base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAKnD,qBAAa,IAAI;IACf,OAAO,CAAC,IAAI,CAAiB;IAE7B,IAAW,GAAG,cAEb;gBAEkB,IAAI,EAAE,MAAM,SAAS;IAIjC,IAAI,CAAC,CAAC,GAAG,GAAG,EACjB,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,CAAC,CAAC,GACjC,CAAC,GAAG,EAAE,SAAS,KAAK,CAAC;IAGjB,MAAM,CAAC,CAAC,GAAG,GAAG,EACnB,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAC1D,GAAG,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GACrB,CAAC;CAGL"}
|
package/lib/cjs/Build/config.js
DELETED
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.config = void 0;
|
|
4
|
-
const bud_support_1 = require("@roots/bud-support");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
const { dirname } = path_1.posix;
|
|
7
|
-
/**
|
|
8
|
-
* Filters framework values and returns a webpack configuration
|
|
9
|
-
*
|
|
10
|
-
* @param app - the Framework instance
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
async function config(app) {
|
|
15
|
-
app.hooks
|
|
16
|
-
.async('build', async () => {
|
|
17
|
-
const entry = await app.hooks.filterAsync('build.entry');
|
|
18
|
-
const plugins = await app.hooks.filterAsync('build.plugins');
|
|
19
|
-
const resolve = await app.hooks.filterAsync('build.resolve');
|
|
20
|
-
return {
|
|
21
|
-
entry,
|
|
22
|
-
plugins,
|
|
23
|
-
resolve,
|
|
24
|
-
bail: app.hooks.filter('build.bail'),
|
|
25
|
-
cache: app.hooks.filter('build.cache'),
|
|
26
|
-
context: app.hooks.filter('build.context'),
|
|
27
|
-
devtool: app.hooks.filter('build.devtool'),
|
|
28
|
-
experiments: app.hooks.filter('build.experiments'),
|
|
29
|
-
externals: app.hooks.filter('build.externals'),
|
|
30
|
-
infrastructureLogging: app.hooks.filter('build.infrastructureLogging'),
|
|
31
|
-
mode: app.hooks.filter('build.mode'),
|
|
32
|
-
module: app.hooks.filter('build.module'),
|
|
33
|
-
name: app.hooks.filter('build.name'),
|
|
34
|
-
node: app.hooks.filter('build.node'),
|
|
35
|
-
output: app.hooks.filter('build.output'),
|
|
36
|
-
optimization: app.hooks.filter('build.optimization'),
|
|
37
|
-
parallelism: app.hooks.filter('build.parallelism'),
|
|
38
|
-
performance: app.hooks.filter('build.performance'),
|
|
39
|
-
profile: app.hooks.filter('build.profile'),
|
|
40
|
-
recordsPath: app.hooks.filter('build.recordsPath'),
|
|
41
|
-
stats: app.hooks.filter('build.stats'),
|
|
42
|
-
target: app.hooks.filter('build.target'),
|
|
43
|
-
watch: app.hooks.filter('build.watch'),
|
|
44
|
-
watchOptions: app.hooks.filter('build.watchOptions'),
|
|
45
|
-
};
|
|
46
|
-
})
|
|
47
|
-
/**
|
|
48
|
-
* build.bail
|
|
49
|
-
*/
|
|
50
|
-
.hooks.on('build.bail', () => app.store.get('build.bail'))
|
|
51
|
-
/**
|
|
52
|
-
* build.context
|
|
53
|
-
*/
|
|
54
|
-
.hooks.on('build.context', () => app.path('project'))
|
|
55
|
-
/**
|
|
56
|
-
* build.devtool
|
|
57
|
-
*/
|
|
58
|
-
.hooks.on('build.devtool', () => app.store.get('build.devtool'))
|
|
59
|
-
/**
|
|
60
|
-
* build.infrastructureLogging
|
|
61
|
-
*/
|
|
62
|
-
.hooks.on('build.infrastructureLogging', () => app.store.get('build.infrastructureLogging'))
|
|
63
|
-
/**
|
|
64
|
-
* build.mode
|
|
65
|
-
*/
|
|
66
|
-
.hooks.on('build.mode', () => app.mode)
|
|
67
|
-
/**
|
|
68
|
-
* build.module
|
|
69
|
-
*/
|
|
70
|
-
.hooks.on('build.module', () => ({
|
|
71
|
-
rules: app.hooks.filter('build.module.rules'),
|
|
72
|
-
}))
|
|
73
|
-
/**
|
|
74
|
-
* build.module.rules
|
|
75
|
-
*/
|
|
76
|
-
.hooks.on('build.module.rules', () => [
|
|
77
|
-
...app.hooks.filter('build.module.rules.before'),
|
|
78
|
-
{
|
|
79
|
-
oneOf: app.hooks.filter('build.module.rules.oneOf'),
|
|
80
|
-
},
|
|
81
|
-
...app.hooks.filter('build.module.rules.after'),
|
|
82
|
-
])
|
|
83
|
-
/**
|
|
84
|
-
* build.module.rules[1].oneOf
|
|
85
|
-
*/
|
|
86
|
-
.hooks.on('build.module.rules.oneOf', () => Object.values(app.build.rules).map(rule => rule.make()))
|
|
87
|
-
/**
|
|
88
|
-
* build.module.rules[0]
|
|
89
|
-
*/
|
|
90
|
-
.hooks.on('build.module.rules.before', () => [
|
|
91
|
-
{
|
|
92
|
-
test: /\.[cm]?(jsx?|tsx?)$/,
|
|
93
|
-
parser: { requireEnsure: false },
|
|
94
|
-
},
|
|
95
|
-
])
|
|
96
|
-
/**
|
|
97
|
-
* build.module.rules[2]
|
|
98
|
-
*/
|
|
99
|
-
.hooks.on('build.module.rules.after', () => [])
|
|
100
|
-
/**
|
|
101
|
-
* build.name
|
|
102
|
-
*/
|
|
103
|
-
.hooks.on('build.name', () => app.name)
|
|
104
|
-
/**
|
|
105
|
-
* build.node
|
|
106
|
-
*/
|
|
107
|
-
.hooks.on('build.node', () => false)
|
|
108
|
-
/**
|
|
109
|
-
* build.optimization
|
|
110
|
-
*/
|
|
111
|
-
.hooks.on('build.optimization', () => ({
|
|
112
|
-
emitOnErrors: app.hooks.filter('build.optimization.emitOnErrors'),
|
|
113
|
-
minimize: app.hooks.filter('build.optimization.minimize'),
|
|
114
|
-
minimizer: app.hooks.filter('build.optimization.minimizer'),
|
|
115
|
-
moduleIds: app.hooks.filter('build.optimization.moduleIds'),
|
|
116
|
-
runtimeChunk: app.hooks.filter('build.optimization.runtimeChunk'),
|
|
117
|
-
splitChunks: app.hooks.filter('build.optimization.splitChunks'),
|
|
118
|
-
}))
|
|
119
|
-
/**
|
|
120
|
-
* build.optimization.emitOnErrors
|
|
121
|
-
*/
|
|
122
|
-
.hooks.on('build.optimization.emitOnErrors', () => app.store.get('build.optimization.emitOnErrors'))
|
|
123
|
-
/**
|
|
124
|
-
* build.optimization.minimize
|
|
125
|
-
*/
|
|
126
|
-
.hooks.on('build.optimization.minimize', () => app.store.is('features.minimize', true))
|
|
127
|
-
/**
|
|
128
|
-
* build.optimization.minimizer
|
|
129
|
-
*/
|
|
130
|
-
.hooks.on('build.optimization.minimizer', () => ['...'])
|
|
131
|
-
/**
|
|
132
|
-
* build.optimization.moduleIds
|
|
133
|
-
*/
|
|
134
|
-
.hooks.on('build.optimization.moduleIds', () => app.store.get('build.optimization.moduleIds'))
|
|
135
|
-
/**
|
|
136
|
-
* build.optimization.removeEmptyChunks
|
|
137
|
-
*/
|
|
138
|
-
.hooks.on('build.optimization.removeEmptyChunks', () => app.store.get('build.optimization.removeEmptyChunks'))
|
|
139
|
-
/**
|
|
140
|
-
* build.optimization.runtimeChunk
|
|
141
|
-
*/
|
|
142
|
-
.hooks.on('build.optimization.runtimeChunk', () => app.store.is('features.runtimeChunk', true))
|
|
143
|
-
/**
|
|
144
|
-
* build.optimization.splitChunks
|
|
145
|
-
*/
|
|
146
|
-
.hooks.on('build.optimization.splitChunks', () => app.store.is('features.splitChunks', true))
|
|
147
|
-
/**
|
|
148
|
-
* build.output
|
|
149
|
-
*/
|
|
150
|
-
.hooks.on('build.output', () => ({
|
|
151
|
-
assetModuleFilename: app.hooks.filter('build.output.assetModuleFilename'),
|
|
152
|
-
chunkFilename: app.hooks.filter('build.output.chunkFilename'),
|
|
153
|
-
clean: app.hooks.filter('build.output.clean'),
|
|
154
|
-
filename: app.hooks.filter('build.output.filename'),
|
|
155
|
-
path: app.hooks.filter('build.output.path'),
|
|
156
|
-
pathinfo: app.hooks.filter('build.output.pathinfo'),
|
|
157
|
-
publicPath: app.hooks.filter('build.output.publicPath'),
|
|
158
|
-
}))
|
|
159
|
-
/**
|
|
160
|
-
* build.output.assetModuleFilename
|
|
161
|
-
*/
|
|
162
|
-
.hooks.on('build.output.assetModuleFilename', () => app.store.is('features.hash', true)
|
|
163
|
-
? app.store.get('hashFormat').concat('[ext]')
|
|
164
|
-
: app.store.get('fileFormat').concat('[ext]'))
|
|
165
|
-
.hooks.on('build.output.clean', () => app.store.get('build.output.clean'))
|
|
166
|
-
/**
|
|
167
|
-
* build.output.filename
|
|
168
|
-
*/
|
|
169
|
-
.hooks.on('build.output.filename', () => app.store.is('features.hash', true)
|
|
170
|
-
? app.store.get('hashFormat').concat('.js')
|
|
171
|
-
: app.store.get('fileFormat').concat('.js'))
|
|
172
|
-
/**
|
|
173
|
-
* build.output.path
|
|
174
|
-
*/
|
|
175
|
-
.hooks.on('build.output.path', () => app.path('dist'))
|
|
176
|
-
/**
|
|
177
|
-
* build.output.pathinfo
|
|
178
|
-
*/
|
|
179
|
-
.hooks.on('build.output.pathinfo', () => app.store.get('build.output.pathinfo'))
|
|
180
|
-
/**
|
|
181
|
-
* build.output.publicPath
|
|
182
|
-
*/
|
|
183
|
-
.hooks.on('build.output.publicPath', () => app.store.get('build.output.publicPath'))
|
|
184
|
-
/**
|
|
185
|
-
* Parallelism
|
|
186
|
-
*/
|
|
187
|
-
.hooks.on('build.parallelism', () => app.store.get('build.parallelism'))
|
|
188
|
-
/**
|
|
189
|
-
* build.performance
|
|
190
|
-
*/
|
|
191
|
-
.hooks.on('build.performance', () => app.store.get('build.performance'))
|
|
192
|
-
.hooks.async('build.plugins', async () => {
|
|
193
|
-
const newExtensions = await app.extensions.make();
|
|
194
|
-
return newExtensions;
|
|
195
|
-
})
|
|
196
|
-
/**
|
|
197
|
-
* build.profile
|
|
198
|
-
*/
|
|
199
|
-
.hooks.on('build.profile', () => app.store.get('build.profile'))
|
|
200
|
-
/**
|
|
201
|
-
* build.recordsPath
|
|
202
|
-
*/
|
|
203
|
-
.hooks.on('build.recordsPath', () => app.path('storage', app.name, `modules.json`))
|
|
204
|
-
.hooks.async('build.resolve', async () => {
|
|
205
|
-
const modules = await app.hooks.filterAsync('build.resolve.modules');
|
|
206
|
-
const alias = await app.hooks.filter('build.resolve.alias');
|
|
207
|
-
const extensions = app.hooks.filter('build.resolve.extensions');
|
|
208
|
-
return { modules, alias, extensions };
|
|
209
|
-
})
|
|
210
|
-
/**
|
|
211
|
-
* build.resolve.alias
|
|
212
|
-
*/
|
|
213
|
-
.hooks.on('build.resolve.alias', () => ({}))
|
|
214
|
-
/**
|
|
215
|
-
* build.resolve.modules
|
|
216
|
-
*/
|
|
217
|
-
.hooks.async('build.resolve.modules', async (value) => {
|
|
218
|
-
const budPkg = await (0, bud_support_1.pkgUp)({
|
|
219
|
-
cwd: require.resolve('@roots/bud'),
|
|
220
|
-
});
|
|
221
|
-
const bud = dirname(budPkg);
|
|
222
|
-
const roots = bud
|
|
223
|
-
.split('/')
|
|
224
|
-
.splice(0, bud.split('/').length - 1)
|
|
225
|
-
.join('/');
|
|
226
|
-
const peers = roots
|
|
227
|
-
.split('/')
|
|
228
|
-
.splice(0, roots.split('/').length - 1)
|
|
229
|
-
.join('/');
|
|
230
|
-
return [
|
|
231
|
-
...new Set([
|
|
232
|
-
...(value ?? []),
|
|
233
|
-
app.hooks.filter('location.src'),
|
|
234
|
-
app.hooks.filter('location.modules'),
|
|
235
|
-
peers,
|
|
236
|
-
...(app.project?.get('resolve') ?? []),
|
|
237
|
-
...(app.root?.project.get('resolve') ?? []),
|
|
238
|
-
]),
|
|
239
|
-
];
|
|
240
|
-
})
|
|
241
|
-
/**
|
|
242
|
-
* build.resolve.extensions
|
|
243
|
-
*/
|
|
244
|
-
.hooks.on('build.resolve.extensions', () => app.store.get('build.resolve.extensions'))
|
|
245
|
-
/**
|
|
246
|
-
* build.stats
|
|
247
|
-
*/
|
|
248
|
-
.hooks.on('build.stats', () => app.store.get('build.stats'))
|
|
249
|
-
/**
|
|
250
|
-
* build.target
|
|
251
|
-
*/
|
|
252
|
-
.hooks.on('build.target', () => app.project.has('manifest.browserslist') &&
|
|
253
|
-
app.project.isArray('manifest.browserslist')
|
|
254
|
-
? `browserslist:${app.path('project', 'package.json')}`
|
|
255
|
-
: undefined)
|
|
256
|
-
/**
|
|
257
|
-
* build.watch
|
|
258
|
-
*/
|
|
259
|
-
.hooks.on('build.watch', () => app.store.get('build.watch'))
|
|
260
|
-
/**
|
|
261
|
-
* build.watchOptions
|
|
262
|
-
*/
|
|
263
|
-
.hooks.on('build.watchOptions', () => app.store.get('build.watchOptions'));
|
|
264
|
-
}
|
|
265
|
-
exports.config = config;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bind = exports.isFunction = void 0;
|
|
4
|
-
const bud_support_1 = require("@roots/bud-support");
|
|
5
|
-
Object.defineProperty(exports, "bind", { enumerable: true, get: function () { return bud_support_1.bind; } });
|
|
6
|
-
exports.isFunction = bud_support_1.lodash.isFunction;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Loader = exports.Base = exports.Framework = void 0;
|
|
4
|
-
var bud_framework_1 = require("@roots/bud-framework");
|
|
5
|
-
Object.defineProperty(exports, "Framework", { enumerable: true, get: function () { return bud_framework_1.Framework; } });
|
|
6
|
-
Object.defineProperty(exports, "Base", { enumerable: true, get: function () { return bud_framework_1.Item; } });
|
|
7
|
-
Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return bud_framework_1.Loader; } });
|
package/types/Build/config.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Framework } from '@roots/bud-framework';
|
|
2
|
-
/**
|
|
3
|
-
* Filters framework values and returns a webpack configuration
|
|
4
|
-
*
|
|
5
|
-
* @param app - the Framework instance
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare function config(app: Framework): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/Build/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAMnD;;;;;;GAMG;AACH,wBAAsB,MAAM,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAma1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"item.dependencies.d.ts","sourceRoot":"","sources":["../../src/Item/item.dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAS,MAAM,oBAAoB,CAAA;AAE/C,eAAO,MAAO,UAAU,kDAAU,CAAA;AAClC,OAAO,EAAC,IAAI,EAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"item.interface.d.ts","sourceRoot":"","sources":["../../src/Item/item.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,IAAI,IAAI,IAAI,EACZ,MAAM,EACN,KAAK,GACN,MAAM,sBAAsB,CAAA"}
|