@modern-js/tailwindcss-generator 3.2.0 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +25 -26
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -115230,8 +115230,6 @@ var require_chainId2 = __commonJS({
115230
115230
  STYLE: "style-loader",
115231
115231
  /** postcss-loader */
115232
115232
  POSTCSS: "postcss",
115233
- /** markdown-loader */
115234
- MARKDOWN: "markdown",
115235
115233
  /** ignore-css-loader */
115236
115234
  IGNORE_CSS: "ignore-css",
115237
115235
  /** css-modules-typescript-loader */
@@ -115312,7 +115310,9 @@ var require_chainId2 = __commonJS({
115312
115310
  /** HtmlAsyncChunkPlugin */
115313
115311
  HTML_ASYNC_CHUNK: "html-async-chunk",
115314
115312
  /** SWC_POLYFILL_CHECKER */
115315
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
115313
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
115314
+ /** RouterPlugin */
115315
+ ROUTER_MANIFEST: "route-plugin"
115316
115316
  },
115317
115317
  /** Predefined minimizers */
115318
115318
  MINIMIZER: {
@@ -115768,12 +115768,11 @@ var require_config4 = __commonJS({
115768
115768
  var _constants = require_constants2();
115769
115769
  var _type = require_type2();
115770
115770
  var isSSR = (config) => {
115771
- var _server, _server1;
115772
115771
  const { server } = config;
115773
- if ((_server = server) === null || _server === void 0 ? void 0 : _server.ssr) {
115772
+ if (server === null || server === void 0 ? void 0 : server.ssr) {
115774
115773
  return true;
115775
115774
  }
115776
- if (((_server1 = server) === null || _server1 === void 0 ? void 0 : _server1.ssrByEntries) && !(0, _type.isEmpty)(server.ssrByEntries)) {
115775
+ if ((server === null || server === void 0 ? void 0 : server.ssrByEntries) && !(0, _type.isEmpty)(server.ssrByEntries)) {
115777
115776
  for (const name of Object.keys(server.ssrByEntries)) {
115778
115777
  if (server.ssrByEntries[name]) {
115779
115778
  return true;
@@ -115783,29 +115782,28 @@ var require_config4 = __commonJS({
115783
115782
  return false;
115784
115783
  };
115785
115784
  var isUseSSRBundle = (config) => {
115786
- var _output;
115787
115785
  const { output: output2 } = config;
115788
- if ((_output = output2) === null || _output === void 0 ? void 0 : _output.ssg) {
115786
+ if (output2 === null || output2 === void 0 ? void 0 : output2.ssg) {
115789
115787
  return true;
115790
115788
  }
115791
115789
  return isSSR(config);
115792
115790
  };
115793
115791
  var isServiceWorker = (config) => {
115794
- var _deploy_worker, _deploy, _output;
115792
+ var _deploy_worker;
115795
115793
  const { output: output2, deploy } = config;
115796
- if (((_deploy = deploy) === null || _deploy === void 0 ? void 0 : (_deploy_worker = _deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr) && (((_output = output2) === null || _output === void 0 ? void 0 : _output.ssg) || isSSR(config))) {
115794
+ if ((deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr) && ((output2 === null || output2 === void 0 ? void 0 : output2.ssg) || isSSR(config))) {
115797
115795
  return true;
115798
115796
  }
115799
115797
  return false;
115800
115798
  };
115801
115799
  var isRouterV5 = (config) => {
115802
- var _config_runtime, _config_runtime_router, _config_runtime1, _config;
115803
- return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && ((_config = config) === null || _config === void 0 ? void 0 : (_config_runtime1 = _config.runtime) === null || _config_runtime1 === void 0 ? void 0 : (_config_runtime_router = _config_runtime1.router) === null || _config_runtime_router === void 0 ? void 0 : _config_runtime_router.mode) === "react-router-5";
115800
+ var _config_runtime, _config_runtime_router, _config_runtime1;
115801
+ return typeof ((_config_runtime = config.runtime) === null || _config_runtime === void 0 ? void 0 : _config_runtime.router) !== "boolean" && (config === null || config === void 0 ? void 0 : (_config_runtime1 = config.runtime) === null || _config_runtime1 === void 0 ? void 0 : (_config_runtime_router = _config_runtime1.router) === null || _config_runtime_router === void 0 ? void 0 : _config_runtime_router.mode) === "react-router-5";
115804
115802
  };
115805
115803
  var isSSGEntry = (config, entryName, entrypoints) => {
115806
- var _config_source, _ssgConfig, _ssgConfig1;
115804
+ var _config_source;
115807
115805
  const ssgConfig = config.output.ssg;
115808
- const useSSG = isSingleEntry(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) ? Boolean(ssgConfig) : ssgConfig === true || typeof ((_ssgConfig = ssgConfig) === null || _ssgConfig === void 0 ? void 0 : _ssgConfig[0]) === "function" || Boolean((_ssgConfig1 = ssgConfig) === null || _ssgConfig1 === void 0 ? void 0 : _ssgConfig1[entryName]);
115806
+ const useSSG = isSingleEntry(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) ? Boolean(ssgConfig) : ssgConfig === true || typeof (ssgConfig === null || ssgConfig === void 0 ? void 0 : ssgConfig[0]) === "function" || Boolean(ssgConfig === null || ssgConfig === void 0 ? void 0 : ssgConfig[entryName]);
115809
115807
  return useSSG;
115810
115808
  };
115811
115809
  var isSingleEntry = (entrypoints, mainEntryName = _constants.MAIN_ENTRY_NAME) => entrypoints.length === 1 && entrypoints[0].entryName === mainEntryName;
@@ -116384,9 +116382,14 @@ var require_logger3 = __commonJS({
116384
116382
  label: "info",
116385
116383
  level: "info"
116386
116384
  },
116385
+ ready: {
116386
+ color: "green",
116387
+ label: "ready",
116388
+ level: "info"
116389
+ },
116387
116390
  success: {
116388
116391
  color: "green",
116389
- label: "Success",
116392
+ label: "success",
116390
116393
  level: "info"
116391
116394
  },
116392
116395
  warn: {
@@ -116566,7 +116569,7 @@ var require_alias2 = __commonJS({
116566
116569
  };
116567
116570
  var mergeAlias = (alias) => (0, _applyOptionsChain.applyOptionsChain)({}, alias);
116568
116571
  var getAliasConfig = (aliasOption, option) => {
116569
- var _tsconfig_compilerOptions, _tsconfig, _tsconfig_compilerOptions1, _tsconfig1;
116572
+ var _tsconfig_compilerOptions, _tsconfig_compilerOptions1;
116570
116573
  const isTsProject2 = _fs.default.existsSync(option.tsconfigPath);
116571
116574
  const alias = mergeAlias(aliasOption);
116572
116575
  if (!isTsProject2) {
@@ -116578,12 +116581,12 @@ var require_alias2 = __commonJS({
116578
116581
  };
116579
116582
  }
116580
116583
  const tsconfig = (0, _get.readTsConfigByFile)(option.tsconfigPath);
116581
- const baseUrl = (_tsconfig = tsconfig) === null || _tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions = _tsconfig.compilerOptions) === null || _tsconfig_compilerOptions === void 0 ? void 0 : _tsconfig_compilerOptions.baseUrl;
116584
+ const baseUrl = tsconfig === null || tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions = tsconfig.compilerOptions) === null || _tsconfig_compilerOptions === void 0 ? void 0 : _tsconfig_compilerOptions.baseUrl;
116582
116585
  return {
116583
116586
  absoluteBaseUrl: baseUrl ? _path.default.join(option.appDirectory, baseUrl) : option.appDirectory,
116584
116587
  paths: {
116585
116588
  ...alias,
116586
- ...(_tsconfig1 = tsconfig) === null || _tsconfig1 === void 0 ? void 0 : (_tsconfig_compilerOptions1 = _tsconfig1.compilerOptions) === null || _tsconfig_compilerOptions1 === void 0 ? void 0 : _tsconfig_compilerOptions1.paths
116589
+ ...tsconfig === null || tsconfig === void 0 ? void 0 : (_tsconfig_compilerOptions1 = tsconfig.compilerOptions) === null || _tsconfig_compilerOptions1 === void 0 ? void 0 : _tsconfig_compilerOptions1.paths
116587
116590
  },
116588
116591
  isTsPath: true,
116589
116592
  isTsProject: isTsProject2
@@ -116978,7 +116981,7 @@ var require_port2 = __commonJS({
116978
116981
  if (strictPort) {
116979
116982
  throw new Error(`Port "${original}" is occupied, please choose another one.`);
116980
116983
  } else if (!slient) {
116981
- _logger.logger.info(`Something is already running on port ${original}. ${_compiled.chalk.yellow(`Use port ${port} instead.`)}`);
116984
+ _logger.logger.info(`Port ${original} is in use. ${_compiled.chalk.yellow(`using port ${port}.`)}`);
116982
116985
  }
116983
116986
  }
116984
116987
  return port;
@@ -117030,10 +117033,7 @@ var require_prettyInstructions2 = __commonJS({
117030
117033
  var getAddressUrls = (protocol = "http", port, host) => {
117031
117034
  const LOCAL_LABEL = "Local: ";
117032
117035
  const NETWORK_LABEL = "Network: ";
117033
- const isLocalhost = (url) => {
117034
- var _url;
117035
- return (_url = url) === null || _url === void 0 ? void 0 : _url.includes("localhost");
117036
- };
117036
+ const isLocalhost = (url) => url === null || url === void 0 ? void 0 : url.includes("localhost");
117037
117037
  if (host && host !== _constants.DEFAULT_DEV_HOST) {
117038
117038
  return [
117039
117039
  {
@@ -117064,7 +117064,7 @@ var require_prettyInstructions2 = __commonJS({
117064
117064
  const isHttps = (0, _is.isDev)() && ((_appContext_builder = appContext.builder) === null || _appContext_builder === void 0 ? void 0 : (_appContext_builder_context_devServer = _appContext_builder.context.devServer) === null || _appContext_builder_context_devServer === void 0 ? void 0 : _appContext_builder_context_devServer.https);
117065
117065
  const urls = getAddressUrls(isHttps ? "https" : "http", port, (_config_dev = config.dev) === null || _config_dev === void 0 ? void 0 : _config_dev.host);
117066
117066
  const routes = !apiOnly ? serverRoutes.filter((route) => route.entryName) : serverRoutes;
117067
- let message = "App running at:\n\n";
117067
+ let message = "\n";
117068
117068
  if ((0, _is.isSingleEntry)(entrypoints, (_config_source = config.source) === null || _config_source === void 0 ? void 0 : _config_source.mainEntryName) || apiOnly) {
117069
117069
  message += urls.map(({ label, url }) => ` ${_compiled.chalk.bold(`> ${label.padEnd(10)}`)}${_compiled.chalk.cyanBright(normalizeUrl(`${url}/${routes[0].urlPath}`))}
117070
117070
  `).join("");
@@ -117126,9 +117126,8 @@ var require_require2 = __commonJS({
117126
117126
  });
117127
117127
  var _fs = require_fs2();
117128
117128
  var compatRequire = (filePath, interop = true) => {
117129
- var _mod;
117130
117129
  const mod = require(filePath);
117131
- const rtnESMDefault = interop && ((_mod = mod) === null || _mod === void 0 ? void 0 : _mod.__esModule);
117130
+ const rtnESMDefault = interop && (mod === null || mod === void 0 ? void 0 : mod.__esModule);
117132
117131
  return rtnESMDefault ? mod.default : mod;
117133
117132
  };
117134
117133
  var dynamicImport = new Function("modulePath", "return import(modulePath)");
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.2.0",
18
+ "version": "3.2.2",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -29,11 +29,11 @@
29
29
  "@types/node": "^14",
30
30
  "jest": "^29",
31
31
  "typescript": "^5",
32
- "@scripts/build": "2.34.0",
33
- "@scripts/jest-config": "2.34.0",
34
- "@modern-js/dependence-generator": "3.2.0",
35
- "@modern-js/generator-common": "3.2.0",
36
- "@modern-js/generator-utils": "3.2.0"
32
+ "@scripts/build": "2.35.1",
33
+ "@scripts/jest-config": "2.35.1",
34
+ "@modern-js/generator-common": "3.2.2",
35
+ "@modern-js/dependence-generator": "3.2.2",
36
+ "@modern-js/generator-utils": "3.2.2"
37
37
  },
38
38
  "sideEffects": false,
39
39
  "publishConfig": {