@roots/bud-build 6.6.5 → 6.6.6
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 +28 -19
- package/docs/exports.md +13 -0
- package/docs/rules.md +32 -0
- package/lib/config/bail.d.ts +2 -2
- package/lib/config/bail.d.ts.map +1 -1
- package/lib/config/bail.js +1 -1
- package/lib/config/bail.js.map +1 -1
- package/lib/config/cache.d.ts +2 -2
- package/lib/config/cache.d.ts.map +1 -1
- package/lib/config/cache.js +1 -1
- package/lib/config/cache.js.map +1 -1
- package/lib/config/context.d.ts +2 -2
- package/lib/config/context.d.ts.map +1 -1
- package/lib/config/context.js +1 -1
- package/lib/config/context.js.map +1 -1
- package/lib/config/dependencies.d.ts +3 -0
- package/lib/config/dependencies.d.ts.map +1 -0
- package/lib/config/dependencies.js +5 -0
- package/lib/config/dependencies.js.map +1 -0
- package/lib/config/devtool.d.ts +2 -2
- package/lib/config/devtool.d.ts.map +1 -1
- package/lib/config/devtool.js +1 -1
- package/lib/config/devtool.js.map +1 -1
- package/lib/config/entry.d.ts +3 -0
- package/lib/config/entry.d.ts.map +1 -0
- package/lib/config/entry.js +2 -0
- package/lib/config/entry.js.map +1 -0
- package/lib/config/experiments.d.ts +2 -2
- package/lib/config/experiments.d.ts.map +1 -1
- package/lib/config/experiments.js +1 -1
- package/lib/config/experiments.js.map +1 -1
- package/lib/config/externals.d.ts +3 -0
- package/lib/config/externals.d.ts.map +1 -0
- package/lib/config/externals.js +2 -0
- package/lib/config/externals.js.map +1 -0
- package/lib/config/externalsType.d.ts +3 -0
- package/lib/config/externalsType.d.ts.map +1 -0
- package/lib/config/externalsType.js +2 -0
- package/lib/config/externalsType.js.map +1 -0
- package/lib/config/index.d.ts +35 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +27 -0
- package/lib/config/index.js.map +1 -0
- package/lib/config/infrastructureLogging.d.ts +2 -2
- package/lib/config/infrastructureLogging.d.ts.map +1 -1
- package/lib/config/infrastructureLogging.js +12 -3
- package/lib/config/infrastructureLogging.js.map +1 -1
- package/lib/config/loader.d.ts +3 -0
- package/lib/config/loader.d.ts.map +1 -0
- package/lib/config/loader.js +2 -0
- package/lib/config/loader.js.map +1 -0
- package/lib/config/mode.d.ts +3 -0
- package/lib/config/mode.d.ts.map +1 -0
- package/lib/config/mode.js +2 -0
- package/lib/config/mode.js.map +1 -0
- package/lib/config/module.d.ts +2 -6
- package/lib/config/module.d.ts.map +1 -1
- package/lib/config/module.js +20 -18
- package/lib/config/module.js.map +1 -1
- package/lib/config/name.d.ts +3 -0
- package/lib/config/name.d.ts.map +1 -0
- package/lib/config/name.js +2 -0
- package/lib/config/name.js.map +1 -0
- package/lib/config/node.d.ts +3 -0
- package/lib/config/node.d.ts.map +1 -0
- package/lib/config/node.js +2 -0
- package/lib/config/node.js.map +1 -0
- package/lib/config/optimization.d.ts +2 -2
- package/lib/config/optimization.d.ts.map +1 -1
- package/lib/config/optimization.js +8 -7
- package/lib/config/optimization.js.map +1 -1
- package/lib/config/output/assetModuleFilename.d.ts +8 -0
- package/lib/config/output/assetModuleFilename.d.ts.map +1 -0
- package/lib/config/output/assetModuleFilename.js +2 -0
- package/lib/config/output/assetModuleFilename.js.map +1 -0
- package/lib/config/output/chunkFilename.d.ts +8 -0
- package/lib/config/output/chunkFilename.d.ts.map +1 -0
- package/lib/config/output/chunkFilename.js +4 -0
- package/lib/config/output/chunkFilename.js.map +1 -0
- package/lib/config/output/filename.d.ts +8 -0
- package/lib/config/output/filename.d.ts.map +1 -0
- package/lib/config/output/filename.js +4 -0
- package/lib/config/output/filename.js.map +1 -0
- package/lib/config/output/index.d.ts +3 -0
- package/lib/config/output/index.d.ts.map +1 -0
- package/lib/config/output/index.js +18 -0
- package/lib/config/output/index.js.map +1 -0
- package/lib/config/parallelism.d.ts +3 -0
- package/lib/config/parallelism.d.ts.map +1 -0
- package/lib/config/parallelism.js +3 -0
- package/lib/config/parallelism.js.map +1 -0
- package/lib/config/performance.d.ts +3 -0
- package/lib/config/performance.d.ts.map +1 -0
- package/lib/config/performance.js +2 -0
- package/lib/config/performance.js.map +1 -0
- package/lib/config/plugins.d.ts +3 -0
- package/lib/config/plugins.d.ts.map +1 -0
- package/lib/config/plugins.js +2 -0
- package/lib/config/plugins.js.map +1 -0
- package/lib/config/profile.d.ts +3 -0
- package/lib/config/profile.d.ts.map +1 -0
- package/lib/config/profile.js +2 -0
- package/lib/config/profile.js.map +1 -0
- package/lib/config/recordsPath.d.ts +3 -0
- package/lib/config/recordsPath.d.ts.map +1 -0
- package/lib/config/recordsPath.js +2 -0
- package/lib/config/recordsPath.js.map +1 -0
- package/lib/config/resolve.d.ts +2 -3
- package/lib/config/resolve.d.ts.map +1 -1
- package/lib/config/resolve.js +16 -9
- package/lib/config/resolve.js.map +1 -1
- package/lib/config/stats.d.ts +3 -0
- package/lib/config/stats.d.ts.map +1 -0
- package/lib/config/stats.js +17 -0
- package/lib/config/stats.js.map +1 -0
- package/lib/config/target.d.ts +3 -0
- package/lib/config/target.d.ts.map +1 -0
- package/lib/config/target.js +4 -0
- package/lib/config/target.js.map +1 -0
- package/lib/handlers/index.d.ts +19 -0
- package/lib/handlers/index.d.ts.map +1 -0
- package/lib/handlers/index.js +6 -0
- package/lib/handlers/index.js.map +1 -0
- package/lib/handlers/items/items.d.ts +69 -0
- package/lib/handlers/items/items.d.ts.map +1 -0
- package/lib/handlers/items/items.js +93 -0
- package/lib/handlers/items/items.js.map +1 -0
- package/lib/handlers/loaders/loaders.d.ts +12 -0
- package/lib/handlers/loaders/loaders.d.ts.map +1 -0
- package/lib/handlers/loaders/loaders.js +11 -0
- package/lib/handlers/loaders/loaders.js.map +1 -0
- package/lib/handlers/register.d.ts +18 -0
- package/lib/handlers/register.d.ts.map +1 -0
- package/lib/handlers/register.js +28 -0
- package/lib/handlers/register.js.map +1 -0
- package/lib/handlers/rules/css.d.ts +3 -0
- package/lib/handlers/rules/css.d.ts.map +1 -0
- package/lib/handlers/rules/css.js +5 -0
- package/lib/handlers/rules/css.js.map +1 -0
- package/lib/handlers/rules/css.module.d.ts +3 -0
- package/lib/handlers/rules/css.module.d.ts.map +1 -0
- package/lib/handlers/rules/css.module.js +5 -0
- package/lib/handlers/rules/css.module.js.map +1 -0
- package/lib/handlers/rules/csv.d.ts +2 -8
- package/lib/handlers/rules/csv.d.ts.map +1 -1
- package/lib/handlers/rules/csv.js +3 -9
- package/lib/handlers/rules/csv.js.map +1 -1
- package/lib/handlers/rules/font.d.ts +3 -0
- package/lib/handlers/rules/font.d.ts.map +1 -0
- package/lib/handlers/rules/font.inline.d.ts +3 -0
- package/lib/handlers/rules/font.inline.d.ts.map +1 -0
- package/lib/handlers/rules/font.inline.js +6 -0
- package/lib/handlers/rules/font.inline.js.map +1 -0
- package/lib/handlers/rules/font.js +5 -0
- package/lib/handlers/rules/font.js.map +1 -0
- package/lib/handlers/rules/html.d.ts +3 -0
- package/lib/handlers/rules/html.d.ts.map +1 -0
- package/lib/handlers/rules/html.js +5 -0
- package/lib/handlers/rules/html.js.map +1 -0
- package/lib/handlers/rules/image.d.ts +3 -0
- package/lib/handlers/rules/image.d.ts.map +1 -0
- package/lib/handlers/rules/image.inline.d.ts +3 -0
- package/lib/handlers/rules/image.inline.d.ts.map +1 -0
- package/lib/handlers/rules/image.inline.js +6 -0
- package/lib/handlers/rules/image.inline.js.map +1 -0
- package/lib/handlers/rules/image.js +5 -0
- package/lib/handlers/rules/image.js.map +1 -0
- package/lib/handlers/rules/index.d.ts +19 -0
- package/lib/handlers/rules/index.d.ts.map +1 -0
- package/lib/handlers/rules/index.js +35 -0
- package/lib/handlers/rules/index.js.map +1 -0
- package/lib/handlers/rules/js.d.ts +3 -0
- package/lib/handlers/rules/js.d.ts.map +1 -0
- package/lib/handlers/rules/js.js +5 -0
- package/lib/handlers/rules/js.js.map +1 -0
- package/lib/handlers/rules/json.d.ts +3 -0
- package/lib/handlers/rules/json.d.ts.map +1 -0
- package/lib/handlers/rules/json.js +7 -0
- package/lib/handlers/rules/json.js.map +1 -0
- package/lib/handlers/rules/svg.d.ts +3 -0
- package/lib/handlers/rules/svg.d.ts.map +1 -0
- package/lib/handlers/rules/svg.inline.d.ts +3 -0
- package/lib/handlers/rules/svg.inline.d.ts.map +1 -0
- package/lib/handlers/rules/svg.inline.js +6 -0
- package/lib/handlers/rules/svg.inline.js.map +1 -0
- package/lib/handlers/rules/svg.js +5 -0
- package/lib/handlers/rules/svg.js.map +1 -0
- package/lib/handlers/rules/toml.d.ts +2 -8
- package/lib/handlers/rules/toml.d.ts.map +1 -1
- package/lib/handlers/rules/toml.js +3 -9
- package/lib/handlers/rules/toml.js.map +1 -1
- package/lib/handlers/rules/webp.d.ts +3 -0
- package/lib/handlers/rules/webp.d.ts.map +1 -0
- package/lib/handlers/rules/webp.js +5 -0
- package/lib/handlers/rules/webp.js.map +1 -0
- package/lib/handlers/rules/xml.d.ts +2 -8
- package/lib/handlers/rules/xml.d.ts.map +1 -1
- package/lib/handlers/rules/xml.js +3 -9
- package/lib/handlers/rules/xml.js.map +1 -1
- package/lib/handlers/rules/yml.d.ts +3 -0
- package/lib/handlers/rules/yml.d.ts.map +1 -0
- package/lib/handlers/rules/yml.js +5 -0
- package/lib/handlers/rules/yml.js.map +1 -0
- package/lib/helpers/isMjs.d.ts +3 -0
- package/lib/helpers/isMjs.d.ts.map +1 -0
- package/lib/helpers/isMjs.js +2 -0
- package/lib/helpers/isMjs.js.map +1 -0
- package/lib/helpers/scriptExtension.d.ts +3 -0
- package/lib/helpers/scriptExtension.d.ts.map +1 -0
- package/lib/helpers/scriptExtension.js +5 -0
- package/lib/helpers/scriptExtension.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/item/index.d.ts +2 -2
- package/lib/item/index.d.ts.map +1 -1
- package/lib/item/index.js +6 -3
- package/lib/item/index.js.map +1 -1
- package/lib/loader/index.d.ts +2 -1
- package/lib/loader/index.d.ts.map +1 -1
- package/lib/loader/index.js +2 -1
- package/lib/loader/index.js.map +1 -1
- package/lib/rule/index.d.ts +30 -21
- package/lib/rule/index.d.ts.map +1 -1
- package/lib/rule/index.js +64 -37
- package/lib/rule/index.js.map +1 -1
- package/lib/service.d.ts +9 -12
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +28 -59
- package/lib/service.js.map +1 -1
- package/lib/shared/base.d.ts +1 -1
- package/lib/shared/base.d.ts.map +1 -1
- package/lib/shared/base.js +4 -2
- package/lib/shared/base.js.map +1 -1
- package/lib/types.d.ts +8 -2
- package/lib/types.d.ts.map +1 -1
- package/package.json +35 -37
- package/src/config/bail.ts +4 -0
- package/src/config/cache.ts +4 -0
- package/src/config/context.ts +3 -0
- package/src/config/dependencies.ts +11 -0
- package/src/config/devtool.ts +4 -0
- package/src/config/entry.ts +4 -0
- package/src/config/experiments.ts +4 -0
- package/src/config/externals.ts +4 -0
- package/src/config/externalsType.ts +3 -0
- package/src/config/index.test.ts +129 -0
- package/src/config/index.ts +67 -0
- package/src/config/infrastructureLogging.ts +21 -0
- package/src/config/loader.ts +4 -0
- package/src/config/mode.ts +4 -0
- package/src/config/module.ts +43 -0
- package/src/config/name.ts +4 -0
- package/src/config/node.ts +4 -0
- package/src/config/optimization.ts +19 -0
- package/src/config/output/assetModuleFilename.ts +9 -0
- package/src/config/output/chunkFilename.ts +18 -0
- package/src/config/output/filename.ts +19 -0
- package/src/config/output/index.ts +27 -0
- package/src/config/parallelism.ts +6 -0
- package/src/config/performance.ts +4 -0
- package/src/config/plugins.ts +4 -0
- package/src/config/profile.ts +4 -0
- package/src/config/recordsPath.ts +7 -0
- package/src/config/resolve.ts +33 -0
- package/src/config/stats.ts +22 -0
- package/src/config/target.ts +9 -0
- package/src/handlers/index.ts +22 -0
- package/src/handlers/items/items.ts +117 -0
- package/src/handlers/loaders/loaders.ts +31 -0
- package/src/handlers/register.ts +51 -0
- package/src/handlers/rules/css.module.ts +7 -0
- package/src/handlers/rules/css.ts +7 -0
- package/src/handlers/rules/csv.test.ts +25 -0
- package/src/handlers/rules/csv.ts +7 -0
- package/src/handlers/rules/font.inline.ts +8 -0
- package/src/handlers/rules/font.ts +7 -0
- package/src/handlers/rules/html.ts +7 -0
- package/src/handlers/rules/image.inline.ts +8 -0
- package/src/handlers/rules/image.ts +7 -0
- package/src/handlers/rules/index.ts +35 -0
- package/src/handlers/rules/js.ts +7 -0
- package/src/handlers/rules/json.ts +10 -0
- package/src/handlers/rules/svg.inline.ts +8 -0
- package/src/handlers/rules/svg.ts +7 -0
- package/src/handlers/rules/toml.test.ts +22 -0
- package/src/handlers/rules/toml.ts +10 -0
- package/src/handlers/rules/webp.ts +7 -0
- package/src/handlers/rules/xml.test.ts +24 -0
- package/src/handlers/rules/xml.ts +7 -0
- package/src/handlers/rules/yml.ts +7 -0
- package/src/helpers/isMjs.ts +4 -0
- package/src/helpers/scriptExtension.ts +11 -0
- package/src/index.ts +17 -0
- package/src/item/index.ts +181 -0
- package/src/loader/index.ts +40 -0
- package/src/rule/index.test.ts +88 -0
- package/src/rule/index.ts +311 -0
- package/src/service.ts +245 -0
- package/src/shared/base.ts +37 -0
- package/src/types.ts +57 -0
- package/lib/config/builder.d.ts +0 -31
- package/lib/config/builder.d.ts.map +0 -1
- package/lib/config/builder.js +0 -32
- package/lib/config/builder.js.map +0 -1
- package/lib/config/output.d.ts +0 -4
- package/lib/config/output.d.ts.map +0 -1
- package/lib/config/output.js +0 -13
- package/lib/config/output.js.map +0 -1
- package/lib/handlers/items.d.ts +0 -69
- package/lib/handlers/items.d.ts.map +0 -1
- package/lib/handlers/items.js +0 -99
- package/lib/handlers/items.js.map +0 -1
- package/lib/handlers/loaders.d.ts +0 -57
- package/lib/handlers/loaders.d.ts.map +0 -1
- package/lib/handlers/loaders.js +0 -82
- package/lib/handlers/loaders.js.map +0 -1
- package/lib/handlers/rules/rules.d.ts +0 -63
- package/lib/handlers/rules/rules.d.ts.map +0 -1
- package/lib/handlers/rules/rules.js +0 -124
- package/lib/handlers/rules/rules.js.map +0 -1
package/lib/handlers/loaders.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
2
|
-
/**
|
|
3
|
-
* css loader
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export const css = (app) => {
|
|
8
|
-
const loader = `css-loader`;
|
|
9
|
-
return app.build.makeLoader().setSrc(loader);
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* csv loader
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export const csv = (app) => {
|
|
17
|
-
const loader = `csv-loader`;
|
|
18
|
-
return app.build.makeLoader().setSrc(loader);
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* file loader
|
|
22
|
-
*
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export const file = (app) => {
|
|
26
|
-
const loader = `file-loader`;
|
|
27
|
-
return app.build.makeLoader().setSrc(loader);
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* html-loader
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
*/
|
|
34
|
-
export const html = (app) => {
|
|
35
|
-
const loader = `html-loader`;
|
|
36
|
-
return app.build.makeLoader().setSrc(loader);
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* remark-loader
|
|
40
|
-
*
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
|
-
export const remark = (app) => {
|
|
44
|
-
const loader = `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 = (app) => {
|
|
53
|
-
return app.build.makeLoader().setSrc(MiniCssExtractPlugin.loader);
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* style-loader
|
|
57
|
-
*
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
export const style = (app) => {
|
|
61
|
-
const loader = `style-loader`;
|
|
62
|
-
return app.build.makeLoader().setSrc(loader);
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* xml-loader
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
export const xml = (app) => {
|
|
70
|
-
const loader = `xml-loader`;
|
|
71
|
-
return app.build.makeLoader().setSrc(loader);
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* yml-loader
|
|
75
|
-
*
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
|
-
export const yml = (app) => {
|
|
79
|
-
const loader = `yml-loader`;
|
|
80
|
-
return app.build.makeLoader().setSrc(loader);
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=loaders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,MAA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A;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"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { Bud } from '@roots/bud-framework';
|
|
2
|
-
import type * as Rule from '../../rule/index.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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/handlers/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAI7C,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAA;AAEhD;;;;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"}
|
|
@@ -1,124 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../src/handlers/rules/rules.ts"],"names":[],"mappings":"AACA,OA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