@roots/bud-build 5.8.5 → 6.0.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/{types/Build → lib}/config/builder.d.ts +0 -0
- package/lib/config/builder.d.ts.map +1 -0
- package/lib/{cjs/Build/config → config}/builder.js +28 -14
- package/lib/config/builder.js.map +1 -0
- package/lib/config/filenameFormat.d.ts +13 -0
- package/lib/config/filenameFormat.d.ts.map +1 -0
- package/lib/config/filenameFormat.js +21 -0
- package/lib/config/filenameFormat.js.map +1 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +3 -0
- package/lib/config/index.js.map +1 -0
- package/{types → lib/handlers}/items.d.ts +13 -19
- package/lib/handlers/items.d.ts.map +1 -0
- package/lib/handlers/items.js +92 -0
- package/lib/handlers/items.js.map +1 -0
- package/lib/handlers/loaders.d.ts +56 -0
- package/lib/handlers/loaders.d.ts.map +1 -0
- package/lib/handlers/loaders.js +82 -0
- package/lib/handlers/loaders.js.map +1 -0
- package/{types → lib/handlers}/rules.d.ts +14 -14
- package/lib/handlers/rules.d.ts.map +1 -0
- package/lib/{cjs → handlers}/rules.js +18 -32
- package/lib/handlers/rules.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +16 -0
- package/lib/index.js.map +1 -0
- package/{types/Item/index.d.ts → lib/item.d.ts} +2 -2
- package/lib/item.d.ts.map +1 -0
- package/lib/{cjs/Item/index.js → item.js} +12 -22
- package/lib/item.js.map +1 -0
- package/{types/Loader/index.d.ts → lib/loader.d.ts} +4 -8
- package/lib/loader.d.ts.map +1 -0
- package/lib/{cjs/Loader/index.js → loader.js} +3 -9
- package/lib/loader.js.map +1 -0
- package/{types/Rule/index.d.ts → lib/rule.d.ts} +3 -3
- package/lib/rule.d.ts.map +1 -0
- package/lib/{cjs/Rule/index.js → rule.js} +22 -32
- package/lib/rule.js.map +1 -0
- package/{types/Build/index.d.ts → lib/service.d.ts} +8 -10
- package/lib/service.d.ts.map +1 -0
- package/lib/{cjs/Build/index.js → service.js} +48 -72
- package/lib/service.js.map +1 -0
- package/{types/shared/Base.d.ts → lib/shared/base.d.ts} +6 -1
- package/lib/shared/base.d.ts.map +1 -0
- package/lib/shared/base.js +29 -0
- package/lib/shared/base.js.map +1 -0
- package/package.json +45 -38
- package/lib/cjs/Build/config/filenameFormat.js +0 -17
- package/lib/cjs/Build/config/index.js +0 -28
- package/lib/cjs/index.js +0 -50
- package/lib/cjs/items.js +0 -119
- package/lib/cjs/loaders.js +0 -63
- package/lib/cjs/shared/Base.js +0 -31
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/types/Build/config/builder.d.ts.map +0 -1
- package/types/Build/config/filenameFormat.d.ts +0 -13
- package/types/Build/config/filenameFormat.d.ts.map +0 -1
- package/types/Build/config/index.d.ts +0 -3
- package/types/Build/config/index.d.ts.map +0 -1
- package/types/Build/index.d.ts.map +0 -1
- package/types/Item/index.d.ts.map +0 -1
- package/types/Loader/index.d.ts.map +0 -1
- package/types/Rule/index.d.ts.map +0 -1
- package/types/index.d.ts +0 -17
- package/types/index.d.ts.map +0 -1
- package/types/items.d.ts.map +0 -1
- package/types/loaders.d.ts +0 -47
- package/types/loaders.d.ts.map +0 -1
- package/types/rules.d.ts.map +0 -1
- package/types/shared/Base.d.ts.map +0 -1
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/config/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAI7C;;;;;;;;;;;GAWG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CA6GnD"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.build = void 0;
|
|
4
|
-
const filenameFormat_1 = require("./filenameFormat");
|
|
1
|
+
import { filenameFormat } from './filenameFormat.js';
|
|
5
2
|
/**
|
|
6
3
|
* Initializes configuration builder hooks
|
|
7
4
|
*
|
|
@@ -14,11 +11,26 @@ const filenameFormat_1 = require("./filenameFormat");
|
|
|
14
11
|
*
|
|
15
12
|
* @public
|
|
16
13
|
*/
|
|
17
|
-
async function build(app) {
|
|
14
|
+
export async function build(app) {
|
|
18
15
|
app.hooks
|
|
19
16
|
.on('build.bail', () => app.isProduction)
|
|
20
17
|
.hooks.on('build.cache', () => app.cache.configuration)
|
|
21
18
|
.hooks.on('build.context', () => app.context.projectDir)
|
|
19
|
+
.hooks.on('build.externalsType', 'var')
|
|
20
|
+
.hooks.on('build.experiments.buildHttp', undefined)
|
|
21
|
+
.hooks.on('build.experiments', () => ({
|
|
22
|
+
asyncWebAssembly: app.hooks.filter('build.experiments.asyncWebAssembly'),
|
|
23
|
+
backCompat: app.hooks.filter('build.experiments.backCompat'),
|
|
24
|
+
buildHttp: app.hooks.filter('build.experiments.buildHttp'),
|
|
25
|
+
cacheUnaffected: app.hooks.filter('build.experiments.cacheUnaffected'),
|
|
26
|
+
css: app.hooks.filter('build.experiments.css'),
|
|
27
|
+
futureDefaults: app.hooks.filter('build.experiments.futureDefaults'),
|
|
28
|
+
layers: app.hooks.filter('build.experiments.layers'),
|
|
29
|
+
lazyCompilation: app.hooks.filter('build.experiments.lazyCompilation'),
|
|
30
|
+
topLevelAwait: app.hooks.filter('build.experiments.topLevelAwait'),
|
|
31
|
+
outputModule: app.hooks.filter('build.experiments.outputModule'),
|
|
32
|
+
syncWebAssembly: app.hooks.filter('build.experiments.syncWebAssembly'),
|
|
33
|
+
}))
|
|
22
34
|
.hooks.on('build.infrastructureLogging', () => ({
|
|
23
35
|
console: app.hooks.filter('build.infrastructureLogging.console'),
|
|
24
36
|
level: app.hooks.filter('build.infrastructureLogging.level'),
|
|
@@ -31,9 +43,7 @@ async function build(app) {
|
|
|
31
43
|
}))
|
|
32
44
|
.hooks.on('build.module.rules', () => [
|
|
33
45
|
...app.hooks.filter('build.module.rules.before'),
|
|
34
|
-
{
|
|
35
|
-
oneOf: app.hooks.filter('build.module.rules.oneOf'),
|
|
36
|
-
},
|
|
46
|
+
{ oneOf: app.hooks.filter('build.module.rules.oneOf') },
|
|
37
47
|
...app.hooks.filter('build.module.rules.after'),
|
|
38
48
|
])
|
|
39
49
|
.hooks.on('build.module.rules.oneOf', () => Object.values(app.build.rules).map(rule => rule.toWebpack()))
|
|
@@ -42,7 +52,9 @@ async function build(app) {
|
|
|
42
52
|
assetModuleFilename: app.hooks.filter('build.output.assetModuleFilename'),
|
|
43
53
|
chunkFilename: app.hooks.filter('build.output.chunkFilename'),
|
|
44
54
|
clean: app.hooks.filter('build.output.clean'),
|
|
55
|
+
environment: app.hooks.filter('build.output.environment'),
|
|
45
56
|
filename: app.hooks.filter('build.output.filename'),
|
|
57
|
+
module: app.hooks.filter('build.output.module'),
|
|
46
58
|
path: app.hooks.filter('build.output.path'),
|
|
47
59
|
pathinfo: app.hooks.filter('build.output.pathinfo'),
|
|
48
60
|
publicPath: app.hooks.filter('build.output.publicPath'),
|
|
@@ -51,9 +63,12 @@ async function build(app) {
|
|
|
51
63
|
'@src': app.path('@src'),
|
|
52
64
|
'@dist': app.path('@dist'),
|
|
53
65
|
}))
|
|
54
|
-
.hooks.on('build.output.assetModuleFilename', () =>
|
|
55
|
-
.hooks.on('build.output.chunkFilename', () =>
|
|
56
|
-
.hooks.on('build.output.
|
|
66
|
+
.hooks.on('build.output.assetModuleFilename', () => filenameFormat(app, '[ext]'))
|
|
67
|
+
.hooks.on('build.output.chunkFilename', () => filenameFormat(app))
|
|
68
|
+
.hooks.on('build.output.chunkLoading', () => 'jsonp')
|
|
69
|
+
.hooks.on('build.output.filename', () => filenameFormat(app))
|
|
70
|
+
.hooks.on('build.output.chunkFormat', () => 'array-push')
|
|
71
|
+
.hooks.on('build.output.module', () => undefined)
|
|
57
72
|
.hooks.on('build.output.path', () => app.path('@dist'))
|
|
58
73
|
.hooks.on('build.optimization', () => ({
|
|
59
74
|
emitOnErrors: app.hooks.filter('build.optimization.emitOnErrors'),
|
|
@@ -78,9 +93,8 @@ async function build(app) {
|
|
|
78
93
|
app.hooks.filter('location.@modules'),
|
|
79
94
|
]));
|
|
80
95
|
})
|
|
81
|
-
.hooks.on('build.target', () => app.project.has('manifest.browserslist')
|
|
82
|
-
app.project.isArray('manifest.browserslist')
|
|
96
|
+
.hooks.on('build.target', () => app.project.has('manifest.browserslist')
|
|
83
97
|
? `browserslist:${app.path('./package.json')}`
|
|
84
98
|
: undefined);
|
|
85
99
|
}
|
|
86
|
-
|
|
100
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/config/builder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAA;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAQ;IAClC,GAAG,CAAC,KAAK;SACN,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC;SACxC,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC;SACtD,KAAK,CAAC,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC;SACvD,KAAK,CAAC,EAAE,CAAC,qBAAqB,EAAE,KAAK,CAAC;SACtC,KAAK,CAAC,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC;SAClD,KAAK,CAAC,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;QACpC,gBAAgB,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAChC,oCA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,cAAc,EAAE,GAAG,EAAE,CAC7B,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;QACtC,CAAC,CAAC,gBAAgB,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;QAC9C,CAAC,CAAC,SAAS,CACd,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Bud } from '@roots/bud-framework';
|
|
2
|
+
/**
|
|
3
|
+
* Filename
|
|
4
|
+
*
|
|
5
|
+
* @param app - Bud
|
|
6
|
+
* @param extension - Filename extension
|
|
7
|
+
*
|
|
8
|
+
* @returns filename format
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const filenameFormat: (app: Bud, extension?: string) => string;
|
|
13
|
+
//# sourceMappingURL=filenameFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filenameFormat.d.ts","sourceRoot":"","sources":["../../src/config/filenameFormat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAE7C;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,QAAS,GAAG,cAAc,MAAM,KAAG,MAU7D,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filename
|
|
3
|
+
*
|
|
4
|
+
* @param app - Bud
|
|
5
|
+
* @param extension - Filename extension
|
|
6
|
+
*
|
|
7
|
+
* @returns filename format
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export const filenameFormat = (app, extension) => {
|
|
12
|
+
if (!extension) {
|
|
13
|
+
extension = app.hooks.filter('build.experiments.outputModule')
|
|
14
|
+
? '.mjs'
|
|
15
|
+
: '.js';
|
|
16
|
+
}
|
|
17
|
+
return app.hooks.filter('feature.hash')
|
|
18
|
+
? app.hooks.filter('value.hashFormat').concat(extension)
|
|
19
|
+
: app.hooks.filter('value.fileFormat').concat(extension);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=filenameFormat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filenameFormat.js","sourceRoot":"","sources":["../../src/config/filenameFormat.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAE,SAAkB,EAAU,EAAE;IACrE,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,gCAAgC,CAAC;YAC5D,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,KAAK,CAAA;KACV;IAED,OAAO,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC;QACrC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;QACxD,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;AAC5D,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAC,OAAO,EAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,EAAC,OAAO,EAAC,CAAA"}
|
|
@@ -1,73 +1,67 @@
|
|
|
1
|
-
import { Bud } from '@roots/bud-framework';
|
|
1
|
+
import type { Bud } from '@roots/bud-framework';
|
|
2
2
|
/**
|
|
3
3
|
* .css handler factory
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export declare const css: (app: Bud) => import("@roots/bud-framework/
|
|
7
|
+
export declare const css: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
8
8
|
/**
|
|
9
9
|
* .css handler factory
|
|
10
10
|
*
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export declare const cssModule: (app: Bud) => import("@roots/bud-framework/
|
|
13
|
+
export declare const cssModule: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
14
14
|
/**
|
|
15
15
|
* .csv handler factory
|
|
16
16
|
*
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export declare const csv: (app: Bud) => import("@roots/bud-framework/
|
|
19
|
+
export declare const csv: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
20
20
|
/**
|
|
21
21
|
* .html handler factory
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export declare const html: (app: Bud) => import("@roots/bud-framework/
|
|
25
|
+
export declare const html: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
26
26
|
/**
|
|
27
27
|
* Factory {@link Item} for style
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
export declare const style: (app: Bud) => import("@roots/bud-framework/
|
|
31
|
+
export declare const style: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
32
32
|
/**
|
|
33
33
|
* Factory {@link Item} for markdown
|
|
34
34
|
*
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
|
-
export declare const md: (app: Bud) => import("@roots/bud-framework/
|
|
37
|
+
export declare const md: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
38
38
|
/**
|
|
39
39
|
* Factory {@link Item} for minicss-extract-plugin
|
|
40
40
|
* @public
|
|
41
41
|
*/
|
|
42
|
-
export declare const minicss: (app: Bud) => import("@roots/bud-framework/
|
|
42
|
+
export declare const minicss: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
43
43
|
/**
|
|
44
44
|
* CSS rule which accounts for env
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
|
-
export declare const precss: (app: Bud) => import("@roots/bud-framework/
|
|
48
|
-
export declare const raw: ({ build }: Bud) => import("@roots/bud-framework/
|
|
47
|
+
export declare const precss: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
48
|
+
export declare const raw: ({ build }: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
49
49
|
/**
|
|
50
50
|
* Factory {@link Item} for file
|
|
51
51
|
*
|
|
52
52
|
* @public
|
|
53
53
|
*/
|
|
54
|
-
export declare const file: (app: Bud) => import("@roots/bud-framework/
|
|
55
|
-
/**
|
|
56
|
-
* Factory {@link Item} resolve-url
|
|
57
|
-
*
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
export declare const resolveUrl: (app: Bud) => import("@roots/bud-framework/types/services/build").Item;
|
|
54
|
+
export declare const file: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
61
55
|
/**
|
|
62
56
|
* Factory {@link Item} for xml
|
|
63
57
|
*
|
|
64
58
|
* @public
|
|
65
59
|
*/
|
|
66
|
-
export declare const xml: (app: Bud) => import("@roots/bud-framework/
|
|
60
|
+
export declare const xml: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
67
61
|
/**
|
|
68
62
|
* Factory {@link Item} for yml
|
|
69
63
|
*
|
|
70
64
|
* @public
|
|
71
65
|
*/
|
|
72
|
-
export declare const yml: (app: Bud) => import("@roots/bud-framework/
|
|
66
|
+
export declare const yml: (app: Bud) => import("@roots/bud-framework/lib/services/build").Item;
|
|
73
67
|
//# sourceMappingURL=items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/handlers/items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAOrB,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAS,GAAG,2DAS3B,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAA0C,CAAA;AAEtE;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DAA2C,CAAA;AAExE;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAS,GAAG,2DAA4C,CAAA;AAE1E;;;;GAIG;AACH,eAAO,MAAM,EAAE,QAAS,GAAG,2DAAuC,CAAA;AAElE;;;GAGG;AACH,eAAO,MAAM,OAAO,QAAS,GAAG,2DAMzB,CAAA;AAEP;;;GAGG;AACH,eAAO,MAAM,MAAM,QAAS,GAAG,2DACyC,CAAA;AAExE,eAAO,MAAM,GAAG,cAAa,GAAG,2DAAsC,CAAA;AAEtE;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DAQtB,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAA0C,CAAA;AAEtE;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAA0C,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .css handler factory
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const css = (app) => app.build
|
|
7
|
+
.makeItem()
|
|
8
|
+
.setLoader(`css`)
|
|
9
|
+
.setOptions(({ hooks }) => ({
|
|
10
|
+
importLoaders: 1,
|
|
11
|
+
sourceMap: hooks.filter('build.devtool') ? true : false,
|
|
12
|
+
}));
|
|
13
|
+
/**
|
|
14
|
+
* .css handler factory
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export const cssModule = (app) => app.build
|
|
19
|
+
.makeItem()
|
|
20
|
+
.setLoader(`css`)
|
|
21
|
+
.setOptions(({ hooks }) => ({
|
|
22
|
+
importLoaders: 1,
|
|
23
|
+
localIdentName: '[name]__[local]___[hash:base64:5]',
|
|
24
|
+
modules: true,
|
|
25
|
+
sourceMap: hooks.filter('build.devtool') ? true : false,
|
|
26
|
+
}));
|
|
27
|
+
/**
|
|
28
|
+
* .csv handler factory
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export const csv = (app) => app.build.makeItem().setLoader(`csv`);
|
|
33
|
+
/**
|
|
34
|
+
* .html handler factory
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export const html = (app) => app.build.makeItem().setLoader(`html`);
|
|
39
|
+
/**
|
|
40
|
+
* Factory {@link Item} for style
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export const style = (app) => app.build.makeItem().setLoader(`style`);
|
|
45
|
+
/**
|
|
46
|
+
* Factory {@link Item} for markdown
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export const md = (app) => app.build.makeItem({ loader: 'md' });
|
|
51
|
+
/**
|
|
52
|
+
* Factory {@link Item} for minicss-extract-plugin
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export const minicss = (app) => app.build
|
|
56
|
+
.makeItem()
|
|
57
|
+
.setLoader(`minicss`)
|
|
58
|
+
.setOptions(app => ({
|
|
59
|
+
publicPath: app.hooks.filter('build.output.publicPath'),
|
|
60
|
+
}));
|
|
61
|
+
/**
|
|
62
|
+
* CSS rule which accounts for env
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export const precss = (app) => app.build.makeItem().setLoader(app.isProduction ? `minicss` : `style`);
|
|
66
|
+
export const raw = ({ build }) => build.makeItem().setLoader(`raw`);
|
|
67
|
+
/**
|
|
68
|
+
* Factory {@link Item} for file
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export const file = (app) => app.build
|
|
73
|
+
.makeItem()
|
|
74
|
+
.setLoader(`file`)
|
|
75
|
+
.setOptions(app => ({
|
|
76
|
+
name: app.hooks.filter('feature.hash')
|
|
77
|
+
? app.hooks.filter('value.hashFormat').concat('.[ext]')
|
|
78
|
+
: app.hooks.filter('value.fileFormat').concat('.[ext]'),
|
|
79
|
+
}));
|
|
80
|
+
/**
|
|
81
|
+
* Factory {@link Item} for xml
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export const xml = (app) => app.build.makeItem().setLoader(`xml`);
|
|
86
|
+
/**
|
|
87
|
+
* Factory {@link Item} for yml
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export const yml = (app) => app.build.makeItem().setLoader(`yml`);
|
|
92
|
+
//# sourceMappingURL=items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/handlers/items.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAQ,EAAE,EAAE,CAC9B,GAAG,CAAC,KAAK;KACN,QAAQ,EAAE;KACV,SAAS,CAAC,KAAK,CAAC;KAChB,UAAU,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;IACxB,aAAa,EAAE,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;CACxD,CAAC,CAAC,CAAA;AAEP;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAQ,EAAE,EAAE,CACpC,GAAG,CAAC,KAAK;KACN,QAAQ,EAAE;KACV,SAAS,CAAC,KAAK,CAAC;KAChB,UAAU,CAAC,CAAC,EAAC,KAA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css: (app: Bud) => Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* csv loader
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare const csv: (app: Bud) => Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* file loader
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare const file: (app: Bud) => Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* html-loader
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export declare const html: (app: Bud) => Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* remark-loader
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare const remark: (app: Bud) => Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* `mini-css-extract-plugin.loader`
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare const minicss: (app: Bud) => Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* style-loader
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare const style: (app: Bud) => Promise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* xml-loader
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export declare const xml: (app: Bud) => Promise<any>;
|
|
50
|
+
/**
|
|
51
|
+
* yml-loader
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
export declare const yml: (app: Bud) => Promise<any>;
|
|
56
|
+
//# sourceMappingURL=loaders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../src/handlers/loaders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAG7C;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAe,GAAG,KAAG,QAAQ,GAAG,CAG/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAe,GAAG,KAAG,QAAQ,GAAG,CAG/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAe,GAAG,KAAG,QAAQ,GAAG,CAGhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAe,GAAG,KAAG,QAAQ,GAAG,CAGhD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,QAAe,GAAG,KAAG,QAAQ,GAAG,CAGlD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,QAAe,GAAG,KAAG,QAAQ,GAAG,CAEnD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAe,GAAG,KAAG,QAAQ,GAAG,CAGjD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAe,GAAG,KAAG,QAAQ,GAAG,CAG/C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAe,GAAG,KAAG,QAAQ,GAAG,CAG/C,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
2
|
+
/**
|
|
3
|
+
* css loader
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const css = async (app) => {
|
|
8
|
+
const loader = await app.module.resolve('css-loader');
|
|
9
|
+
return app.build.makeLoader().setSrc(loader);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* csv loader
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export const csv = async (app) => {
|
|
17
|
+
const loader = await app.module.resolve('csv-loader');
|
|
18
|
+
return app.build.makeLoader().setSrc(loader);
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* file loader
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export const file = async (app) => {
|
|
26
|
+
const loader = await app.module.resolve('file-loader');
|
|
27
|
+
return app.build.makeLoader().setSrc(loader);
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* html-loader
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export const html = async (app) => {
|
|
35
|
+
const loader = await app.module.resolve('html-loader');
|
|
36
|
+
return app.build.makeLoader().setSrc(loader);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* remark-loader
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export const remark = async (app) => {
|
|
44
|
+
const loader = await app.module.resolve('remark-loader');
|
|
45
|
+
return app.build.makeLoader().setSrc(loader);
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* `mini-css-extract-plugin.loader`
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export const minicss = async (app) => {
|
|
53
|
+
return app.build.makeLoader().setSrc(MiniCssExtractPlugin.loader);
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* style-loader
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
export const style = async (app) => {
|
|
61
|
+
const loader = await app.module.resolve('style-loader');
|
|
62
|
+
return app.build.makeLoader().setSrc(loader);
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* xml-loader
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export const xml = async (app) => {
|
|
70
|
+
const loader = await app.module.resolve('xml-loader');
|
|
71
|
+
return app.build.makeLoader().setSrc(loader);
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* yml-loader
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export const yml = async (app) => {
|
|
79
|
+
const loader = await app.module.resolve('yml-loader');
|
|
80
|
+
return app.build.makeLoader().setSrc(loader);
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=loaders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../src/handlers/loaders.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,yBAAyB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,EAAE,GAAQ,EAAgB,EAAE;IAClD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACrD,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,EAAE,GAAQ,EAAgB,EAAE;IAClD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACrD,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EAAE,GAAQ,EAAgB,EAAE;IACnD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;IACtD,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EAAE,GAAQ,EAAgB,EAAE;IACnD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;IACtD,O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,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACrD,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Bud } from '@roots/bud-framework';
|
|
1
|
+
import type { Bud } from '@roots/bud-framework';
|
|
2
2
|
/**
|
|
3
3
|
* .js rule
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export declare const js: (app: Bud) => import("@roots/bud-framework/
|
|
7
|
+
export declare const js: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
8
8
|
/**
|
|
9
9
|
* .css rule
|
|
10
10
|
*
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export declare const css: (app: Bud) => import("@roots/bud-framework/
|
|
13
|
+
export declare const css: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
14
14
|
/**
|
|
15
15
|
* .module.css rule
|
|
16
16
|
*
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export declare const cssModule: (app: Bud) => import("@roots/bud-framework/
|
|
19
|
+
export declare const cssModule: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
20
20
|
/**
|
|
21
21
|
* .jpg, .jpeg, .png, .gif rule
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export declare const image: (app: Bud) => import("@roots/bud-framework/
|
|
25
|
+
export declare const image: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
26
26
|
/**
|
|
27
27
|
* .webp assets factorry
|
|
28
28
|
*
|
|
@@ -31,54 +31,54 @@ export declare const image: (app: Bud) => import("@roots/bud-framework/types/ser
|
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export declare const webp: (app: Bud) => import("@roots/bud-framework/
|
|
34
|
+
export declare const webp: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
35
35
|
/**
|
|
36
36
|
* Returns {@link Rule} for `.woff`/`.otf` handling
|
|
37
37
|
* .svg rule
|
|
38
38
|
*
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
|
-
export declare const svg: (app: Bud) => import("@roots/bud-framework/
|
|
41
|
+
export declare const svg: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
42
42
|
/**
|
|
43
43
|
* .woff, .woff2, .otf rule
|
|
44
44
|
*
|
|
45
45
|
* @public
|
|
46
46
|
*/
|
|
47
|
-
export declare const font: (app: Bud) => import("@roots/bud-framework/
|
|
47
|
+
export declare const font: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
48
48
|
/**
|
|
49
49
|
* Returns {@link Rule} for `.jsonc` handling
|
|
50
50
|
*
|
|
51
51
|
* @public
|
|
52
52
|
*/
|
|
53
|
-
export declare const json: (app: Bud) => import("@roots/bud-framework/
|
|
53
|
+
export declare const json: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
54
54
|
/**
|
|
55
55
|
* Returns {@link Rule} for `.yml` / `.yaml` handling
|
|
56
56
|
*
|
|
57
57
|
* @public
|
|
58
58
|
*/
|
|
59
|
-
export declare const yml: (app: Bud) => import("@roots/bud-framework/
|
|
59
|
+
export declare const yml: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
60
60
|
/**
|
|
61
61
|
* Returns {@link Rule} for `.html` handling
|
|
62
62
|
*
|
|
63
63
|
* @public
|
|
64
64
|
*/
|
|
65
|
-
export declare const html: (app: Bud) => import("@roots/bud-framework/
|
|
65
|
+
export declare const html: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
66
66
|
/**
|
|
67
67
|
* Returns {@link Rule} for `.csv` handling
|
|
68
68
|
*
|
|
69
69
|
* @public
|
|
70
70
|
*/
|
|
71
|
-
export declare const csv: (app: Bud) => import("@roots/bud-framework/
|
|
71
|
+
export declare const csv: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
72
72
|
/**
|
|
73
73
|
* Returns {@link Rule} for `.xml` handling
|
|
74
74
|
*
|
|
75
75
|
* @public
|
|
76
76
|
*/
|
|
77
|
-
export declare const xml: (app: Bud) => import("@roots/bud-framework/
|
|
77
|
+
export declare const xml: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
78
78
|
/**
|
|
79
79
|
* Returns {@link Rule} for `.toml` handling
|
|
80
80
|
*
|
|
81
81
|
* @public
|
|
82
82
|
*/
|
|
83
|
-
export declare const toml: (app: Bud) => import("@roots/bud-framework/
|
|
83
|
+
export declare const toml: (app: Bud) => import("@roots/bud-framework/lib/services/build").Rule;
|
|
84
84
|
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/handlers/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAI7C;;;;GAIG;AACH,eAAO,MAAM,EAAE,QAAS,GAAG,2DAKZ,CAAA;AAEf;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAKE,CAAA;AAE9B;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAS,GAAG,2DAKE,CAAA;AAEpC;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAS,GAAG,2DAcvB,CAAA;AAEP;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DActB,CAAA;AAEP;;;;;GAKG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAcrB,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DActB,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DAOa,CAAA;AAE1C;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAMR,CAAA;AAEpB;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DAMR,CAAA;AAErB;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAMR,CAAA;AAEpB;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,2DAMR,CAAA;AAEpB;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,2DAOY,CAAA"}
|