From f29352dd87118d45930682e9cf180f4347d0507c Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 29 Jul 2023 02:30:12 +0800 Subject: [PATCH] refactor(cli): update template config --- apps/cli/package.json | 2 +- .../server-plugin-full/{{id}}/.ministarrc.js | 16 +++++++++++++--- .../server-plugin-web/{{id}}/.ministarrc.js | 16 +++++++++++++--- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/apps/cli/package.json b/apps/cli/package.json index ce29f03c91c..4a22bc1e8d1 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -1,6 +1,6 @@ { "name": "tailchat-cli", - "version": "1.5.11", + "version": "1.5.12", "description": "A Command line interface of tailchat", "bin": { "tailchat": "./bin/cli" diff --git a/apps/cli/templates/server-plugin-full/{{id}}/.ministarrc.js b/apps/cli/templates/server-plugin-full/{{id}}/.ministarrc.js index 6b7c1e60b11..88b52deba9a 100644 --- a/apps/cli/templates/server-plugin-full/{{id}}/.ministarrc.js +++ b/apps/cli/templates/server-plugin-full/{{id}}/.ministarrc.js @@ -1,7 +1,17 @@ const path = require('path'); +const pluginRoot = path.resolve(__dirname, './web'); +const outDir = path.resolve(__dirname, '../../public'); + module.exports = { - externalDeps: ['react', 'react-router', 'axios', 'styled-components', 'zustand', 'zustand/middleware/immer'], - pluginRoot: path.resolve(__dirname, './web'), - outDir: path.resolve(__dirname, '../../public'), + externalDeps: [ + 'react', + 'react-router', + 'axios', + 'styled-components', + 'zustand', + 'zustand/middleware/immer' + ], + pluginRoot, + outDir, }; diff --git a/apps/cli/templates/server-plugin-web/{{id}}/.ministarrc.js b/apps/cli/templates/server-plugin-web/{{id}}/.ministarrc.js index 6b7c1e60b11..88b52deba9a 100644 --- a/apps/cli/templates/server-plugin-web/{{id}}/.ministarrc.js +++ b/apps/cli/templates/server-plugin-web/{{id}}/.ministarrc.js @@ -1,7 +1,17 @@ const path = require('path'); +const pluginRoot = path.resolve(__dirname, './web'); +const outDir = path.resolve(__dirname, '../../public'); + module.exports = { - externalDeps: ['react', 'react-router', 'axios', 'styled-components', 'zustand', 'zustand/middleware/immer'], - pluginRoot: path.resolve(__dirname, './web'), - outDir: path.resolve(__dirname, '../../public'), + externalDeps: [ + 'react', + 'react-router', + 'axios', + 'styled-components', + 'zustand', + 'zustand/middleware/immer' + ], + pluginRoot, + outDir, };