@seayoo-web/scripts 1.3.12 → 1.3.13

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.
@@ -75,6 +75,16 @@ async function copyTemplate(templateName, targetDir) {
75
75
  }
76
76
  });
77
77
  }
78
+ async function copyGlobalFiles(targetDir) {
79
+ const root = await getMonorepoRoot();
80
+ const globalFiles = await fs.readdir(path.join(root, TemplateDir));
81
+ for (const item of globalFiles) {
82
+ const f = path.join(root, TemplateDir, item);
83
+ if (fs.statSync(f).isFile()) {
84
+ await fs.copy(f, path.join(targetDir, item));
85
+ }
86
+ }
87
+ }
78
88
  async function addProjectToWorkspace(project) {
79
89
  const root = await getMonorepoRoot();
80
90
  const rootWorkspacePath = path.join(root, WorkspaceFile);
@@ -248,12 +258,13 @@ export {
248
258
  createPageDeployTag as c,
249
259
  addProjectToWorkspace as d,
250
260
  copyTemplate as e,
251
- getProjects as f,
261
+ copyGlobalFiles as f,
252
262
  getNowTime as g,
253
- getTemplates as h,
254
- checkGitStatusBeforeDestory as i,
255
- createBackupTag as j,
256
- getRepos as k,
263
+ getProjects as h,
264
+ getTemplates as i,
265
+ checkGitStatusBeforeDestory as j,
266
+ createBackupTag as k,
267
+ getRepos as l,
257
268
  removeProjectFromWorkspace as r,
258
269
  submitAllDeletionChanges as s
259
270
  };
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import vueDevTools from "vite-plugin-vue-devtools";
7
7
  import { existsSync, readFileSync } from "fs";
8
8
  import { loadEnv } from "vite";
9
9
  import "colors";
10
- import { g as getNowTime, a as getCommitInfo, c as createPageDeployTag } from "./git-BHXCYFmD.js";
10
+ import { g as getNowTime, a as getCommitInfo, c as createPageDeployTag } from "./git-BrZHpO_Q.js";
11
11
  import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
12
12
  import { vueTsConfigs, defineConfigWithVueTs } from "@vue/eslint-config-typescript";
13
13
  import { flatConfigs } from "eslint-plugin-import";
package/dist/node.js CHANGED
@@ -5,7 +5,7 @@ import { Command } from "commander";
5
5
  import fs from "fs-extra";
6
6
  import inquirer from "inquirer";
7
7
  import ora from "ora";
8
- import { b as getMonorepoRoot, d as addProjectToWorkspace, e as copyTemplate, f as getProjects, h as getTemplates, i as checkGitStatusBeforeDestory, j as createBackupTag, r as removeProjectFromWorkspace, s as submitAllDeletionChanges, k as getRepos } from "./git-BHXCYFmD.js";
8
+ import { b as getMonorepoRoot, d as addProjectToWorkspace, e as copyTemplate, f as copyGlobalFiles, h as getProjects, i as getTemplates, j as checkGitStatusBeforeDestory, k as createBackupTag, r as removeProjectFromWorkspace, s as submitAllDeletionChanges, l as getRepos } from "./git-BrZHpO_Q.js";
9
9
  const commitRE = /^(?:revert: )?(?:feat|fix|docs|style|refactor|test|build|chore|debug|tweak|improve)(?:\(.+\))?: .{1,100}/;
10
10
  function checkCommit() {
11
11
  const msgPath = process.argv[2];
@@ -122,14 +122,6 @@ async function initSampleFiles(targetDir) {
122
122
  }
123
123
  }
124
124
  }
125
- async function copyGlobalFiles(targetDir) {
126
- for (const filename of [".env.local"]) {
127
- if (await fs.pathExists(path.join(targetDir, filename))) {
128
- await fs.copy(path.join(targetDir, filename), path.join(targetDir, filename.replace(/\.sample$/, "")));
129
- fs.unlink(path.join(targetDir, filename));
130
- }
131
- }
132
- }
133
125
  async function startCreateJob$1(target) {
134
126
  if (target === "project") {
135
127
  await createProject();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/scripts",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "scripts for seayoo web repos",
5
5
  "type": "module",
6
6
  "source": "index.ts",