@roots/bud-build 6.9.0 → 6.10.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 +6 -1
- package/package.json +21 -17
- package/src/config/optimization.ts +3 -2
- package/src/config/output/assetModuleFilename.ts +3 -3
- package/src/config/output/chunkFilename.ts +3 -3
- package/src/config/output/filename.ts +3 -8
- package/src/config/output/index.ts +4 -3
- package/src/rule/index.ts +19 -80
- package/src/service.ts +2 -2
- package/lib/config/bail.d.ts +0 -3
- package/lib/config/bail.d.ts.map +0 -1
- package/lib/config/bail.js +0 -2
- package/lib/config/bail.js.map +0 -1
- package/lib/config/cache.d.ts +0 -3
- package/lib/config/cache.d.ts.map +0 -1
- package/lib/config/cache.js +0 -2
- package/lib/config/cache.js.map +0 -1
- package/lib/config/context.d.ts +0 -3
- package/lib/config/context.d.ts.map +0 -1
- package/lib/config/context.js +0 -2
- package/lib/config/context.js.map +0 -1
- package/lib/config/dependencies.d.ts +0 -3
- package/lib/config/dependencies.d.ts.map +0 -1
- package/lib/config/dependencies.js +0 -5
- package/lib/config/dependencies.js.map +0 -1
- package/lib/config/devtool.d.ts +0 -3
- package/lib/config/devtool.d.ts.map +0 -1
- package/lib/config/devtool.js +0 -2
- package/lib/config/devtool.js.map +0 -1
- package/lib/config/entry.d.ts +0 -3
- package/lib/config/entry.d.ts.map +0 -1
- package/lib/config/entry.js +0 -2
- package/lib/config/entry.js.map +0 -1
- package/lib/config/experiments.d.ts +0 -3
- package/lib/config/experiments.d.ts.map +0 -1
- package/lib/config/experiments.js +0 -2
- package/lib/config/experiments.js.map +0 -1
- package/lib/config/externals.d.ts +0 -3
- package/lib/config/externals.d.ts.map +0 -1
- package/lib/config/externals.js +0 -2
- package/lib/config/externals.js.map +0 -1
- package/lib/config/externalsType.d.ts +0 -3
- package/lib/config/externalsType.d.ts.map +0 -1
- package/lib/config/externalsType.js +0 -2
- package/lib/config/externalsType.js.map +0 -1
- package/lib/config/index.d.ts +0 -35
- package/lib/config/index.d.ts.map +0 -1
- package/lib/config/index.js +0 -27
- package/lib/config/index.js.map +0 -1
- package/lib/config/infrastructureLogging.d.ts +0 -3
- package/lib/config/infrastructureLogging.d.ts.map +0 -1
- package/lib/config/infrastructureLogging.js +0 -14
- package/lib/config/infrastructureLogging.js.map +0 -1
- package/lib/config/loader.d.ts +0 -3
- package/lib/config/loader.d.ts.map +0 -1
- package/lib/config/loader.js +0 -2
- package/lib/config/loader.js.map +0 -1
- package/lib/config/mode.d.ts +0 -3
- package/lib/config/mode.d.ts.map +0 -1
- package/lib/config/mode.js +0 -2
- package/lib/config/mode.js.map +0 -1
- package/lib/config/module.d.ts +0 -3
- package/lib/config/module.d.ts.map +0 -1
- package/lib/config/module.js +0 -23
- package/lib/config/module.js.map +0 -1
- package/lib/config/name.d.ts +0 -3
- package/lib/config/name.d.ts.map +0 -1
- package/lib/config/name.js +0 -2
- package/lib/config/name.js.map +0 -1
- package/lib/config/node.d.ts +0 -3
- package/lib/config/node.d.ts.map +0 -1
- package/lib/config/node.js +0 -2
- package/lib/config/node.js.map +0 -1
- package/lib/config/optimization.d.ts +0 -3
- package/lib/config/optimization.d.ts.map +0 -1
- package/lib/config/optimization.js +0 -10
- package/lib/config/optimization.js.map +0 -1
- package/lib/config/output/assetModuleFilename.d.ts +0 -8
- package/lib/config/output/assetModuleFilename.d.ts.map +0 -1
- package/lib/config/output/assetModuleFilename.js +0 -2
- package/lib/config/output/assetModuleFilename.js.map +0 -1
- package/lib/config/output/chunkFilename.d.ts +0 -8
- package/lib/config/output/chunkFilename.d.ts.map +0 -1
- package/lib/config/output/chunkFilename.js +0 -4
- package/lib/config/output/chunkFilename.js.map +0 -1
- package/lib/config/output/filename.d.ts +0 -8
- package/lib/config/output/filename.d.ts.map +0 -1
- package/lib/config/output/filename.js +0 -4
- package/lib/config/output/filename.js.map +0 -1
- package/lib/config/output/index.d.ts +0 -3
- package/lib/config/output/index.d.ts.map +0 -1
- package/lib/config/output/index.js +0 -18
- package/lib/config/output/index.js.map +0 -1
- package/lib/config/parallelism.d.ts +0 -3
- package/lib/config/parallelism.d.ts.map +0 -1
- package/lib/config/parallelism.js +0 -3
- package/lib/config/parallelism.js.map +0 -1
- package/lib/config/performance.d.ts +0 -3
- package/lib/config/performance.d.ts.map +0 -1
- package/lib/config/performance.js +0 -2
- package/lib/config/performance.js.map +0 -1
- package/lib/config/plugins.d.ts +0 -3
- package/lib/config/plugins.d.ts.map +0 -1
- package/lib/config/plugins.js +0 -2
- package/lib/config/plugins.js.map +0 -1
- package/lib/config/profile.d.ts +0 -3
- package/lib/config/profile.d.ts.map +0 -1
- package/lib/config/profile.js +0 -2
- package/lib/config/profile.js.map +0 -1
- package/lib/config/recordsPath.d.ts +0 -3
- package/lib/config/recordsPath.d.ts.map +0 -1
- package/lib/config/recordsPath.js +0 -2
- package/lib/config/recordsPath.js.map +0 -1
- package/lib/config/resolve.d.ts +0 -3
- package/lib/config/resolve.d.ts.map +0 -1
- package/lib/config/resolve.js +0 -30
- package/lib/config/resolve.js.map +0 -1
- package/lib/config/stats.d.ts +0 -3
- package/lib/config/stats.d.ts.map +0 -1
- package/lib/config/stats.js +0 -17
- package/lib/config/stats.js.map +0 -1
- package/lib/config/target.d.ts +0 -3
- package/lib/config/target.d.ts.map +0 -1
- package/lib/config/target.js +0 -4
- package/lib/config/target.js.map +0 -1
- package/lib/handlers/index.d.ts +0 -19
- package/lib/handlers/index.d.ts.map +0 -1
- package/lib/handlers/index.js +0 -6
- package/lib/handlers/index.js.map +0 -1
- package/lib/handlers/items/items.d.ts +0 -47
- package/lib/handlers/items/items.d.ts.map +0 -1
- package/lib/handlers/items/items.js +0 -69
- package/lib/handlers/items/items.js.map +0 -1
- package/lib/handlers/loaders/loaders.d.ts +0 -12
- package/lib/handlers/loaders/loaders.d.ts.map +0 -1
- package/lib/handlers/loaders/loaders.js +0 -11
- package/lib/handlers/loaders/loaders.js.map +0 -1
- package/lib/handlers/register.d.ts +0 -14
- package/lib/handlers/register.d.ts.map +0 -1
- package/lib/handlers/register.js +0 -26
- package/lib/handlers/register.js.map +0 -1
- package/lib/handlers/rules/css.d.ts +0 -3
- package/lib/handlers/rules/css.d.ts.map +0 -1
- package/lib/handlers/rules/css.js +0 -5
- package/lib/handlers/rules/css.js.map +0 -1
- package/lib/handlers/rules/css.module.d.ts +0 -3
- package/lib/handlers/rules/css.module.d.ts.map +0 -1
- package/lib/handlers/rules/css.module.js +0 -5
- package/lib/handlers/rules/css.module.js.map +0 -1
- package/lib/handlers/rules/csv.d.ts +0 -3
- package/lib/handlers/rules/csv.d.ts.map +0 -1
- package/lib/handlers/rules/csv.js +0 -5
- package/lib/handlers/rules/csv.js.map +0 -1
- package/lib/handlers/rules/font.d.ts +0 -3
- package/lib/handlers/rules/font.d.ts.map +0 -1
- package/lib/handlers/rules/font.inline.d.ts +0 -3
- package/lib/handlers/rules/font.inline.d.ts.map +0 -1
- package/lib/handlers/rules/font.inline.js +0 -6
- package/lib/handlers/rules/font.inline.js.map +0 -1
- package/lib/handlers/rules/font.js +0 -5
- package/lib/handlers/rules/font.js.map +0 -1
- package/lib/handlers/rules/html.d.ts +0 -3
- package/lib/handlers/rules/html.d.ts.map +0 -1
- package/lib/handlers/rules/html.js +0 -5
- package/lib/handlers/rules/html.js.map +0 -1
- package/lib/handlers/rules/image.d.ts +0 -3
- package/lib/handlers/rules/image.d.ts.map +0 -1
- package/lib/handlers/rules/image.inline.d.ts +0 -3
- package/lib/handlers/rules/image.inline.d.ts.map +0 -1
- package/lib/handlers/rules/image.inline.js +0 -6
- package/lib/handlers/rules/image.inline.js.map +0 -1
- package/lib/handlers/rules/image.js +0 -5
- package/lib/handlers/rules/image.js.map +0 -1
- package/lib/handlers/rules/index.d.ts +0 -19
- package/lib/handlers/rules/index.d.ts.map +0 -1
- package/lib/handlers/rules/index.js +0 -35
- package/lib/handlers/rules/index.js.map +0 -1
- package/lib/handlers/rules/js.d.ts +0 -3
- package/lib/handlers/rules/js.d.ts.map +0 -1
- package/lib/handlers/rules/js.js +0 -5
- package/lib/handlers/rules/js.js.map +0 -1
- package/lib/handlers/rules/json.d.ts +0 -3
- package/lib/handlers/rules/json.d.ts.map +0 -1
- package/lib/handlers/rules/json.js +0 -7
- package/lib/handlers/rules/json.js.map +0 -1
- package/lib/handlers/rules/svg.d.ts +0 -3
- package/lib/handlers/rules/svg.d.ts.map +0 -1
- package/lib/handlers/rules/svg.inline.d.ts +0 -5
- package/lib/handlers/rules/svg.inline.d.ts.map +0 -1
- package/lib/handlers/rules/svg.inline.js +0 -9
- package/lib/handlers/rules/svg.inline.js.map +0 -1
- package/lib/handlers/rules/svg.js +0 -5
- package/lib/handlers/rules/svg.js.map +0 -1
- package/lib/handlers/rules/toml.d.ts +0 -3
- package/lib/handlers/rules/toml.d.ts.map +0 -1
- package/lib/handlers/rules/toml.js +0 -7
- package/lib/handlers/rules/toml.js.map +0 -1
- package/lib/handlers/rules/webp.d.ts +0 -3
- package/lib/handlers/rules/webp.d.ts.map +0 -1
- package/lib/handlers/rules/webp.js +0 -5
- package/lib/handlers/rules/webp.js.map +0 -1
- package/lib/handlers/rules/xml.d.ts +0 -3
- package/lib/handlers/rules/xml.d.ts.map +0 -1
- package/lib/handlers/rules/xml.js +0 -5
- package/lib/handlers/rules/xml.js.map +0 -1
- package/lib/handlers/rules/yml.d.ts +0 -3
- package/lib/handlers/rules/yml.d.ts.map +0 -1
- package/lib/handlers/rules/yml.js +0 -5
- package/lib/handlers/rules/yml.js.map +0 -1
- package/lib/helpers/isMjs.d.ts +0 -3
- package/lib/helpers/isMjs.d.ts.map +0 -1
- package/lib/helpers/isMjs.js +0 -2
- package/lib/helpers/isMjs.js.map +0 -1
- package/lib/helpers/scriptExtension.d.ts +0 -3
- package/lib/helpers/scriptExtension.d.ts.map +0 -1
- package/lib/helpers/scriptExtension.js +0 -5
- package/lib/helpers/scriptExtension.js.map +0 -1
- package/lib/index.d.ts +0 -12
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -14
- package/lib/index.js.map +0 -1
- package/lib/item/index.d.ts +0 -84
- package/lib/item/index.d.ts.map +0 -1
- package/lib/item/index.js +0 -165
- package/lib/item/index.js.map +0 -1
- package/lib/loader/index.d.ts +0 -26
- package/lib/loader/index.d.ts.map +0 -1
- package/lib/loader/index.js +0 -28
- package/lib/loader/index.js.map +0 -1
- package/lib/rule/index.d.ts +0 -178
- package/lib/rule/index.d.ts.map +0 -1
- package/lib/rule/index.js +0 -319
- package/lib/rule/index.js.map +0 -1
- package/lib/service.d.ts +0 -84
- package/lib/service.d.ts.map +0 -1
- package/lib/service.js +0 -212
- package/lib/service.js.map +0 -1
- package/lib/shared/base.d.ts +0 -20
- package/lib/shared/base.d.ts.map +0 -1
- package/lib/shared/base.js +0 -43
- package/lib/shared/base.js.map +0 -1
- package/lib/types.d.ts +0 -52
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -4
- package/lib/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -96,7 +96,9 @@ Keep track of development and community news.
|
|
|
96
96
|
|
|
97
97
|
## Sponsors
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
**Bud** is an open source project and completely free to use.
|
|
100
|
+
|
|
101
|
+
However, the amount of effort needed to maintain and develop new features and projects within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider [sponsoring Roots](https://github.com/sponsors/roots).
|
|
100
102
|
|
|
101
103
|
<a href="https://k-m.com/">
|
|
102
104
|
<img src="https://cdn.roots.io/app/uploads/km-digital.svg" alt="KM Digital" width="200" height="150"/>
|
|
@@ -113,3 +115,6 @@ Help support our open-source development efforts by [becoming a patron](https://
|
|
|
113
115
|
<a href="https://worksitesafety.ca/careers/">
|
|
114
116
|
<img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="200" height="150"/>
|
|
115
117
|
</a>
|
|
118
|
+
<a href="https://www.copiadigital.com/">
|
|
119
|
+
<img src="https://cdn.roots.io/app/uploads/copia-digital.svg" alt="Copia Digital" width="200" height="150"/>
|
|
120
|
+
</a>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roots/bud-build",
|
|
3
3
|
"description": "bud.js core module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.10.0",
|
|
5
5
|
"homepage": "https://roots.io/bud",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -40,52 +40,56 @@
|
|
|
40
40
|
"node": ">=16"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
|
-
"docs
|
|
44
|
-
"lib
|
|
45
|
-
"src
|
|
43
|
+
"docs",
|
|
44
|
+
"lib",
|
|
45
|
+
"src"
|
|
46
46
|
],
|
|
47
47
|
"type": "module",
|
|
48
|
-
"module": "./lib/index.js",
|
|
49
|
-
"types": "./lib/index.d.ts",
|
|
50
48
|
"exports": {
|
|
51
49
|
".": {
|
|
52
50
|
"types": "./lib/index.d.ts",
|
|
53
|
-
"
|
|
51
|
+
"import": "./lib/index.js"
|
|
54
52
|
},
|
|
55
53
|
"./item": {
|
|
56
54
|
"types": "./lib/item/index.d.ts",
|
|
57
|
-
"
|
|
55
|
+
"import": "./lib/item/index.js"
|
|
58
56
|
},
|
|
59
57
|
"./items": {
|
|
60
58
|
"types": "./lib/handlers/items/items.d.ts",
|
|
61
|
-
"
|
|
59
|
+
"import": "./lib/handlers/items/items.js"
|
|
62
60
|
},
|
|
63
61
|
"./loader": {
|
|
64
62
|
"types": "./lib/loader/index.d.ts",
|
|
65
|
-
"
|
|
63
|
+
"import": "./lib/loader/index.js"
|
|
66
64
|
},
|
|
67
65
|
"./loaders": {
|
|
68
66
|
"types": "./lib/handlers/loaders/loaders.d.ts",
|
|
69
|
-
"
|
|
67
|
+
"import": "./lib/handlers/loaders/loaders.js"
|
|
70
68
|
},
|
|
71
69
|
"./rule": {
|
|
72
70
|
"types": "./lib/rule/index.d.ts",
|
|
73
|
-
"
|
|
71
|
+
"import": "./lib/rule/index.js"
|
|
74
72
|
},
|
|
75
73
|
"./rules": {
|
|
76
74
|
"types": "./lib/handlers/rules/index.d.ts",
|
|
77
|
-
"
|
|
75
|
+
"import": "./lib/handlers/rules/index.js"
|
|
76
|
+
},
|
|
77
|
+
"./types": {
|
|
78
|
+
"types": "./lib/types.d.ts",
|
|
79
|
+
"import": "./lib/types.js"
|
|
78
80
|
}
|
|
79
81
|
},
|
|
82
|
+
"module": "./lib/index.js",
|
|
83
|
+
"types": "./lib/index.d.ts",
|
|
80
84
|
"devDependencies": {
|
|
81
|
-
"@roots/bud-api": "6.
|
|
82
|
-
"@roots/bud-hooks": "6.
|
|
85
|
+
"@roots/bud-api": "6.10.0",
|
|
86
|
+
"@roots/bud-hooks": "6.10.0",
|
|
83
87
|
"@skypack/package-check": "0.2.2",
|
|
84
88
|
"@types/node": "18.11.18"
|
|
85
89
|
},
|
|
86
90
|
"dependencies": {
|
|
87
|
-
"@roots/bud-framework": "6.
|
|
88
|
-
"@roots/bud-support": "6.
|
|
91
|
+
"@roots/bud-framework": "6.10.0",
|
|
92
|
+
"@roots/bud-support": "6.10.0"
|
|
89
93
|
},
|
|
90
94
|
"volta": {
|
|
91
95
|
"extends": "../../../package.json"
|
|
@@ -8,12 +8,13 @@ export const optimization: Factory<`optimization`> = async ({
|
|
|
8
8
|
filter(`build.optimization`, {
|
|
9
9
|
emitOnErrors: filter(`build.optimization.emitOnErrors`, isDevelopment),
|
|
10
10
|
minimize: filter(`build.optimization.minimize`, isProduction),
|
|
11
|
-
minimizer: filter(`build.optimization.minimizer`, [
|
|
11
|
+
minimizer: filter(`build.optimization.minimizer`, []),
|
|
12
12
|
moduleIds: filter(`build.optimization.moduleIds`, `named`),
|
|
13
13
|
removeEmptyChunks: filter(
|
|
14
14
|
`build.optimization.removeEmptyChunks`,
|
|
15
|
-
|
|
15
|
+
false,
|
|
16
16
|
),
|
|
17
17
|
runtimeChunk: filter(`build.optimization.runtimeChunk`, false),
|
|
18
18
|
splitChunks: filter(`build.optimization.splitChunks`, false),
|
|
19
|
+
usedExports: filter(`build.optimization.usedExports`, isProduction),
|
|
19
20
|
})
|
|
@@ -2,8 +2,8 @@ import type {Bud} from '@roots/bud-framework'
|
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
filter: Bud['hooks'][`filter`]
|
|
5
|
-
|
|
5
|
+
relPath: Bud['relPath']
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export const assetModuleFilename = ({filter,
|
|
9
|
-
filter(`build.output.assetModuleFilename`,
|
|
8
|
+
export const assetModuleFilename = ({filter, relPath}: Props) =>
|
|
9
|
+
filter(`build.output.assetModuleFilename`, relPath(`@file`))
|
|
@@ -6,13 +6,13 @@ import {scriptExtension} from '../../helpers/scriptExtension.js'
|
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
filter: Bud[`hooks`][`filter`]
|
|
9
|
-
|
|
9
|
+
relPath: Bud[`relPath`]
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export const chunkFilename = ({filter,
|
|
12
|
+
export const chunkFilename = ({filter, relPath}: Props) =>
|
|
13
13
|
filter(
|
|
14
14
|
`build.output.chunkFilename`,
|
|
15
|
-
join(`js`, `dynamic`,
|
|
15
|
+
join(`js`, `dynamic`, relPath(`@name.chunk`)).concat(
|
|
16
16
|
scriptExtension(filter, `.mjs`, `.js`),
|
|
17
17
|
),
|
|
18
18
|
)
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import {join} from 'node:path'
|
|
2
|
-
|
|
3
1
|
import type {Bud} from '@roots/bud-framework'
|
|
4
2
|
|
|
5
3
|
import {scriptExtension} from '../../helpers/scriptExtension.js'
|
|
6
4
|
|
|
7
5
|
interface Props {
|
|
8
6
|
filter: Bud['hooks'][`filter`]
|
|
9
|
-
|
|
7
|
+
relPath: Bud['relPath']
|
|
10
8
|
}
|
|
11
9
|
|
|
12
|
-
export const filename = ({filter,
|
|
10
|
+
export const filename = ({filter, relPath}: Props) =>
|
|
13
11
|
filter(
|
|
14
12
|
`build.output.filename`,
|
|
15
|
-
|
|
16
|
-
`js`,
|
|
17
|
-
path(`@name`).concat(scriptExtension(filter, `.mjs`, `.js`)),
|
|
18
|
-
),
|
|
13
|
+
relPath(`js`, `@name${scriptExtension(filter, `.mjs`, `.js`)}`),
|
|
19
14
|
)
|
|
@@ -8,13 +8,14 @@ export const output: Factory<`output`> = async ({
|
|
|
8
8
|
hooks: {filter},
|
|
9
9
|
isProduction,
|
|
10
10
|
path,
|
|
11
|
+
relPath,
|
|
11
12
|
}) =>
|
|
12
13
|
filter(`build.output`, {
|
|
13
|
-
assetModuleFilename: assetModuleFilename({filter,
|
|
14
|
-
chunkFilename: chunkFilename({filter,
|
|
14
|
+
assetModuleFilename: assetModuleFilename({filter, relPath}),
|
|
15
|
+
chunkFilename: chunkFilename({filter, relPath}),
|
|
15
16
|
clean: filter(`build.output.clean`, isProduction),
|
|
16
17
|
environment: filter(`build.output.environment`, undefined),
|
|
17
|
-
filename: filename({filter,
|
|
18
|
+
filename: filename({filter, relPath}),
|
|
18
19
|
module: filter(`build.output.module`, false),
|
|
19
20
|
path: filter(`build.output.path`, path(`@dist`)),
|
|
20
21
|
pathinfo: filter(`build.output.pathinfo`),
|
package/src/rule/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {Bud
|
|
1
|
+
import type {Bud} from '@roots/bud-framework'
|
|
2
2
|
import type {
|
|
3
3
|
Options,
|
|
4
4
|
Output,
|
|
@@ -8,62 +8,56 @@ import type {
|
|
|
8
8
|
import {bind} from '@roots/bud-support/decorators'
|
|
9
9
|
import isFunction from '@roots/bud-support/lodash/isFunction'
|
|
10
10
|
import isString from '@roots/bud-support/lodash/isString'
|
|
11
|
+
import type {RuleSetRule} from '@roots/bud-support/webpack'
|
|
11
12
|
|
|
12
|
-
import type {Item} from '../item/index.js'
|
|
13
13
|
import Base from '../shared/base.js'
|
|
14
14
|
|
|
15
|
-
export {Interface, Options, Output, Parser}
|
|
16
|
-
|
|
17
15
|
/**
|
|
18
|
-
*
|
|
16
|
+
* RuleSetRule
|
|
19
17
|
*/
|
|
20
18
|
class Rule extends Base implements Interface {
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* RuleSetRule test
|
|
23
21
|
*/
|
|
24
22
|
public test: Options['test']
|
|
25
23
|
|
|
26
24
|
/**
|
|
27
|
-
*
|
|
25
|
+
* RuleSetRule use
|
|
28
26
|
*/
|
|
29
27
|
public use?: Options[`use`]
|
|
30
28
|
|
|
31
29
|
/**
|
|
32
|
-
*
|
|
30
|
+
* RuleSetRule include
|
|
33
31
|
*/
|
|
34
32
|
public include?: Options['include']
|
|
35
33
|
|
|
36
34
|
/**
|
|
37
|
-
*
|
|
35
|
+
* RuleSetRule exclude
|
|
38
36
|
*/
|
|
39
37
|
public exclude?: Options['exclude']
|
|
40
38
|
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
40
|
+
* RuleSetRule type
|
|
43
41
|
*/
|
|
44
|
-
public type?:
|
|
42
|
+
public type?: Options['type']
|
|
45
43
|
|
|
46
44
|
/**
|
|
47
|
-
*
|
|
45
|
+
* RuleSetRule resourceQuery
|
|
48
46
|
*/
|
|
49
|
-
public resourceQuery?:
|
|
47
|
+
public resourceQuery?: Options['resourceQuery']
|
|
50
48
|
|
|
51
49
|
/**
|
|
52
|
-
*
|
|
50
|
+
* RuleSetRule parser
|
|
53
51
|
*/
|
|
54
|
-
public parser?:
|
|
52
|
+
public parser?: Options['parser']
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @public
|
|
55
|
+
* RuleSetRule generator
|
|
60
56
|
*/
|
|
61
|
-
public generator?:
|
|
57
|
+
public generator?: Options['generator']
|
|
62
58
|
|
|
63
59
|
/**
|
|
64
60
|
* Class constructor
|
|
65
|
-
*
|
|
66
|
-
* @public
|
|
67
61
|
*/
|
|
68
62
|
public constructor(_app: () => Bud, options?: Options) {
|
|
69
63
|
super(_app)
|
|
@@ -82,11 +76,6 @@ class Rule extends Base implements Interface {
|
|
|
82
76
|
|
|
83
77
|
/**
|
|
84
78
|
* Test value
|
|
85
|
-
*
|
|
86
|
-
* @param app - Bud instance
|
|
87
|
-
*
|
|
88
|
-
* @public
|
|
89
|
-
* @decorator `@bind`
|
|
90
79
|
*/
|
|
91
80
|
@bind
|
|
92
81
|
public getTest(): Output['test'] {
|
|
@@ -95,9 +84,6 @@ class Rule extends Base implements Interface {
|
|
|
95
84
|
|
|
96
85
|
/**
|
|
97
86
|
* Set test value
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
* @decorator `@bind`
|
|
101
87
|
*/
|
|
102
88
|
@bind
|
|
103
89
|
public setTest(test: Options['test']): this {
|
|
@@ -107,9 +93,6 @@ class Rule extends Base implements Interface {
|
|
|
107
93
|
|
|
108
94
|
/**
|
|
109
95
|
* Get parser value
|
|
110
|
-
*
|
|
111
|
-
* @public
|
|
112
|
-
* @decorator `@bind`
|
|
113
96
|
*/
|
|
114
97
|
@bind
|
|
115
98
|
public getParser(): Output['parser'] {
|
|
@@ -118,9 +101,6 @@ class Rule extends Base implements Interface {
|
|
|
118
101
|
|
|
119
102
|
/**
|
|
120
103
|
* Set parser value
|
|
121
|
-
*
|
|
122
|
-
* @public
|
|
123
|
-
* @decorator `@bind`
|
|
124
104
|
*/
|
|
125
105
|
@bind
|
|
126
106
|
public setParser(parser: Interface['parser']): this {
|
|
@@ -130,20 +110,14 @@ class Rule extends Base implements Interface {
|
|
|
130
110
|
|
|
131
111
|
/**
|
|
132
112
|
* Get use value
|
|
133
|
-
*
|
|
134
|
-
* @public
|
|
135
|
-
* @decorator `@bind`
|
|
136
113
|
*/
|
|
137
114
|
@bind
|
|
138
|
-
public getUse():
|
|
115
|
+
public getUse(): Options[`use`] {
|
|
139
116
|
return this.use
|
|
140
117
|
}
|
|
141
118
|
|
|
142
119
|
/**
|
|
143
120
|
* Set use value
|
|
144
|
-
*
|
|
145
|
-
* @public
|
|
146
|
-
* @decorator `@bind`
|
|
147
121
|
*/
|
|
148
122
|
@bind
|
|
149
123
|
public setUse(
|
|
@@ -155,9 +129,6 @@ class Rule extends Base implements Interface {
|
|
|
155
129
|
|
|
156
130
|
/**
|
|
157
131
|
* Get include value
|
|
158
|
-
*
|
|
159
|
-
* @public
|
|
160
|
-
* @decorator `@bind`
|
|
161
132
|
*/
|
|
162
133
|
@bind
|
|
163
134
|
public getInclude(): Array<string | RegExp> {
|
|
@@ -168,9 +139,6 @@ class Rule extends Base implements Interface {
|
|
|
168
139
|
|
|
169
140
|
/**
|
|
170
141
|
* Set include value
|
|
171
|
-
*
|
|
172
|
-
* @public
|
|
173
|
-
* @decorator `@bind`
|
|
174
142
|
*/
|
|
175
143
|
@bind
|
|
176
144
|
public setInclude(includes: Options['include']): this {
|
|
@@ -180,9 +148,6 @@ class Rule extends Base implements Interface {
|
|
|
180
148
|
|
|
181
149
|
/**
|
|
182
150
|
* Get include value
|
|
183
|
-
*
|
|
184
|
-
* @public
|
|
185
|
-
* @decorator `@bind`
|
|
186
151
|
*/
|
|
187
152
|
@bind
|
|
188
153
|
public getResourceQuery(): Output[`resourceQuery`] {
|
|
@@ -191,9 +156,6 @@ class Rule extends Base implements Interface {
|
|
|
191
156
|
|
|
192
157
|
/**
|
|
193
158
|
* Set include value
|
|
194
|
-
*
|
|
195
|
-
* @public
|
|
196
|
-
* @decorator `@bind`
|
|
197
159
|
*/
|
|
198
160
|
@bind
|
|
199
161
|
public setResourceQuery(query: Options['resourceQuery']): this {
|
|
@@ -203,9 +165,6 @@ class Rule extends Base implements Interface {
|
|
|
203
165
|
|
|
204
166
|
/**
|
|
205
167
|
* Get exclude value
|
|
206
|
-
*
|
|
207
|
-
* @public
|
|
208
|
-
* @decorator `@bind`
|
|
209
168
|
*/
|
|
210
169
|
@bind
|
|
211
170
|
public getExclude(): Array<string | RegExp> {
|
|
@@ -214,9 +173,6 @@ class Rule extends Base implements Interface {
|
|
|
214
173
|
|
|
215
174
|
/**
|
|
216
175
|
* Set exclude value
|
|
217
|
-
*
|
|
218
|
-
* @public
|
|
219
|
-
* @decorator `@bind`
|
|
220
176
|
*/
|
|
221
177
|
@bind
|
|
222
178
|
public setExclude(
|
|
@@ -230,9 +186,6 @@ class Rule extends Base implements Interface {
|
|
|
230
186
|
|
|
231
187
|
/**
|
|
232
188
|
* Get type value
|
|
233
|
-
*
|
|
234
|
-
* @public
|
|
235
|
-
* @decorator `@bind`
|
|
236
189
|
*/
|
|
237
190
|
@bind
|
|
238
191
|
public getType(): string {
|
|
@@ -241,9 +194,6 @@ class Rule extends Base implements Interface {
|
|
|
241
194
|
|
|
242
195
|
/**
|
|
243
196
|
* Set type value
|
|
244
|
-
*
|
|
245
|
-
* @public
|
|
246
|
-
* @decorator `@bind`
|
|
247
197
|
*/
|
|
248
198
|
@bind
|
|
249
199
|
public setType(type: Options[`type`]): this {
|
|
@@ -253,9 +203,6 @@ class Rule extends Base implements Interface {
|
|
|
253
203
|
|
|
254
204
|
/**
|
|
255
205
|
* Get generator value
|
|
256
|
-
*
|
|
257
|
-
* @public
|
|
258
|
-
* @decorator `@bind`
|
|
259
206
|
*/
|
|
260
207
|
@bind
|
|
261
208
|
public getGenerator() {
|
|
@@ -264,27 +211,18 @@ class Rule extends Base implements Interface {
|
|
|
264
211
|
|
|
265
212
|
/**
|
|
266
213
|
* Set generator value
|
|
267
|
-
*
|
|
268
|
-
* @public
|
|
269
|
-
* @decorator `@bind`
|
|
270
214
|
*/
|
|
271
215
|
@bind
|
|
272
|
-
public setGenerator(generator:
|
|
216
|
+
public setGenerator(generator: Options['generator']): this {
|
|
273
217
|
this.generator = this.wrap(generator)
|
|
274
218
|
return this
|
|
275
219
|
}
|
|
276
220
|
|
|
277
221
|
/**
|
|
278
222
|
* Produce final Base output
|
|
279
|
-
*
|
|
280
|
-
* @param app - {@link @roots/bud-framework#Bud}
|
|
281
|
-
* @returns finalized rule
|
|
282
|
-
*
|
|
283
|
-
* @public
|
|
284
|
-
* @decorator `@bind`
|
|
285
223
|
*/
|
|
286
224
|
@bind
|
|
287
|
-
public toWebpack(): Output {
|
|
225
|
+
public toWebpack(): Output & RuleSetRule {
|
|
288
226
|
const output: Output = Object.entries({
|
|
289
227
|
test: this.getTest(),
|
|
290
228
|
type: this.getType(),
|
|
@@ -316,3 +254,4 @@ class Rule extends Base implements Interface {
|
|
|
316
254
|
}
|
|
317
255
|
|
|
318
256
|
export {Rule}
|
|
257
|
+
export {Interface, Options, Output, Parser}
|
package/src/service.ts
CHANGED
|
@@ -57,7 +57,7 @@ export class Build extends Service implements Base.Service {
|
|
|
57
57
|
@bind
|
|
58
58
|
public async make(): Promise<Configuration> {
|
|
59
59
|
this.logger.log(`bud.build.make called`)
|
|
60
|
-
await this.app.hooks.fire(`build.before
|
|
60
|
+
await this.app.hooks.fire(`build.before`, this.app)
|
|
61
61
|
|
|
62
62
|
await import(`./config/index.js`).then(
|
|
63
63
|
async (records: Records) =>
|
|
@@ -77,7 +77,7 @@ export class Build extends Service implements Base.Service {
|
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
this.logger.success(`configuration successfully built`)
|
|
80
|
-
await this.app.hooks.fire(`build.after
|
|
80
|
+
await this.app.hooks.fire(`build.after`, this.app)
|
|
81
81
|
|
|
82
82
|
return this.config
|
|
83
83
|
}
|
package/lib/config/bail.d.ts
DELETED
package/lib/config/bail.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bail.d.ts","sourceRoot":"","sources":["../../src/config/bail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,IAAI,EAAE,OAAO,CAAC,MAAM,CACS,CAAA"}
|
package/lib/config/bail.js
DELETED
package/lib/config/bail.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bail.js","sourceRoot":"","sources":["../../src/config/bail.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,IAAI,GAAoB,KAAK,EAAE,EAAC,KAAK,EAAE,YAAY,EAAC,EAAE,EAAE,CACnE,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA"}
|
package/lib/config/cache.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/config/cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,OAAO,CACe,CAAA"}
|
package/lib/config/cache.js
DELETED
package/lib/config/cache.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/config/cache.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAqB,KAAK,EAAE,EAAC,KAAK,EAAE,KAAK,EAAC,EAAE,EAAE,CAC9D,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA"}
|
package/lib/config/context.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/config/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,SAAS,CAAkC,CAAA"}
|
package/lib/config/context.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/config/context.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAuB,KAAK,EAAE,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/config/dependencies.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,cAAc,CAMO,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/config/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,uCAAuC,CAAA;AAI/D,MAAM,CAAC,MAAM,YAAY,GAA4B,KAAK,EAAE,EAC1D,KAAK,EACL,IAAI,GACL,EAAE,EAAE,CACH,KAAK;KACF,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAAC;KAChC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA"}
|
package/lib/config/devtool.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtool.d.ts","sourceRoot":"","sources":["../../src/config/devtool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,SAAS,CACD,CAAA"}
|
package/lib/config/devtool.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devtool.js","sourceRoot":"","sources":["../../src/config/devtool.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAuB,KAAK,EAAE,EAAC,KAAK,EAAC,EAAE,EAAE,CAC3D,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA"}
|
package/lib/config/entry.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/config/entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,OAAO,CACuB,CAAA"}
|
package/lib/config/entry.js
DELETED
package/lib/config/entry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/config/entry.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAqB,KAAK,EAAE,EAAC,KAAK,EAAC,EAAE,EAAE,CACvD,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,EAAC,IAAI,EAAE,EAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAC,EAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/config/experiments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,aAAa,CACD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/config/experiments.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAA2B,KAAK,EAAE,EAAC,KAAK,EAAC,EAAE,EAAE,CACnE,KAAK,CAAC,MAAM,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"externals.d.ts","sourceRoot":"","sources":["../../src/config/externals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,WAAW,CACK,CAAA"}
|
package/lib/config/externals.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"externals.js","sourceRoot":"","sources":["../../src/config/externals.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAyB,KAAK,EAAC,GAAG,EAAC,EAAE,CACzD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"externalsType.d.ts","sourceRoot":"","sources":["../../src/config/externalsType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAEvC,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,eAAe,CAAsB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"externalsType.js","sourceRoot":"","sources":["../../src/config/externalsType.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAA6B,KAAK,EAAC,GAAG,EAAC,EAAE,CAAC,KAAK,CAAA"}
|