@roots/bud-build 6.3.5 → 6.4.1
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/LICENSE.md +1 -1
- package/README.md +0 -3
- package/lib/config/bail.d.ts +3 -0
- package/lib/config/bail.d.ts.map +1 -0
- package/lib/config/bail.js +2 -0
- package/lib/config/bail.js.map +1 -0
- package/lib/config/builder.d.ts +27 -13
- package/lib/config/builder.d.ts.map +1 -1
- package/lib/config/builder.js +26 -100
- package/lib/config/builder.js.map +1 -1
- package/lib/config/cache.d.ts +3 -0
- package/lib/config/cache.d.ts.map +1 -0
- package/lib/config/cache.js +2 -0
- package/lib/config/cache.js.map +1 -0
- package/lib/config/context.d.ts +3 -0
- package/lib/config/context.d.ts.map +1 -0
- package/lib/config/context.js +2 -0
- package/lib/config/context.js.map +1 -0
- package/lib/config/experiments.d.ts +3 -0
- package/lib/config/experiments.d.ts.map +1 -0
- package/lib/config/experiments.js +14 -0
- package/lib/config/experiments.js.map +1 -0
- package/lib/config/infrastructureLogging.d.ts +3 -0
- package/lib/config/infrastructureLogging.d.ts.map +1 -0
- package/lib/config/infrastructureLogging.js +5 -0
- package/lib/config/infrastructureLogging.js.map +1 -0
- package/lib/config/module.d.ts +7 -0
- package/lib/config/module.d.ts.map +1 -0
- package/lib/config/module.js +19 -0
- package/lib/config/module.js.map +1 -0
- package/lib/config/optimization.d.ts +3 -0
- package/lib/config/optimization.d.ts.map +1 -0
- package/lib/config/optimization.js +9 -0
- package/lib/config/optimization.js.map +1 -0
- package/lib/config/output.d.ts +4 -0
- package/lib/config/output.d.ts.map +1 -0
- package/lib/config/output.js +12 -0
- package/lib/config/output.js.map +1 -0
- package/lib/config/resolve.d.ts +4 -0
- package/lib/config/resolve.d.ts.map +1 -0
- package/lib/config/resolve.js +11 -0
- package/lib/config/resolve.js.map +1 -0
- package/lib/handlers/items.d.ts +11 -11
- package/lib/handlers/items.d.ts.map +1 -1
- package/lib/handlers/items.js +28 -24
- package/lib/handlers/items.js.map +1 -1
- package/lib/handlers/loaders.d.ts +10 -10
- package/lib/handlers/loaders.d.ts.map +1 -1
- package/lib/handlers/loaders.js +17 -17
- package/lib/handlers/loaders.js.map +1 -1
- package/lib/handlers/rules/csv.d.ts +9 -0
- package/lib/handlers/rules/csv.d.ts.map +1 -0
- package/lib/handlers/rules/csv.js +11 -0
- package/lib/handlers/rules/csv.js.map +1 -0
- package/lib/handlers/rules/rules.d.ts +63 -0
- package/lib/handlers/rules/rules.d.ts.map +1 -0
- package/lib/handlers/rules/rules.js +124 -0
- package/lib/handlers/rules/rules.js.map +1 -0
- package/lib/handlers/rules/toml.d.ts +9 -0
- package/lib/handlers/rules/toml.d.ts.map +1 -0
- package/lib/handlers/rules/toml.js +13 -0
- package/lib/handlers/rules/toml.js.map +1 -0
- package/lib/handlers/rules/xml.d.ts +9 -0
- package/lib/handlers/rules/xml.d.ts.map +1 -0
- package/lib/handlers/rules/xml.js +11 -0
- package/lib/handlers/rules/xml.js.map +1 -0
- package/lib/index.d.ts +1 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -4
- package/lib/index.js.map +1 -1
- package/lib/{item.d.ts → item/item.d.ts} +20 -8
- package/lib/item/item.d.ts.map +1 -0
- package/lib/{item.js → item/item.js} +45 -15
- package/lib/item/item.js.map +1 -0
- package/lib/{loader.d.ts → loader/loader.d.ts} +7 -6
- package/lib/loader/loader.d.ts.map +1 -0
- package/lib/{loader.js → loader/loader.js} +4 -3
- package/lib/loader/loader.js.map +1 -0
- package/lib/{rule.d.ts → rule/rule.d.ts} +30 -26
- package/lib/rule/rule.d.ts.map +1 -0
- package/lib/{rule.js → rule/rule.js} +12 -15
- package/lib/rule/rule.js.map +1 -0
- package/lib/service.d.ts +22 -15
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +102 -81
- package/lib/service.js.map +1 -1
- package/lib/shared/base.d.ts +5 -4
- package/lib/shared/base.d.ts.map +1 -1
- package/lib/shared/base.js +2 -2
- package/lib/shared/base.js.map +1 -1
- package/package.json +12 -13
- package/lib/config/filenameFormat.d.ts +0 -13
- package/lib/config/filenameFormat.d.ts.map +0 -1
- package/lib/config/filenameFormat.js +0 -21
- package/lib/config/filenameFormat.js.map +0 -1
- package/lib/config/index.d.ts +0 -3
- package/lib/config/index.d.ts.map +0 -1
- package/lib/config/index.js +0 -3
- package/lib/config/index.js.map +0 -1
- package/lib/handlers/rules.d.ts +0 -85
- package/lib/handlers/rules.d.ts.map +0 -1
- package/lib/handlers/rules.js +0 -181
- package/lib/handlers/rules.js.map +0 -1
- package/lib/item.d.ts.map +0 -1
- package/lib/item.js.map +0 -1
- package/lib/loader.d.ts.map +0 -1
- package/lib/loader.js.map +0 -1
- package/lib/rule.d.ts.map +0 -1
- package/lib/rule.js.map +0 -1
package/lib/handlers/items.js
CHANGED
|
@@ -3,93 +3,97 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
export const css =
|
|
6
|
+
export const css = (app) => app.build
|
|
7
7
|
.makeItem()
|
|
8
|
-
.
|
|
9
|
-
.
|
|
10
|
-
|
|
8
|
+
.setIdent(`css`)
|
|
9
|
+
.setLoader(`css`)
|
|
10
|
+
.setOptions(() => ({
|
|
11
|
+
importLoaders: app.build.rules.css.getUse().length - 2,
|
|
11
12
|
modules: false,
|
|
12
|
-
sourceMap: hooks.filter(
|
|
13
|
+
sourceMap: app.hooks.filter(`build.devtool`) ? true : false,
|
|
13
14
|
}));
|
|
14
15
|
/**
|
|
15
16
|
* CSS module loader
|
|
16
17
|
*
|
|
17
18
|
* @public
|
|
18
19
|
*/
|
|
19
|
-
export const cssModule =
|
|
20
|
+
export const cssModule = (app) => app.build
|
|
20
21
|
.makeItem()
|
|
21
|
-
.
|
|
22
|
+
.setIdent(`cssModule`)
|
|
23
|
+
.setLoader(`css`)
|
|
22
24
|
.setOptions(({ build, hooks }) => ({
|
|
23
25
|
esModule: true,
|
|
24
26
|
importLoaders: build.rules.cssModule.getUse().length - 2,
|
|
25
|
-
localIdentName:
|
|
27
|
+
localIdentName: `[name]__[local]___[hash:base64:5]`,
|
|
26
28
|
modules: true,
|
|
27
|
-
sourceMap: hooks.filter(
|
|
29
|
+
sourceMap: hooks.filter(`build.devtool`) ? true : false,
|
|
28
30
|
}));
|
|
29
31
|
/**
|
|
30
32
|
* CSV loader
|
|
31
33
|
*
|
|
32
34
|
* @public
|
|
33
35
|
*/
|
|
34
|
-
export const csv =
|
|
36
|
+
export const csv = (app) => app.build.makeItem().setLoader(`csv`);
|
|
35
37
|
/**
|
|
36
38
|
* HTML loader
|
|
37
39
|
*
|
|
38
40
|
* @public
|
|
39
41
|
*/
|
|
40
|
-
export const html =
|
|
42
|
+
export const html = (app) => app.build.makeItem().setLoader(`html`).setIdent(`html`);
|
|
41
43
|
/**
|
|
42
44
|
* Style loader
|
|
43
45
|
*
|
|
44
46
|
* @public
|
|
45
47
|
*/
|
|
46
|
-
export const style =
|
|
48
|
+
export const style = (app) => app.build.makeItem().setLoader(`style`).setIdent(`style`);
|
|
47
49
|
/**
|
|
48
50
|
* Markdown loader
|
|
49
51
|
*
|
|
50
52
|
* @public
|
|
51
53
|
*/
|
|
52
|
-
export const md =
|
|
54
|
+
export const md = (app) => app.build.makeItem().setIdent(`md`).setLoader(`md`);
|
|
53
55
|
/**
|
|
54
56
|
* MiniCss loader
|
|
55
57
|
*
|
|
56
58
|
* @public
|
|
57
59
|
*/
|
|
58
|
-
export const minicss =
|
|
60
|
+
export const minicss = (app) => app.build
|
|
59
61
|
.makeItem()
|
|
60
|
-
.setLoader(
|
|
62
|
+
.setLoader(`minicss`)
|
|
63
|
+
.setIdent(`minicss`)
|
|
61
64
|
.setOptions(app => ({
|
|
62
|
-
publicPath: app.hooks.filter(
|
|
65
|
+
publicPath: app.hooks.filter(`build.output.publicPath`),
|
|
63
66
|
}));
|
|
64
67
|
/**
|
|
65
68
|
* Raw loader
|
|
66
69
|
*
|
|
67
70
|
* @public
|
|
68
71
|
*/
|
|
69
|
-
export const raw =
|
|
72
|
+
export const raw = ({ build }) => build.makeItem().setLoader(`raw`).setIdent(`raw`);
|
|
70
73
|
/**
|
|
71
74
|
* File loader
|
|
72
75
|
*
|
|
73
76
|
* @public
|
|
74
77
|
*/
|
|
75
|
-
export const file =
|
|
78
|
+
export const file = (app) => app.build
|
|
76
79
|
.makeItem()
|
|
77
80
|
.setLoader(`file`)
|
|
78
81
|
.setOptions(app => ({
|
|
79
|
-
name: app.hooks.filter(
|
|
80
|
-
? app.hooks.filter(
|
|
81
|
-
: app.hooks.filter(
|
|
82
|
-
}))
|
|
82
|
+
name: app.hooks.filter(`feature.hash`)
|
|
83
|
+
? app.hooks.filter(`value.hashFormat`).concat(`.[ext]`)
|
|
84
|
+
: app.hooks.filter(`value.fileFormat`).concat(`.[ext]`),
|
|
85
|
+
}))
|
|
86
|
+
.setIdent(`file`);
|
|
83
87
|
/**
|
|
84
88
|
* Xml loader
|
|
85
89
|
*
|
|
86
90
|
* @public
|
|
87
91
|
*/
|
|
88
|
-
export const xml =
|
|
92
|
+
export const xml = (app) => app.build.makeItem().setLoader(`xml`).setIdent(`xml`);
|
|
89
93
|
/**
|
|
90
94
|
* Yml loader
|
|
91
95
|
*
|
|
92
96
|
* @public
|
|
93
97
|
*/
|
|
94
|
-
export const yml =
|
|
98
|
+
export const yml = (app) => app.build.makeItem().setLoader(`yml`).setIdent(`yml`);
|
|
95
99
|
//# sourceMappingURL=items.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/handlers/items.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/handlers/items.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAQ,EAAQ,EAAE,CACpC,GAAG,CAAC,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AAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACvD,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;CAC1D,CAAC,CAAC;KACF,QAAQ,CAAC,MAAM,CAAC,CAAA;AAErB;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAQ,EAAQ,EAAE,CACpC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAQ,EAAQ,EAAE,CACpC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA"}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import type { Bud } from '@roots/bud-framework';
|
|
1
|
+
import type { Bud } from '@roots/bud-framework/bud';
|
|
2
2
|
import type { Loader } from '@roots/bud-framework/services/build';
|
|
3
3
|
/**
|
|
4
4
|
* css loader
|
|
5
5
|
*
|
|
6
6
|
* @public
|
|
7
7
|
*/
|
|
8
|
-
export declare const css: (app: Bud) =>
|
|
8
|
+
export declare const css: (app: Bud) => Loader;
|
|
9
9
|
/**
|
|
10
10
|
* csv loader
|
|
11
11
|
*
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
|
-
export declare const csv: (app: Bud) =>
|
|
14
|
+
export declare const csv: (app: Bud) => Loader;
|
|
15
15
|
/**
|
|
16
16
|
* file loader
|
|
17
17
|
*
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
|
-
export declare const file: (app: Bud) =>
|
|
20
|
+
export declare const file: (app: Bud) => Loader;
|
|
21
21
|
/**
|
|
22
22
|
* html-loader
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
*/
|
|
26
|
-
export declare const html: (app: Bud) =>
|
|
26
|
+
export declare const html: (app: Bud) => Loader;
|
|
27
27
|
/**
|
|
28
28
|
* remark-loader
|
|
29
29
|
*
|
|
30
30
|
* @public
|
|
31
31
|
*/
|
|
32
|
-
export declare const remark: (app: Bud) =>
|
|
32
|
+
export declare const remark: (app: Bud) => Loader;
|
|
33
33
|
/**
|
|
34
34
|
* `mini-css-extract-plugin.loader`
|
|
35
35
|
*
|
|
36
36
|
* @public
|
|
37
37
|
*/
|
|
38
|
-
export declare const minicss: (app: Bud) =>
|
|
38
|
+
export declare const minicss: (app: Bud) => Loader;
|
|
39
39
|
/**
|
|
40
40
|
* style-loader
|
|
41
41
|
*
|
|
42
42
|
* @public
|
|
43
43
|
*/
|
|
44
|
-
export declare const style: (app: Bud) =>
|
|
44
|
+
export declare const style: (app: Bud) => Loader;
|
|
45
45
|
/**
|
|
46
46
|
* xml-loader
|
|
47
47
|
*
|
|
48
48
|
* @public
|
|
49
49
|
*/
|
|
50
|
-
export declare const xml: (app: Bud) =>
|
|
50
|
+
export declare const xml: (app: Bud) => Loader;
|
|
51
51
|
/**
|
|
52
52
|
* yml-loader
|
|
53
53
|
*
|
|
54
54
|
* @public
|
|
55
55
|
*/
|
|
56
|
-
export declare const yml: (app: Bud) =>
|
|
56
|
+
export declare const yml: (app: Bud) => Loader;
|
|
57
57
|
//# sourceMappingURL=loaders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../src/handlers/loaders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../src/handlers/loaders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,0BAA0B,CAAA;AACjD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,qCAAqC,CAAA;AAG/D;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,KAAG,MAG9B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,KAAG,MAG9B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,KAAG,MAG/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,QAAS,GAAG,KAAG,MAG/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,MAAM,QAAS,GAAG,KAAG,MAGjC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,QAAS,GAAG,KAAG,MAElC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAAS,GAAG,KAAG,MAGhC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,KAAG,MAG9B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,QAAS,GAAG,KAAG,MAG9B,CAAA"}
|
package/lib/handlers/loaders.js
CHANGED
|
@@ -4,8 +4,8 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export const css =
|
|
8
|
-
const loader =
|
|
7
|
+
export const css = (app) => {
|
|
8
|
+
const loader = `css-loader`;
|
|
9
9
|
return app.build.makeLoader().setSrc(loader);
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
@@ -13,8 +13,8 @@ export const css = async (app) => {
|
|
|
13
13
|
*
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
|
-
export const csv =
|
|
17
|
-
const loader =
|
|
16
|
+
export const csv = (app) => {
|
|
17
|
+
const loader = `csv-loader`;
|
|
18
18
|
return app.build.makeLoader().setSrc(loader);
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
@@ -22,8 +22,8 @@ export const csv = async (app) => {
|
|
|
22
22
|
*
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export const file =
|
|
26
|
-
const loader =
|
|
25
|
+
export const file = (app) => {
|
|
26
|
+
const loader = `file-loader`;
|
|
27
27
|
return app.build.makeLoader().setSrc(loader);
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -31,8 +31,8 @@ export const file = async (app) => {
|
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export const html =
|
|
35
|
-
const loader =
|
|
34
|
+
export const html = (app) => {
|
|
35
|
+
const loader = `html-loader`;
|
|
36
36
|
return app.build.makeLoader().setSrc(loader);
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -40,8 +40,8 @@ export const html = async (app) => {
|
|
|
40
40
|
*
|
|
41
41
|
* @public
|
|
42
42
|
*/
|
|
43
|
-
export const remark =
|
|
44
|
-
const loader =
|
|
43
|
+
export const remark = (app) => {
|
|
44
|
+
const loader = `remark-loader`;
|
|
45
45
|
return app.build.makeLoader().setSrc(loader);
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
@@ -49,7 +49,7 @@ export const remark = async (app) => {
|
|
|
49
49
|
*
|
|
50
50
|
* @public
|
|
51
51
|
*/
|
|
52
|
-
export const minicss =
|
|
52
|
+
export const minicss = (app) => {
|
|
53
53
|
return app.build.makeLoader().setSrc(MiniCssExtractPlugin.loader);
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
@@ -57,8 +57,8 @@ export const minicss = async (app) => {
|
|
|
57
57
|
*
|
|
58
58
|
* @public
|
|
59
59
|
*/
|
|
60
|
-
export const style =
|
|
61
|
-
const loader =
|
|
60
|
+
export const style = (app) => {
|
|
61
|
+
const loader = `style-loader`;
|
|
62
62
|
return app.build.makeLoader().setSrc(loader);
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
@@ -66,8 +66,8 @@ export const style = async (app) => {
|
|
|
66
66
|
*
|
|
67
67
|
* @public
|
|
68
68
|
*/
|
|
69
|
-
export const xml =
|
|
70
|
-
const loader =
|
|
69
|
+
export const xml = (app) => {
|
|
70
|
+
const loader = `xml-loader`;
|
|
71
71
|
return app.build.makeLoader().setSrc(loader);
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
@@ -75,8 +75,8 @@ export const xml = async (app) => {
|
|
|
75
75
|
*
|
|
76
76
|
* @public
|
|
77
77
|
*/
|
|
78
|
-
export const yml =
|
|
79
|
-
const loader =
|
|
78
|
+
export const yml = (app) => {
|
|
79
|
+
const loader = `yml-loader`;
|
|
80
80
|
return app.build.makeLoader().setSrc(loader);
|
|
81
81
|
};
|
|
82
82
|
//# sourceMappingURL=loaders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../src/handlers/loaders.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,MAAM,yBAAyB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../src/handlers/loaders.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,MAAM,yBAAyB,CAAA;AAE1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAQ,EAAU,EAAE;IACtC,MAAM,MAAM,GAAG,YAAY,CAAA;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAQ,EAAU,EAAE;IACtC,MAAM,MAAM,GAAG,YAAY,CAAA;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,GAAQ,EAAU,EAAE;IACvC,MA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AG,CAAC,GAAQ,EAAU,EAAE;IACtC,MAAM,MAAM,GAAG,YAAY,CAAA;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9C,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Bud } from '@roots/bud-framework/src/bud.js';
|
|
2
|
+
import type * as Rule from '../../rule/rule.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns {@link Rule} for `.csv` handling
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const csv: ({ build }: Bud) => Rule.Interface;
|
|
9
|
+
//# sourceMappingURL=csv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../../src/handlers/rules/csv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,iCAAiC,CAAA;AAExD,OAAO,KAAK,KAAK,IAAI,MAAM,oBAAoB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,GAAG,cAAa,GAAG,KAAG,KAAK,SAKpB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns {@link Rule} for `.csv` handling
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const csv = ({ build }) => build
|
|
7
|
+
.makeRule()
|
|
8
|
+
.setInclude([app => app.path()])
|
|
9
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.csv`))
|
|
10
|
+
.setUse([`csv`]);
|
|
11
|
+
//# sourceMappingURL=csv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csv.js","sourceRoot":"","sources":["../../../src/handlers/rules/csv.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAC,KAAK,EAAM,EAAkB,EAAE,CAClD,KAAK;KACF,QAAQ,EAAE;KACV,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;KAC/B,OAAO,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;KACjD,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Bud } from '@roots/bud-framework/src/bud.js';
|
|
2
|
+
import type * as Rule from '../../rule/rule.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns {@link Rule} for js
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const js: ({ build }: Bud) => Rule.Interface;
|
|
9
|
+
/**
|
|
10
|
+
* Returns {@link Rule} for css
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare const css: ({ build }: Bud) => Rule.Interface;
|
|
15
|
+
/**
|
|
16
|
+
* Returns {@link Rule} for module.css
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare const cssModule: ({ build }: Bud) => Rule.Interface;
|
|
21
|
+
/**
|
|
22
|
+
* Returns {@link Rule} for svg
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare const svg: ({ build }: Bud) => Rule.Interface;
|
|
27
|
+
/**
|
|
28
|
+
* Returns {@link Rule} for webp
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export declare const webp: ({ build }: Bud) => Rule.Interface;
|
|
33
|
+
/**
|
|
34
|
+
* Returns {@link Rule} for images
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare const image: ({ build }: Bud) => Rule.Interface;
|
|
39
|
+
/**
|
|
40
|
+
* Returns {@link Rule} for fonts
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare const font: ({ build }: Bud) => Rule.Interface;
|
|
45
|
+
/**
|
|
46
|
+
* Returns {@link Rule} for json
|
|
47
|
+
*
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export declare const json: ({ build }: Bud) => Rule.Interface;
|
|
51
|
+
/**
|
|
52
|
+
* Returns {@link Rule} for yml
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare const yml: ({ build }: Bud) => Rule.Interface;
|
|
57
|
+
/**
|
|
58
|
+
* Returns {@link Rule} for html
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export declare const html: ({ build }: Bud) => Rule.Interface;
|
|
63
|
+
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/handlers/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,iCAAiC,CAAA;AAIxD,OAAO,KAAK,KAAK,IAAI,MAAM,oBAAoB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,EAAE,cAAa,GAAG,KAAG,KAAK,SAKlB,CAAA;AAErB;;;;GAIG;AACH,eAAO,MAAM,GAAG,cAAa,GAAG,KAAG,KAAK,SAKV,CAAA;AAE9B;;;;GAIG;AACH,eAAO,MAAM,SAAS,cAAa,GAAG,KAAG,KAAK,SAKV,CAAA;AAEpC;;;;GAIG;AACH,eAAO,MAAM,GAAG,cAAa,GAAG,KAAG,KAAK,SAcjC,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,IAAI,cAAa,GAAG,KAAG,KAAK,SAclC,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,KAAK,cAAa,GAAG,KAAG,KAAK,SAcnC,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,IAAI,cAAa,GAAG,KAAG,KAAK,SAclC,CAAA;AAEP;;;;GAIG;AACH,eAAO,MAAM,IAAI,cAAa,GAAG,KAAG,KAAK,SAMC,CAAA;AAE1C;;;;GAIG;AACH,eAAO,MAAM,GAAG,cAAa,GAAG,KAAG,KAAK,SAKpB,CAAA;AAEpB;;;;GAIG;AACH,eAAO,MAAM,IAAI,cAAa,GAAG,KAAG,KAAK,SAKpB,CAAA"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as json5Parser from 'json5';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* Returns {@link Rule} for js
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const js = ({ build }) => build
|
|
9
|
+
.makeRule()
|
|
10
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.js`))
|
|
11
|
+
.setInclude([app => app.path(`@src`)])
|
|
12
|
+
.setUse(() => []);
|
|
13
|
+
/**
|
|
14
|
+
* Returns {@link Rule} for css
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export const css = ({ build }) => build
|
|
19
|
+
.makeRule()
|
|
20
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.css`))
|
|
21
|
+
.setInclude([app => app.path(`@src`)])
|
|
22
|
+
.setUse([`precss`, `css`]);
|
|
23
|
+
/**
|
|
24
|
+
* Returns {@link Rule} for module.css
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export const cssModule = ({ build }) => build
|
|
29
|
+
.makeRule()
|
|
30
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.cssModule`))
|
|
31
|
+
.setInclude([app => app.path(`@src`)])
|
|
32
|
+
.setUse([`precss`, `cssModule`]);
|
|
33
|
+
/**
|
|
34
|
+
* Returns {@link Rule} for svg
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export const svg = ({ build }) => build
|
|
39
|
+
.makeRule()
|
|
40
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.svg`))
|
|
41
|
+
.setInclude([app => app.path(`@src`)])
|
|
42
|
+
.setType(`asset/resource`)
|
|
43
|
+
.setGenerator(app => ({
|
|
44
|
+
filename: join(`svg`, (app.hooks.filter(`feature.hash`)
|
|
45
|
+
? app.hooks.filter(`value.hashFormat`)
|
|
46
|
+
: app.hooks.filter(`value.fileFormat`)).concat(`[ext]`)),
|
|
47
|
+
}));
|
|
48
|
+
/**
|
|
49
|
+
* Returns {@link Rule} for webp
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export const webp = ({ build }) => build
|
|
54
|
+
.makeRule()
|
|
55
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.webp`))
|
|
56
|
+
.setInclude([app => app.path(`@src`)])
|
|
57
|
+
.setType(`asset/resource`)
|
|
58
|
+
.setGenerator(app => ({
|
|
59
|
+
filename: join(`images`, (app.hooks.filter(`feature.hash`)
|
|
60
|
+
? app.hooks.filter(`value.hashFormat`)
|
|
61
|
+
: app.hooks.filter(`value.fileFormat`)).concat(`[ext]`)),
|
|
62
|
+
}));
|
|
63
|
+
/**
|
|
64
|
+
* Returns {@link Rule} for images
|
|
65
|
+
*
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export const image = ({ build }) => build
|
|
69
|
+
.makeRule()
|
|
70
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.image`))
|
|
71
|
+
.setInclude([app => app.path(`@src`)])
|
|
72
|
+
.setType(`asset/resource`)
|
|
73
|
+
.setGenerator(app => ({
|
|
74
|
+
filename: join(`images`, (app.hooks.filter(`feature.hash`)
|
|
75
|
+
? app.hooks.filter(`value.hashFormat`)
|
|
76
|
+
: app.hooks.filter(`value.fileFormat`)).concat(`[ext]`)),
|
|
77
|
+
}));
|
|
78
|
+
/**
|
|
79
|
+
* Returns {@link Rule} for fonts
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export const font = ({ build }) => build
|
|
84
|
+
.makeRule()
|
|
85
|
+
.setType(`asset`)
|
|
86
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.font`))
|
|
87
|
+
.setInclude([app => app.path(`@src`)])
|
|
88
|
+
.setGenerator(app => ({
|
|
89
|
+
filename: join(`fonts`, (app.hooks.filter(`feature.hash`)
|
|
90
|
+
? app.hooks.filter(`value.hashFormat`)
|
|
91
|
+
: app.hooks.filter(`value.fileFormat`)).concat(`[ext]`)),
|
|
92
|
+
}));
|
|
93
|
+
/**
|
|
94
|
+
* Returns {@link Rule} for json
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export const json = ({ build }) => build
|
|
99
|
+
.makeRule()
|
|
100
|
+
.setType(`json`)
|
|
101
|
+
.setInclude([app => app.path()])
|
|
102
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.json`))
|
|
103
|
+
.setParser({ parse: json5Parser.parse });
|
|
104
|
+
/**
|
|
105
|
+
* Returns {@link Rule} for yml
|
|
106
|
+
*
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
export const yml = ({ build }) => build
|
|
110
|
+
.makeRule()
|
|
111
|
+
.setInclude([app => app.path()])
|
|
112
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.yml`))
|
|
113
|
+
.setUse([`yml`]);
|
|
114
|
+
/**
|
|
115
|
+
* Returns {@link Rule} for html
|
|
116
|
+
*
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
export const html = ({ build }) => build
|
|
120
|
+
.makeRule()
|
|
121
|
+
.setInclude([app => app.path()])
|
|
122
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.html`))
|
|
123
|
+
.setUse([`html`]);
|
|
124
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|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nD,KAAK;KACF,QAAQ,EAAE;KACV,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;KAC/B,OAAO,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;KAClD,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Bud } from '@roots/bud-framework/src/bud.js';
|
|
2
|
+
import type * as Rule from '../../rule/rule.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns {@link Rule} for `.toml` handling
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const toml: ({ build }: Bud) => Rule.Interface;
|
|
9
|
+
//# sourceMappingURL=toml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../../../src/handlers/rules/toml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,iCAAiC,CAAA;AAGxD,OAAO,KAAK,KAAK,IAAI,MAAM,oBAAoB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,IAAI,cAAa,GAAG,KAAG,KAAK,SAMA,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as tomlParser from 'toml';
|
|
2
|
+
/**
|
|
3
|
+
* Returns {@link Rule} for `.toml` handling
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const toml = ({ build }) => build
|
|
8
|
+
.makeRule()
|
|
9
|
+
.setType(`json`)
|
|
10
|
+
.setInclude([app => app.path()])
|
|
11
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.toml`))
|
|
12
|
+
.setParser({ parse: tomlParser.parse });
|
|
13
|
+
//# sourceMappingURL=toml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toml.js","sourceRoot":"","sources":["../../../src/handlers/rules/toml.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,MAAM,CAAA;AAIlC;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAC,KAAK,EAAM,EAAkB,EAAE,CACnD,KAAK;KACF,QAAQ,EAAE;KACV,OAAO,CAAC,MAAM,CAAC;KACf,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;KAC/B,OAAO,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;KAClD,SAAS,CAAC,EAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Bud } from '@roots/bud-framework/src/bud.js';
|
|
2
|
+
import type * as Rule from '../../rule/rule.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns {@link Rule} for `.xml` handling
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const xml: ({ build }: Bud) => Rule.Interface;
|
|
9
|
+
//# sourceMappingURL=xml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../src/handlers/rules/xml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,iCAAiC,CAAA;AAExD,OAAO,KAAK,KAAK,IAAI,MAAM,oBAAoB,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,GAAG,cAAa,GAAG,KAAG,KAAK,SAKpB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns {@link Rule} for `.xml` handling
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const xml = ({ build }) => build
|
|
7
|
+
.makeRule()
|
|
8
|
+
.setInclude([app => app.path()])
|
|
9
|
+
.setTest(({ hooks }) => hooks.filter(`pattern.xml`))
|
|
10
|
+
.setUse([`xml`]);
|
|
11
|
+
//# sourceMappingURL=xml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../../src/handlers/rules/xml.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAC,KAAK,EAAM,EAAkB,EAAE,CAClD,KAAK;KACF,QAAQ,EAAE;KACV,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;KAC/B,OAAO,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;KACjD,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAA"}
|
package/lib/index.d.ts
CHANGED
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import Item from './item.js';
|
|
10
|
-
import Loader from './loader.js';
|
|
11
|
-
import Rule from './rule.js';
|
|
12
9
|
import Build from './service.js';
|
|
13
|
-
export
|
|
10
|
+
export default Build;
|
|
14
11
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,eAAe,KAAK,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
|
-
import Item from './item.js';
|
|
12
|
-
import Loader from './loader.js';
|
|
13
|
-
import Rule from './rule.js';
|
|
14
11
|
import Build from './service.js';
|
|
15
|
-
export
|
|
12
|
+
export default Build;
|
|
16
13
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,kCAAkC;AAElC;;;;;;;GAOG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,kCAAkC;AAElC;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,eAAe,KAAK,CAAA"}
|