@cmmn/tools 1.7.9 → 1.7.10
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/bundle/rollup.config.js +4 -1
- package/package.json +2 -2
package/bundle/rollup.config.js
CHANGED
|
@@ -37,6 +37,7 @@ export class ConfigCreator {
|
|
|
37
37
|
* browser: boolean,
|
|
38
38
|
* dedupe: string[],
|
|
39
39
|
* target: string
|
|
40
|
+
* inject: string
|
|
40
41
|
* }}
|
|
41
42
|
*/
|
|
42
43
|
options;
|
|
@@ -103,7 +104,9 @@ export class ConfigCreator {
|
|
|
103
104
|
dir: this.outDir,
|
|
104
105
|
inject: false,
|
|
105
106
|
template: (x) => {
|
|
106
|
-
let inject =
|
|
107
|
+
let inject = (this.options.inject === "json") ? `<script>
|
|
108
|
+
globalThis.assets = ${JSON.stringify(Object.keys(x.bundle.bundle))};
|
|
109
|
+
</script>`: Object.keys(x.bundle.bundle).map(key => {
|
|
107
110
|
if (key.endsWith('css'))
|
|
108
111
|
return `<link rel="stylesheet" href="${this.options.base ?? ''}/${key}" >`;
|
|
109
112
|
if (key.endsWith('js'))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmmn/tools",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.10",
|
|
4
4
|
"description": "Compilation, bundling, code generator, testing.",
|
|
5
5
|
"main": "dist/rollup.config.js",
|
|
6
6
|
"type": "module",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
},
|
|
85
85
|
"author": "",
|
|
86
86
|
"license": "ISC",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "cf56c770e5aa17b665d5a5617871b7fad2c0be66"
|
|
88
88
|
}
|