@genesislcap/rollup-builder 15.66.0 → 15.68.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/options/input.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/options/input.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAYxD,eAAO,MAAM,eAAe,GAC1B,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,SAAS,OAAO,EAChB,MAAM,OAAO,EACb,QAAO,WAA4B,KAClC,YAyDD,CAAC"}
|
package/dist/options/input.js
CHANGED
|
@@ -6,11 +6,10 @@ const plugin_commonjs_1 = tslib_1.__importDefault(require("@rollup/plugin-common
|
|
|
6
6
|
const plugin_json_1 = tslib_1.__importDefault(require("@rollup/plugin-json"));
|
|
7
7
|
const plugin_node_resolve_1 = tslib_1.__importDefault(require("@rollup/plugin-node-resolve"));
|
|
8
8
|
const plugin_typescript_1 = tslib_1.__importDefault(require("@rollup/plugin-typescript"));
|
|
9
|
-
const rollup_plugin_filesize_1 = tslib_1.__importDefault(require("rollup-plugin-filesize"));
|
|
10
9
|
const rollup_plugin_lit_css_1 = tslib_1.__importDefault(require("rollup-plugin-lit-css"));
|
|
11
|
-
const rollup_plugin_styles_1 = tslib_1.__importDefault(require("rollup-plugin-styles"));
|
|
12
10
|
const rollup_plugin_transform_tagged_template_1 = tslib_1.__importDefault(require("rollup-plugin-transform-tagged-template"));
|
|
13
11
|
const rollup_plugin_visualizer_1 = require("rollup-plugin-visualizer");
|
|
12
|
+
const size_report_1 = require("../plugins/size-report");
|
|
14
13
|
const transformers_1 = require("../transformers");
|
|
15
14
|
const parserOptions = {
|
|
16
15
|
sourceType: 'module',
|
|
@@ -45,7 +44,6 @@ const getInputOptions = (globals, analyze, open, input = 'src/index.ts') => ({
|
|
|
45
44
|
tsconfig: 'tsconfig.json',
|
|
46
45
|
}),
|
|
47
46
|
(0, plugin_json_1.default)(),
|
|
48
|
-
(0, rollup_plugin_styles_1.default)({ mode: 'emit' }),
|
|
49
47
|
(0, rollup_plugin_lit_css_1.default)({ specifier: '@microsoft/fast-element' }),
|
|
50
48
|
(0, rollup_plugin_transform_tagged_template_1.default)({
|
|
51
49
|
tagsToProcess: ['css'],
|
|
@@ -57,10 +55,7 @@ const getInputOptions = (globals, analyze, open, input = 'src/index.ts') => ({
|
|
|
57
55
|
transformer: transformers_1.transformHTMLFragment,
|
|
58
56
|
parserOptions,
|
|
59
57
|
}),
|
|
60
|
-
(0,
|
|
61
|
-
showMinifiedSize: false,
|
|
62
|
-
showBrotliSize: true,
|
|
63
|
-
}),
|
|
58
|
+
(0, size_report_1.sizeReport)(),
|
|
64
59
|
analyze &&
|
|
65
60
|
(0, rollup_plugin_visualizer_1.visualizer)((outputOptions) => {
|
|
66
61
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size-report.d.ts","sourceRoot":"","sources":["../../src/plugins/size-report.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMrC,eAAO,MAAM,UAAU,QAAO,MAa5B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sizeReport = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const node_zlib_1 = require("node:zlib");
|
|
7
|
+
const build_kit_1 = require("@genesislcap/build-kit");
|
|
8
|
+
const consola_1 = tslib_1.__importDefault(require("consola"));
|
|
9
|
+
const BYTES_PER_KB = 1024;
|
|
10
|
+
const formatKB = (bytes) => `${(bytes / BYTES_PER_KB).toFixed(2)} KB`;
|
|
11
|
+
const sizeReport = () => ({
|
|
12
|
+
name: 'genx-size-report',
|
|
13
|
+
generateBundle(outputOptions, bundle) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
for (const output of Object.values(bundle)) {
|
|
16
|
+
if (output.type !== 'chunk') {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const destination = (_a = outputOptions.file) !== null && _a !== void 0 ? _a : (0, node_path_1.join)((_b = outputOptions.dir) !== null && _b !== void 0 ? _b : '', output.fileName);
|
|
20
|
+
const size = Buffer.byteLength(output.code);
|
|
21
|
+
const gzipped = (0, node_zlib_1.gzipSync)(output.code).length;
|
|
22
|
+
consola_1.default.log((0, build_kit_1.white)(`${(0, build_kit_1.bold)(destination)}: ${formatKB(size)} (gzipped ${formatKB(gzipped)})`));
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
exports.sizeReport = sizeReport;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/rollup-builder",
|
|
3
3
|
"description": "Rollup builder (deprecated — will be removed in the next major version of genx)",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.68.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -16,18 +16,16 @@
|
|
|
16
16
|
"lint:fix": "genx lint -l ox --fix"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@genesislcap/build-kit": "15.
|
|
19
|
+
"@genesislcap/build-kit": "15.68.0",
|
|
20
20
|
"@rollup/plugin-commonjs": "28.0.0",
|
|
21
21
|
"@rollup/plugin-json": "^5.0.0",
|
|
22
22
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
23
|
-
"@rollup/plugin-terser": "^0.
|
|
23
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
24
24
|
"@rollup/plugin-typescript": "12.1.0",
|
|
25
25
|
"consola": "^3.0.2",
|
|
26
26
|
"copyfiles": "^2.4.1",
|
|
27
27
|
"rollup": "^2.7.6",
|
|
28
|
-
"rollup-plugin-filesize": "^10.0.0",
|
|
29
28
|
"rollup-plugin-lit-css": "^3.2.1",
|
|
30
|
-
"rollup-plugin-styles": "^4.0.0",
|
|
31
29
|
"rollup-plugin-transform-tagged-template": "^0.0.3",
|
|
32
30
|
"rollup-plugin-visualizer": "^5.6.0"
|
|
33
31
|
},
|