@unpackjs/core 2.4.0 → 2.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/dist/bundler-config/jsMinify.cjs +1 -1
- package/dist/bundler-config/jsMinify.js +1 -1
- package/dist/createUnpack.cjs +2 -2
- package/dist/createUnpack.js +2 -2
- package/dist/run/dev.cjs +1 -1
- package/dist/run/dev.js +1 -1
- package/dist/typed-css-modules/plugin.cjs +2 -1
- package/dist/typed-css-modules/plugin.d.ts.map +1 -1
- package/dist/typed-css-modules/plugin.js +2 -1
- package/package.json +1 -1
package/dist/createUnpack.cjs
CHANGED
|
@@ -68,7 +68,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
68
68
|
};
|
|
69
69
|
const _context = {
|
|
70
70
|
callerName,
|
|
71
|
-
version: "2.4.
|
|
71
|
+
version: "2.4.1"
|
|
72
72
|
};
|
|
73
73
|
let { plugins, bundlerConfig, ...rest } = (0, external_utils_cjs_namespaceObject.mergeConfig)(defaultConfig, config);
|
|
74
74
|
for (const plugin of (0, external_plugin_cjs_namespaceObject.getNormalizedPluginsByHook)('config', plugins))rest = await plugin.config(rest, {
|
|
@@ -85,7 +85,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
85
85
|
return {
|
|
86
86
|
build: async ({ watch } = {})=>{
|
|
87
87
|
(0, external_utils_cjs_namespaceObject.setNodeEnv)(watch ? 'development' : 'production');
|
|
88
|
-
console.log(external_colors_cjs_namespaceObject.colors.rainbow(`${callerName} v2.4.
|
|
88
|
+
console.log(external_colors_cjs_namespaceObject.colors.rainbow(`${callerName} v2.4.1`), external_colors_cjs_namespaceObject.colors.green(`building for ${watch ? 'development' : 'production'}...`));
|
|
89
89
|
const config = await resolveConfig();
|
|
90
90
|
(0, index_cjs_namespaceObject.unpackBuild)(config);
|
|
91
91
|
},
|
package/dist/createUnpack.js
CHANGED
|
@@ -42,7 +42,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
42
42
|
};
|
|
43
43
|
const _context = {
|
|
44
44
|
callerName,
|
|
45
|
-
version: "2.4.
|
|
45
|
+
version: "2.4.1"
|
|
46
46
|
};
|
|
47
47
|
let { plugins, bundlerConfig, ...rest } = mergeConfig(defaultConfig, config);
|
|
48
48
|
for (const plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
@@ -59,7 +59,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
59
59
|
return {
|
|
60
60
|
build: async ({ watch } = {})=>{
|
|
61
61
|
setNodeEnv(watch ? 'development' : 'production');
|
|
62
|
-
console.log(colors.rainbow(`${callerName} v2.4.
|
|
62
|
+
console.log(colors.rainbow(`${callerName} v2.4.1`), colors.green(`building for ${watch ? 'development' : 'production'}...`));
|
|
63
63
|
const config = await resolveConfig();
|
|
64
64
|
unpackBuild(config);
|
|
65
65
|
},
|
package/dist/run/dev.cjs
CHANGED
|
@@ -87,7 +87,7 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
87
87
|
};
|
|
88
88
|
const server = new (external_webpack_dev_server_default())(devServerOptions, compiler);
|
|
89
89
|
await server.start();
|
|
90
|
-
external_logger_cjs_namespaceObject.logger.greet(` ${external_colors_cjs_namespaceObject.colors.green(`${external_colors_cjs_namespaceObject.colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.
|
|
90
|
+
external_logger_cjs_namespaceObject.logger.greet(` ${external_colors_cjs_namespaceObject.colors.green(`${external_colors_cjs_namespaceObject.colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.1`)} ${external_colors_cjs_namespaceObject.colors.dim(`ready in ${external_colors_cjs_namespaceObject.colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`);
|
|
91
91
|
printAddressUrls(port);
|
|
92
92
|
external_logger_cjs_namespaceObject.logger.wait('building...');
|
|
93
93
|
global.__unpack_dev_server_started = true;
|
package/dist/run/dev.js
CHANGED
|
@@ -50,7 +50,7 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
50
50
|
};
|
|
51
51
|
const server = new webpack_dev_server(devServerOptions, compiler);
|
|
52
52
|
await server.start();
|
|
53
|
-
logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.
|
|
53
|
+
logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.4.1`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`);
|
|
54
54
|
printAddressUrls(port);
|
|
55
55
|
logger.wait('building...');
|
|
56
56
|
global.__unpack_dev_server_started = true;
|
|
@@ -54,6 +54,7 @@ function _define_property(obj, key, value) {
|
|
|
54
54
|
return obj;
|
|
55
55
|
}
|
|
56
56
|
const statPromise = external_node_fs_default().promises.stat;
|
|
57
|
+
const DtsCreator = external_typed_css_modules_default()["default"] || external_typed_css_modules_default();
|
|
57
58
|
async function writeFile(dtsCreator, cssFile) {
|
|
58
59
|
const content = await dtsCreator.create(cssFile, void 0, true);
|
|
59
60
|
await content.writeFile((definition)=>`// Generated automatically, do not edit\n${definition}`);
|
|
@@ -102,7 +103,7 @@ class TypedCssModulesPlugin {
|
|
|
102
103
|
_define_property(this, "globPattern", 'src/**/*.{css,less,scss}');
|
|
103
104
|
_define_property(this, "userOptions", void 0);
|
|
104
105
|
this.userOptions = options;
|
|
105
|
-
this.dtsCreator = new (
|
|
106
|
+
this.dtsCreator = new DtsCreator({
|
|
106
107
|
camelCase: true,
|
|
107
108
|
namedExports: external_constants_cjs_namespaceObject.CSS_NAMED_EXPORT
|
|
108
109
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/typed-css-modules/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/typed-css-modules/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAiCvC,KAAK,4BAA4B,GAAG;IAClC,OAAO,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;CACtD,CAAA;AAED,qBAAa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,WAAW,CAA6B;IAChD,WAAW,EAAE,4BAA4B,CAAA;gBAE7B,OAAO,EAAE,4BAA4B;IAQjD,KAAK,CAAC,QAAQ,EAAE,QAAQ;YAqBV,kBAAkB;CAQjC"}
|
|
@@ -17,6 +17,7 @@ function _define_property(obj, key, value) {
|
|
|
17
17
|
return obj;
|
|
18
18
|
}
|
|
19
19
|
const statPromise = node_fs.promises.stat;
|
|
20
|
+
const DtsCreator = typed_css_modules["default"] || typed_css_modules;
|
|
20
21
|
async function writeFile(dtsCreator, cssFile) {
|
|
21
22
|
const content = await dtsCreator.create(cssFile, void 0, true);
|
|
22
23
|
await content.writeFile((definition)=>`// Generated automatically, do not edit\n${definition}`);
|
|
@@ -65,7 +66,7 @@ class TypedCssModulesPlugin {
|
|
|
65
66
|
_define_property(this, "globPattern", 'src/**/*.{css,less,scss}');
|
|
66
67
|
_define_property(this, "userOptions", void 0);
|
|
67
68
|
this.userOptions = options;
|
|
68
|
-
this.dtsCreator = new
|
|
69
|
+
this.dtsCreator = new DtsCreator({
|
|
69
70
|
camelCase: true,
|
|
70
71
|
namedExports: CSS_NAMED_EXPORT
|
|
71
72
|
});
|