tona-vite 0.0.2 → 0.0.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 guangzan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -35,10 +35,34 @@ const __dirname$1 = node_path.default.dirname((0, node_url.fileURLToPath)(requir
35
35
  * Vite plugin for Tona themes - combines dynamic script extension and shared assets serving
36
36
  */
37
37
  function tona(options = {}) {
38
- const { defaultScriptSrc = "/src/main.js", baseDir = node_process.default.cwd(), sharedAssetsPath } = options;
38
+ const { defaultScriptSrc = "/src/main.js", baseDir = node_process.default.cwd(), sharedAssetsPath, themeName = "theme" } = options;
39
39
  const assetsPath = sharedAssetsPath || node_path.default.join(__dirname$1, "..", "public");
40
40
  return {
41
41
  name: "vite-plugin-tona",
42
+ config(config) {
43
+ const entryPath = node_path.default.resolve(baseDir, "src/main.ts");
44
+ if (!node_fs.default.existsSync(entryPath)) return config;
45
+ const existingLib = config.build?.lib;
46
+ const libConfig = existingLib && typeof existingLib === "object" ? {
47
+ ...existingLib,
48
+ formats: existingLib.formats || ["iife"],
49
+ entry: existingLib.entry || entryPath,
50
+ name: existingLib.name || themeName,
51
+ fileName: existingLib.fileName || (() => `${themeName}.min.js`)
52
+ } : {
53
+ formats: ["iife"],
54
+ entry: entryPath,
55
+ name: themeName,
56
+ fileName: () => `${themeName}.min.js`
57
+ };
58
+ return {
59
+ ...config,
60
+ build: {
61
+ ...config.build,
62
+ lib: libConfig
63
+ }
64
+ };
65
+ },
42
66
  transformIndexHtml(html) {
43
67
  const jsPath = node_path.default.resolve(baseDir, "src/main.js");
44
68
  const tsPath = node_path.default.resolve(baseDir, "src/main.ts");
package/dist/index.d.cts CHANGED
@@ -17,6 +17,11 @@ interface TonaPluginOptions {
17
17
  * @default path.join(__dirname, '..', 'public')
18
18
  */
19
19
  sharedAssetsPath?: string;
20
+ /**
21
+ * Theme name for build output filename
22
+ * @default 'theme'
23
+ */
24
+ themeName?: string;
20
25
  }
21
26
  /**
22
27
  * Vite plugin for Tona themes - combines dynamic script extension and shared assets serving
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;UAYiB,iBAAA;;AAAjB;AAgBC;;;;;;;;;;;;;;;;;iBAKuB,IAAA,WAAc,oBAAyB"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;UAYiB,iBAAA;;AAAjB;AAqBC;;;;;;;;;;;;;;;;;;;;;;iBAKuB,IAAA,WAAc,oBAAyB"}
package/dist/index.d.mts CHANGED
@@ -17,6 +17,11 @@ interface TonaPluginOptions {
17
17
  * @default path.join(__dirname, '..', 'public')
18
18
  */
19
19
  sharedAssetsPath?: string;
20
+ /**
21
+ * Theme name for build output filename
22
+ * @default 'theme'
23
+ */
24
+ themeName?: string;
20
25
  }
21
26
  /**
22
27
  * Vite plugin for Tona themes - combines dynamic script extension and shared assets serving
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;UAYiB,iBAAA;;AAAjB;AAgBC;;;;;;;;;;;;;;;;;iBAKuB,IAAA,WAAc,oBAAyB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;UAYiB,iBAAA;;AAAjB;AAqBC;;;;;;;;;;;;;;;;;;;;;;iBAKuB,IAAA,WAAc,oBAAyB"}
package/dist/index.mjs CHANGED
@@ -9,10 +9,34 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
9
  * Vite plugin for Tona themes - combines dynamic script extension and shared assets serving
10
10
  */
11
11
  function tona(options = {}) {
12
- const { defaultScriptSrc = "/src/main.js", baseDir = process.cwd(), sharedAssetsPath } = options;
12
+ const { defaultScriptSrc = "/src/main.js", baseDir = process.cwd(), sharedAssetsPath, themeName = "theme" } = options;
13
13
  const assetsPath = sharedAssetsPath || path.join(__dirname, "..", "public");
14
14
  return {
15
15
  name: "vite-plugin-tona",
16
+ config(config) {
17
+ const entryPath = path.resolve(baseDir, "src/main.ts");
18
+ if (!fs.existsSync(entryPath)) return config;
19
+ const existingLib = config.build?.lib;
20
+ const libConfig = existingLib && typeof existingLib === "object" ? {
21
+ ...existingLib,
22
+ formats: existingLib.formats || ["iife"],
23
+ entry: existingLib.entry || entryPath,
24
+ name: existingLib.name || themeName,
25
+ fileName: existingLib.fileName || (() => `${themeName}.min.js`)
26
+ } : {
27
+ formats: ["iife"],
28
+ entry: entryPath,
29
+ name: themeName,
30
+ fileName: () => `${themeName}.min.js`
31
+ };
32
+ return {
33
+ ...config,
34
+ build: {
35
+ ...config.build,
36
+ lib: libConfig
37
+ }
38
+ };
39
+ },
16
40
  transformIndexHtml(html) {
17
41
  const jsPath = path.resolve(baseDir, "src/main.js");
18
42
  const tsPath = path.resolve(baseDir, "src/main.ts");
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["filePath: string | null"],"sources":["../src/index.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport process from 'node:process'\nimport { fileURLToPath } from 'node:url'\nimport type { Plugin, ViteDevServer } from 'vite'\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\n\ninterface MimeTypes {\n [key: string]: string\n}\n\nexport interface TonaPluginOptions {\n /**\n * Default script source path when neither main.ts nor main.js exists\n * @default '/src/main.js'\n */\n defaultScriptSrc?: string\n /**\n * Base directory to resolve main files from\n * @default process.cwd()\n */\n baseDir?: string\n /**\n * The path to the shared assets directory\n * @default path.join(__dirname, '..', 'public')\n */\n sharedAssetsPath?: string\n}\n\n/**\n * Vite plugin for Tona themes - combines dynamic script extension and shared assets serving\n */\nexport default function tona(options: TonaPluginOptions = {}): Plugin {\n const {\n defaultScriptSrc = '/src/main.js',\n baseDir = process.cwd(),\n sharedAssetsPath,\n } = options\n\n // Default path to shared assets\n const assetsPath = sharedAssetsPath || path.join(__dirname, '..', 'public')\n\n return {\n name: 'vite-plugin-tona',\n\n transformIndexHtml(html) {\n // Dynamic script extension: check main.ts or main.js exists\n const jsPath = path.resolve(baseDir, 'src/main.js')\n const tsPath = path.resolve(baseDir, 'src/main.ts')\n let scriptSrc = defaultScriptSrc\n\n if (fs.existsSync(tsPath)) {\n scriptSrc = '/src/main.ts'\n } else if (fs.existsSync(jsPath)) {\n scriptSrc = '/src/main.js'\n }\n\n // Replace script src in HTML\n return html.replace(\n /<script type=\"module\" src=\"[^\"]*\"><\\/script>/,\n `<script type=\"module\" src=\"${scriptSrc}\"></script>`,\n )\n },\n\n configureServer(server: ViteDevServer) {\n // Serve static files from shared-assets/public directory\n server.middlewares.use((req, res, next) => {\n let filePath: string | null = null\n\n // Check if the request is for a file in /public (which will be served from shared-assets)\n if (req.url?.startsWith('/public/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n urlWithoutQuery!.replace('/public/', ''),\n )\n } else if (req.url?.startsWith('/templates/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'templates',\n urlWithoutQuery!.replace('/templates/', ''),\n )\n } else if (req.url?.startsWith('/js/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'js',\n urlWithoutQuery!.replace('/js/', ''),\n )\n } else if (req.url?.startsWith('/css/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'css',\n urlWithoutQuery!.replace('/css/', ''),\n )\n } else if (req.url?.startsWith('/images/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'images',\n urlWithoutQuery!.replace('/images/', ''),\n )\n } else if (\n req.url === '/' ||\n req.url?.startsWith('/?') ||\n req.url === '/index.html' ||\n req.url?.startsWith('/index.html?')\n ) {\n filePath = path.join(assetsPath, 'index.html')\n }\n\n // Check if file exists\n if (filePath && fs.existsSync(filePath)) {\n // Set appropriate content type\n const ext = path.extname(filePath).toLowerCase()\n const mimeTypes: MimeTypes = {\n '.html': 'text/html',\n '.css': 'text/css',\n '.js': 'application/javascript',\n '.json': 'application/json',\n '.png': 'image/png',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.gif': 'image/gif',\n '.svg': 'image/svg+xml',\n '.ico': 'image/x-icon',\n }\n\n const contentType = mimeTypes[ext] || 'application/octet-stream'\n res.setHeader('Content-Type', contentType)\n\n // Read and serve the file\n const fileStream = fs.createReadStream(filePath)\n fileStream.pipe(res)\n return\n }\n\n // If not handled, pass to next middleware\n next()\n })\n },\n }\n}\n"],"mappings":";;;;;;AAMA,MAAM,YAAY,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;;;;AA2B9D,SAAwB,KAAK,UAA6B,EA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KACd,YACA,UACA,gBAAiB,QAAQ,YAAY,GAAG,CACzC;eAED,IAAI,QAAQ,OACZ,IAAI,KAAK,WAAW,KAAK,IACzB,IAAI,QAAQ,iBACZ,IAAI,KAAK,WAAW,eAAe,CAEnC,YAAW,KAAK,KAAK,YAAY,aAAa;AAIhD,QAAI,YAAY,GAAG,WAAW,SAAS,EAAE;KAEvC,MAAM,MAAM,KAAK,QAAQ,SAAS,CAAC,aAAa;KAchD,MAAM,cAbuB;MAC3B,SAAS;MACT,QAAQ;MACR,OAAO;MACP,SAAS;MACT,QAAQ;MACR,QAAQ;MACR,SAAS;MACT,QAAQ;MACR,QAAQ;MACR,QAAQ;MACT,CAE6B,QAAQ;AACtC,SAAI,UAAU,gBAAgB,YAAY;AAI1C,KADmB,GAAG,iBAAiB,SAAS,CACrC,KAAK,IAAI;AACpB;;AAIF,UAAM;KACN;;EAEL"}
1
+ {"version":3,"file":"index.mjs","names":["filePath: string | null"],"sources":["../src/index.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport process from 'node:process'\nimport { fileURLToPath } from 'node:url'\nimport type { LibraryFormats, Plugin, UserConfig, ViteDevServer } from 'vite'\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url))\n\ninterface MimeTypes {\n [key: string]: string\n}\n\nexport interface TonaPluginOptions {\n /**\n * Default script source path when neither main.ts nor main.js exists\n * @default '/src/main.js'\n */\n defaultScriptSrc?: string\n /**\n * Base directory to resolve main files from\n * @default process.cwd()\n */\n baseDir?: string\n /**\n * The path to the shared assets directory\n * @default path.join(__dirname, '..', 'public')\n */\n sharedAssetsPath?: string\n /**\n * Theme name for build output filename\n * @default 'theme'\n */\n themeName?: string\n}\n\n/**\n * Vite plugin for Tona themes - combines dynamic script extension and shared assets serving\n */\nexport default function tona(options: TonaPluginOptions = {}): Plugin {\n const {\n defaultScriptSrc = '/src/main.js',\n baseDir = process.cwd(),\n sharedAssetsPath,\n themeName = 'theme',\n } = options\n\n // Default path to shared assets\n const assetsPath = sharedAssetsPath || path.join(__dirname, '..', 'public')\n\n return {\n name: 'vite-plugin-tona',\n\n config(config: UserConfig): UserConfig {\n const entryPath = path.resolve(baseDir, 'src/main.ts')\n const entryExists = fs.existsSync(entryPath)\n\n if (!entryExists) {\n return config\n }\n\n const existingLib = config.build?.lib\n const libConfig =\n existingLib && typeof existingLib === 'object'\n ? {\n ...existingLib,\n formats: existingLib.formats || (['iife'] as LibraryFormats[]),\n entry: existingLib.entry || entryPath,\n name: existingLib.name || themeName,\n fileName: existingLib.fileName || (() => `${themeName}.min.js`),\n }\n : {\n formats: ['iife'] as LibraryFormats[],\n entry: entryPath,\n name: themeName,\n fileName: () => `${themeName}.min.js`,\n }\n\n return {\n ...config,\n build: {\n ...config.build,\n lib: libConfig,\n },\n }\n },\n\n transformIndexHtml(html) {\n // Dynamic script extension: check main.ts or main.js exists\n const jsPath = path.resolve(baseDir, 'src/main.js')\n const tsPath = path.resolve(baseDir, 'src/main.ts')\n let scriptSrc = defaultScriptSrc\n\n if (fs.existsSync(tsPath)) {\n scriptSrc = '/src/main.ts'\n } else if (fs.existsSync(jsPath)) {\n scriptSrc = '/src/main.js'\n }\n\n // Replace script src in HTML\n return html.replace(\n /<script type=\"module\" src=\"[^\"]*\"><\\/script>/,\n `<script type=\"module\" src=\"${scriptSrc}\"></script>`,\n )\n },\n\n configureServer(server: ViteDevServer) {\n // Serve static files from shared-assets/public directory\n server.middlewares.use((req, res, next) => {\n let filePath: string | null = null\n\n // Check if the request is for a file in /public (which will be served from shared-assets)\n if (req.url?.startsWith('/public/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n urlWithoutQuery!.replace('/public/', ''),\n )\n } else if (req.url?.startsWith('/templates/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'templates',\n urlWithoutQuery!.replace('/templates/', ''),\n )\n } else if (req.url?.startsWith('/js/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'js',\n urlWithoutQuery!.replace('/js/', ''),\n )\n } else if (req.url?.startsWith('/css/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'css',\n urlWithoutQuery!.replace('/css/', ''),\n )\n } else if (req.url?.startsWith('/images/')) {\n const urlWithoutQuery = req.url.split('?')[0]\n filePath = path.join(\n assetsPath,\n 'images',\n urlWithoutQuery!.replace('/images/', ''),\n )\n } else if (\n req.url === '/' ||\n req.url?.startsWith('/?') ||\n req.url === '/index.html' ||\n req.url?.startsWith('/index.html?')\n ) {\n filePath = path.join(assetsPath, 'index.html')\n }\n\n // Check if file exists\n if (filePath && fs.existsSync(filePath)) {\n // Set appropriate content type\n const ext = path.extname(filePath).toLowerCase()\n const mimeTypes: MimeTypes = {\n '.html': 'text/html',\n '.css': 'text/css',\n '.js': 'application/javascript',\n '.json': 'application/json',\n '.png': 'image/png',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.gif': 'image/gif',\n '.svg': 'image/svg+xml',\n '.ico': 'image/x-icon',\n }\n\n const contentType = mimeTypes[ext] || 'application/octet-stream'\n res.setHeader('Content-Type', contentType)\n\n // Read and serve the file\n const fileStream = fs.createReadStream(filePath)\n fileStream.pipe(res)\n return\n }\n\n // If not handled, pass to next middleware\n next()\n })\n },\n }\n}\n"],"mappings":";;;;;;AAMA,MAAM,YAAY,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;;;;AAgC9D,SAAwB,KAAK,UAA6B,EAAE,EAAU;CACpE,MAAM,EACJ,mBAAmB,gBACnB,UAAU,QAAQ,KAAK,EACvB,kBACA,YAAY,YACV;CAGJ,MAAM,aAAa,oBAAoB,KAAK,KAAK,WAAW,MAAM,SAAS;AAE3E,QAAO;EACL,MAAM;EAEN,OAAO,QAAgC;GACrC,MAAM,YAAY,KAAK,QAAQ,SAAS,cAAc;AAGtD,OAAI,CAFgB,GAAG,WAAW,UAAU,C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KACvC,MAAM,kBAAkB,IAAI,IAAI,MAAM,IAAI,CAAC;AAC3C,gBAAW,KAAK,KACd,YACA,OACA,gBAAiB,QAAQ,SAAS,GAAG,CACtC;eACQ,IAAI,KAAK,WAAW,WAAW,EAAE;KAC1C,MAAM,kBAAkB,IAAI,IAAI,MAAM,IAAI,CAAC;AAC3C,gBAAW,KAAK,KACd,YACA,UACA,gBAAiB,QAAQ,YAAY,GAAG,CACzC;eAED,IAAI,QAAQ,OACZ,IAAI,KAAK,WAAW,KAAK,IACzB,IAAI,QAAQ,iBACZ,IAAI,KAAK,WAAW,eAAe,CAEnC,YAAW,KAAK,KAAK,YAAY,aAAa;AAIhD,QAAI,YAAY,GAAG,WAAW,SAAS,EAAE;KAEvC,MAAM,MAAM,KAAK,QAAQ,SAAS,CAAC,aAAa;KAchD,MAAM,cAbuB;MAC3B,SAAS;MACT,QAAQ;MACR,OAAO;MACP,SAAS;MACT,QAAQ;MACR,QAAQ;MACR,SAAS;MACT,QAAQ;MACR,QAAQ;MACR,QAAQ;MACT,CAE6B,QAAQ;AACtC,SAAI,UAAU,gBAAgB,YAAY;AAI1C,KADmB,GAAG,iBAAiB,SAAS,CACrC,KAAK,IAAI;AACpB;;AAIF,UAAM;KACN;;EAEL"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tona-vite",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "description": "Vite plugin for Tona themes - combines dynamic script extension and shared assets serving",
6
6
  "author": {
7
7
  "name": "guangzan",
@@ -9,13 +9,13 @@
9
9
  "email": "guangzan1999@outlook.com"
10
10
  },
11
11
  "license": "MIT",
12
- "homepage": "https://github.com/cnbloglabs",
12
+ "homepage": "https://github.com/guangzan",
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git+https://github.com/cnbloglabs/tona.git"
15
+ "url": "git+https://github.com/guangzan/tona.git"
16
16
  },
17
17
  "bugs": {
18
- "url": "https://github.com/cnbloglabs/tona/issues"
18
+ "url": "https://github.com/guangzan/tona/issues"
19
19
  },
20
20
  "keywords": [
21
21
  "vite",
@@ -47,17 +47,17 @@
47
47
  "dist",
48
48
  "public"
49
49
  ],
50
- "scripts": {
51
- "dev": "tsdown --watch",
52
- "build": "tsdown"
53
- },
54
50
  "peerDependencies": {
55
51
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
56
52
  },
57
53
  "devDependencies": {
58
- "@types/node": "catalog:",
59
- "tsdown": "catalog:",
60
- "vite": "catalog:",
61
- "vitest": "catalog:"
54
+ "@types/node": "^24.10.1",
55
+ "tsdown": "latest",
56
+ "vite": "^7.2.2",
57
+ "vitest": "^3.2.4"
58
+ },
59
+ "scripts": {
60
+ "dev": "tsdown --watch",
61
+ "build": "tsdown"
62
62
  }
63
- }
63
+ }