@icebreakers/monorepo 0.2.5 → 0.3.0

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.
@@ -4,6 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
6
  "packageManager": "pnpm@9.9.0",
7
+ "author": "ice breaker <1324318532@qq.com>",
7
8
  "repository": {
8
9
  "type": "git",
9
10
  "url": "git+https://github.com/sonofmagic/monorepo-template.git"
@@ -36,7 +37,7 @@
36
37
  "@commitlint/config-conventional": "^19.4.1",
37
38
  "@commitlint/prompt-cli": "^19.4.1",
38
39
  "@commitlint/types": "^19.0.3",
39
- "@icebreakers/eslint-config": "^0.4.0",
40
+ "@icebreakers/eslint-config": "^0.4.1",
40
41
  "@icebreakers/stylelint-config": "^0.0.3",
41
42
  "@pnpm/workspace.find-packages": "^4.0.9",
42
43
  "@types/fs-extra": "^11.0.4",
@@ -47,13 +48,13 @@
47
48
  "@types/lodash": "^4.17.7",
48
49
  "@types/lodash-es": "^4.17.12",
49
50
  "@types/micromatch": "^4.0.9",
50
- "@types/node": "^22.5.3",
51
+ "@types/node": "^22.5.4",
51
52
  "@types/set-value": "^4.0.3",
52
53
  "@vitest/coverage-v8": "^2.0.5",
53
54
  "ci-info": "^4.0.0",
54
55
  "cross-env": "^7.0.3",
55
56
  "defu": "^6.1.4",
56
- "eslint": "^9.9.1",
57
+ "eslint": "^9.10.0",
57
58
  "execa": "^9.3.1",
58
59
  "fast-glob": "^3.3.2",
59
60
  "fs-extra": "^11.2.0",
@@ -0,0 +1,14 @@
1
+ import path from 'pathe'
2
+ import { rimraf } from 'rimraf'
3
+
4
+ const dirs = [
5
+ 'packages/monorepo',
6
+ 'packages/foo',
7
+ // 'apps/cli',
8
+ // 'apps/website',
9
+ 'apps',
10
+ ]
11
+
12
+ await rimraf(dirs.map((x) => {
13
+ return path.resolve(import.meta.dirname, '..', x)
14
+ }))
@@ -0,0 +1,18 @@
1
+ import process from 'node:process'
2
+ import path from 'pathe'
3
+ import { GitClient } from './git'
4
+ import { getWorkspacePackages } from './utils'
5
+
6
+ export async function createContext(cwd = process.cwd()) {
7
+ const git = new GitClient()
8
+ const workspaceFilepath = path.resolve(import.meta.dirname, '../pnpm-workspace.yaml')
9
+ const projects = await getWorkspacePackages(cwd)
10
+ return {
11
+ cwd,
12
+ git,
13
+ workspaceFilepath,
14
+ projects,
15
+ }
16
+ }
17
+
18
+ export type Context = Awaited<ReturnType<typeof createContext>>
@@ -0,0 +1,56 @@
1
+ import get from 'get-value'
2
+ import gitUrlParse from 'git-url-parse'
3
+ import { simpleGit } from 'simple-git'
4
+ import type { ConfigValues, SimpleGit, SimpleGitOptions } from 'simple-git'
5
+
6
+ export class GitClient {
7
+ private client: SimpleGit
8
+ #config: ConfigValues | undefined
9
+ constructor(options: Partial<SimpleGitOptions> = {}) {
10
+ this.client = simpleGit(options)
11
+ }
12
+
13
+ listConfig() {
14
+ return this.client.listConfig()
15
+ }
16
+
17
+ async init() {
18
+ const listConfig = await this.listConfig()
19
+ this.#config = listConfig.all
20
+ return this.#config
21
+ }
22
+
23
+ async getConfig() {
24
+ if (this.#config) {
25
+ return this.#config
26
+ }
27
+ else {
28
+ return await this.init()
29
+ }
30
+ }
31
+
32
+ async getGitUrl() {
33
+ const config = await this.getConfig()
34
+ const x = get(config, 'remote.origin.url')
35
+ if (x) {
36
+ return gitUrlParse(x)
37
+ }
38
+ }
39
+
40
+ async getRepoName() {
41
+ const url = await this.getGitUrl()
42
+ if (url) {
43
+ return `${url.owner}/${url.name}`
44
+ }
45
+ }
46
+
47
+ async getUser() {
48
+ const config = await this.getConfig()
49
+ const name: string = get(config, 'user.name')
50
+ const email: string = get(config, 'user.email')
51
+ return {
52
+ name,
53
+ email,
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,8 @@
1
+ import { createContext } from './context'
2
+ import setPkgJson from './setPkgJson'
3
+ import setReadme from './setReadme'
4
+
5
+ const ctx = await createContext()
6
+
7
+ await setPkgJson(ctx)
8
+ await setReadme(ctx)
@@ -0,0 +1,35 @@
1
+ import fs from 'fs-extra'
2
+ import path from 'pathe'
3
+ import set from 'set-value'
4
+ import type { PackageJson } from 'pkg-types'
5
+ import type { Context } from './context'
6
+
7
+ export default async function (ctx: Context) {
8
+ const { git, projects, cwd, workspaceFilepath } = ctx
9
+ const gitUrl = await git.getGitUrl()
10
+ const gitUser = await git.getUser()
11
+ if (gitUrl && await fs.exists(workspaceFilepath)) {
12
+ for (const project of projects) {
13
+ const pkgJson = project.manifest
14
+ const directory = path.relative(cwd, project.rootDir)
15
+ set(pkgJson, 'bugs.url', `https://github.com/${gitUrl.full_name}/issues`)
16
+ const repository: PackageJson['repository'] = {
17
+ type: 'git',
18
+ url: `git+https://github.com/${gitUrl.full_name}.git`,
19
+ }
20
+ if (directory) {
21
+ repository.directory = directory
22
+ }
23
+ set(pkgJson, 'repository', repository)
24
+ if (gitUser) {
25
+ set(pkgJson, 'author', `${gitUser.name} <${gitUser.email}>`)
26
+ }
27
+ // "maintainers": [
28
+ // "xxx <xxx@gmail.com> (url)",
29
+ // ],
30
+ await fs.writeJSON(project.pkgJsonPath, pkgJson, {
31
+ spaces: 2,
32
+ })
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,24 @@
1
+ import fs from 'fs-extra'
2
+ import path from 'pathe'
3
+ import type { Context } from './context'
4
+
5
+ async function getRows(ctx: Context) {
6
+ const { projects, git, cwd } = ctx
7
+ const gitUrl = await git.getGitUrl()
8
+ const rows: string[] = []
9
+ if (gitUrl) {
10
+ rows.push(`# ${gitUrl.name}\n`)
11
+ }
12
+ rows.push('## Projects\n')
13
+ for (const project of projects) {
14
+ const p = path.relative(cwd, project.rootDirRealPath)
15
+ p && rows.push(`- [${project.manifest.name}](${p}) ${project.manifest.description ? `- ${project.manifest.description}` : ''}`)
16
+ }
17
+
18
+ return rows
19
+ }
20
+
21
+ export default async function (ctx: Context) {
22
+ const rows = await getRows(ctx)
23
+ await fs.writeFile(path.resolve(ctx.cwd, 'README.md'), `${rows.join('\n')}\n`)
24
+ }
@@ -0,0 +1,15 @@
1
+ import process from 'node:process'
2
+ import { execa } from 'execa'
3
+ import { getWorkspacePackages } from './utils'
4
+
5
+ const cwd = process.cwd()
6
+
7
+ const packages = await getWorkspacePackages(cwd)
8
+
9
+ for (const project of packages) {
10
+ if (project.manifest.name) {
11
+ await execa({
12
+ stdout: ['pipe', 'inherit'],
13
+ })`cnpm sync ${project.manifest.name}`
14
+ }
15
+ }
@@ -0,0 +1,21 @@
1
+ import { findWorkspacePackages } from '@pnpm/workspace.find-packages'
2
+ import path from 'pathe'
3
+
4
+ export async function getWorkspacePackages(cwd: string) {
5
+ const packages = await findWorkspacePackages(cwd)
6
+ return (
7
+ await Promise.allSettled(packages.map(async (project) => {
8
+ const pkgJsonPath = path.resolve(project.rootDir, 'package.json')
9
+ return {
10
+ ...project,
11
+ pkgJsonPath,
12
+ }
13
+ }))
14
+ )
15
+ .filter((x) => {
16
+ return x.status === 'fulfilled'
17
+ })
18
+ .map((x) => {
19
+ return x.value
20
+ })
21
+ }
@@ -310,30 +310,43 @@ init_esm_shims();
310
310
  init_esm_shims();
311
311
  var import_get_value2 = __toESM(require_get_value(), 1);
312
312
  var import_set_value = __toESM(require_set_value(), 1);
313
- import { fileURLToPath } from "node:url";
314
313
  import process from "node:process";
315
- import path from "pathe";
314
+ import { fileURLToPath } from "node:url";
315
+ import checkbox from "@inquirer/checkbox";
316
316
  import fs from "fs-extra";
317
317
  import klaw from "klaw";
318
318
  import PQueue from "p-queue";
319
- import checkbox from "@inquirer/checkbox";
319
+ import path from "pathe";
320
320
 
321
321
  // ../../scripts/git.ts
322
322
  init_esm_shims();
323
323
  var import_get_value = __toESM(require_get_value(), 1);
324
- import { simpleGit } from "simple-git";
325
324
  import gitUrlParse from "git-url-parse";
325
+ import { simpleGit } from "simple-git";
326
326
  var GitClient = class {
327
327
  client;
328
+ #config;
328
329
  constructor(options = {}) {
329
330
  this.client = simpleGit(options);
330
331
  }
331
332
  listConfig() {
332
333
  return this.client.listConfig();
333
334
  }
334
- async getGitUrl() {
335
+ async init() {
335
336
  const listConfig = await this.listConfig();
336
- const x = (0, import_get_value.default)(listConfig.all, "remote.origin.url");
337
+ this.#config = listConfig.all;
338
+ return this.#config;
339
+ }
340
+ async getConfig() {
341
+ if (this.#config) {
342
+ return this.#config;
343
+ } else {
344
+ return await this.init();
345
+ }
346
+ }
347
+ async getGitUrl() {
348
+ const config = await this.getConfig();
349
+ const x = (0, import_get_value.default)(config, "remote.origin.url");
337
350
  if (x) {
338
351
  return gitUrlParse(x);
339
352
  }
@@ -344,6 +357,15 @@ var GitClient = class {
344
357
  return `${url.owner}/${url.name}`;
345
358
  }
346
359
  }
360
+ async getUser() {
361
+ const config = await this.getConfig();
362
+ const name = (0, import_get_value.default)(config, "user.name");
363
+ const email = (0, import_get_value.default)(config, "user.email");
364
+ return {
365
+ name,
366
+ email
367
+ };
368
+ }
347
369
  };
348
370
 
349
371
  // src/logger.ts
@@ -351,20 +373,6 @@ init_esm_shims();
351
373
  import { createConsola } from "consola";
352
374
  var logger = createConsola();
353
375
 
354
- // src/utils.ts
355
- init_esm_shims();
356
- function escapeStringRegexp(str) {
357
- return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
358
- }
359
- function isMatch(str, arr) {
360
- for (const reg of arr) {
361
- if (reg.test(str)) {
362
- return true;
363
- }
364
- }
365
- return false;
366
- }
367
-
368
376
  // src/targets.ts
369
377
  init_esm_shims();
370
378
  function getTargets(raw) {
@@ -391,8 +399,9 @@ function getTargets(raw) {
391
399
  "vitest.workspace.ts",
392
400
  // #region docker
393
401
  "Dockerfile",
394
- ".dockerignore"
402
+ ".dockerignore",
395
403
  // #endregion
404
+ "scripts"
396
405
  ];
397
406
  if (!raw) {
398
407
  list.push(".github", "LICENSE", "renovate.json", "SECURITY.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "netlify.toml");
@@ -400,6 +409,20 @@ function getTargets(raw) {
400
409
  return list;
401
410
  }
402
411
 
412
+ // src/utils.ts
413
+ init_esm_shims();
414
+ function escapeStringRegexp(str) {
415
+ return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
416
+ }
417
+ function isMatch(str, arr) {
418
+ for (const reg of arr) {
419
+ if (reg.test(str)) {
420
+ return true;
421
+ }
422
+ }
423
+ return false;
424
+ }
425
+
403
426
  // src/lib.ts
404
427
  var queue = new PQueue({ concurrency: 1 });
405
428
  var __filename2 = fileURLToPath(import.meta.url);
@@ -425,6 +448,12 @@ async function main(opts) {
425
448
  })
426
449
  });
427
450
  }
451
+ const removeDirs = ["scripts"];
452
+ for (const dir of removeDirs) {
453
+ if (targets.includes(dir)) {
454
+ await fs.remove(path.resolve(absOutDir, dir));
455
+ }
456
+ }
428
457
  const regexpArr = targets.map((x) => {
429
458
  return new RegExp(`^${escapeStringRegexp(x)}`);
430
459
  });
package/dist/cli.cjs CHANGED
@@ -316,41 +316,49 @@ var import_commander = require("commander");
316
316
 
317
317
  // package.json
318
318
  var name = "@icebreakers/monorepo";
319
- var version = "0.2.5";
320
-
321
- // src/logger.ts
322
- init_cjs_shims();
323
- var import_consola = require("consola");
324
- var logger = (0, import_consola.createConsola)();
319
+ var version = "0.3.0";
325
320
 
326
321
  // src/lib.ts
327
322
  init_cjs_shims();
328
- var import_node_url = require("url");
329
323
  var import_node_process = __toESM(require("process"), 1);
330
- var import_pathe = __toESM(require("pathe"), 1);
324
+ var import_node_url = require("url");
325
+ var import_checkbox = __toESM(require("@inquirer/checkbox"), 1);
331
326
  var import_fs_extra = __toESM(require("fs-extra"), 1);
332
327
  var import_get_value2 = __toESM(require_get_value(), 1);
333
- var import_set_value = __toESM(require_set_value(), 1);
334
328
  var import_klaw = __toESM(require("klaw"), 1);
335
329
  var import_p_queue = __toESM(require("p-queue"), 1);
336
- var import_checkbox = __toESM(require("@inquirer/checkbox"), 1);
330
+ var import_pathe = __toESM(require("pathe"), 1);
331
+ var import_set_value = __toESM(require_set_value(), 1);
337
332
 
338
333
  // ../../scripts/git.ts
339
334
  init_cjs_shims();
340
335
  var import_get_value = __toESM(require_get_value(), 1);
341
- var import_simple_git = require("simple-git");
342
336
  var import_git_url_parse = __toESM(require("git-url-parse"), 1);
337
+ var import_simple_git = require("simple-git");
343
338
  var GitClient = class {
344
339
  client;
340
+ #config;
345
341
  constructor(options = {}) {
346
342
  this.client = (0, import_simple_git.simpleGit)(options);
347
343
  }
348
344
  listConfig() {
349
345
  return this.client.listConfig();
350
346
  }
351
- async getGitUrl() {
347
+ async init() {
352
348
  const listConfig = await this.listConfig();
353
- const x = (0, import_get_value.default)(listConfig.all, "remote.origin.url");
349
+ this.#config = listConfig.all;
350
+ return this.#config;
351
+ }
352
+ async getConfig() {
353
+ if (this.#config) {
354
+ return this.#config;
355
+ } else {
356
+ return await this.init();
357
+ }
358
+ }
359
+ async getGitUrl() {
360
+ const config = await this.getConfig();
361
+ const x = (0, import_get_value.default)(config, "remote.origin.url");
354
362
  if (x) {
355
363
  return (0, import_git_url_parse.default)(x);
356
364
  }
@@ -361,21 +369,21 @@ var GitClient = class {
361
369
  return `${url.owner}/${url.name}`;
362
370
  }
363
371
  }
372
+ async getUser() {
373
+ const config = await this.getConfig();
374
+ const name2 = (0, import_get_value.default)(config, "user.name");
375
+ const email = (0, import_get_value.default)(config, "user.email");
376
+ return {
377
+ name: name2,
378
+ email
379
+ };
380
+ }
364
381
  };
365
382
 
366
- // src/utils.ts
383
+ // src/logger.ts
367
384
  init_cjs_shims();
368
- function escapeStringRegexp(str) {
369
- return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
370
- }
371
- function isMatch(str, arr) {
372
- for (const reg of arr) {
373
- if (reg.test(str)) {
374
- return true;
375
- }
376
- }
377
- return false;
378
- }
385
+ var import_consola = require("consola");
386
+ var logger = (0, import_consola.createConsola)();
379
387
 
380
388
  // src/targets.ts
381
389
  init_cjs_shims();
@@ -403,8 +411,9 @@ function getTargets(raw) {
403
411
  "vitest.workspace.ts",
404
412
  // #region docker
405
413
  "Dockerfile",
406
- ".dockerignore"
414
+ ".dockerignore",
407
415
  // #endregion
416
+ "scripts"
408
417
  ];
409
418
  if (!raw) {
410
419
  list.push(".github", "LICENSE", "renovate.json", "SECURITY.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "netlify.toml");
@@ -412,6 +421,20 @@ function getTargets(raw) {
412
421
  return list;
413
422
  }
414
423
 
424
+ // src/utils.ts
425
+ init_cjs_shims();
426
+ function escapeStringRegexp(str) {
427
+ return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
428
+ }
429
+ function isMatch(str, arr) {
430
+ for (const reg of arr) {
431
+ if (reg.test(str)) {
432
+ return true;
433
+ }
434
+ }
435
+ return false;
436
+ }
437
+
415
438
  // src/lib.ts
416
439
  var queue = new import_p_queue.default({ concurrency: 1 });
417
440
  var __filename2 = (0, import_node_url.fileURLToPath)(importMetaUrl);
@@ -437,6 +460,12 @@ async function main(opts) {
437
460
  })
438
461
  });
439
462
  }
463
+ const removeDirs = ["scripts"];
464
+ for (const dir of removeDirs) {
465
+ if (targets.includes(dir)) {
466
+ await import_fs_extra.default.remove(import_pathe.default.resolve(absOutDir, dir));
467
+ }
468
+ }
440
469
  const regexpArr = targets.map((x) => {
441
470
  return new RegExp(`^${escapeStringRegexp(x)}`);
442
471
  });
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  init_esm_shims,
3
3
  logger,
4
4
  main
5
- } from "./chunk-CCXXIPGT.js";
5
+ } from "./chunk-HFEJOR7C.js";
6
6
 
7
7
  // src/cli.ts
8
8
  init_esm_shims();
@@ -13,7 +13,7 @@ import { program } from "commander";
13
13
 
14
14
  // package.json
15
15
  var name = "@icebreakers/monorepo";
16
- var version = "0.2.5";
16
+ var version = "0.3.0";
17
17
 
18
18
  // src/program.ts
19
19
  program.name(name).version(version);
package/dist/index.cjs CHANGED
@@ -322,32 +322,45 @@ init_cjs_shims();
322
322
 
323
323
  // src/lib.ts
324
324
  init_cjs_shims();
325
- var import_node_url = require("url");
326
325
  var import_node_process = __toESM(require("process"), 1);
327
- var import_pathe = __toESM(require("pathe"), 1);
326
+ var import_node_url = require("url");
327
+ var import_checkbox = __toESM(require("@inquirer/checkbox"), 1);
328
328
  var import_fs_extra = __toESM(require("fs-extra"), 1);
329
329
  var import_get_value2 = __toESM(require_get_value(), 1);
330
- var import_set_value = __toESM(require_set_value(), 1);
331
330
  var import_klaw = __toESM(require("klaw"), 1);
332
331
  var import_p_queue = __toESM(require("p-queue"), 1);
333
- var import_checkbox = __toESM(require("@inquirer/checkbox"), 1);
332
+ var import_pathe = __toESM(require("pathe"), 1);
333
+ var import_set_value = __toESM(require_set_value(), 1);
334
334
 
335
335
  // ../../scripts/git.ts
336
336
  init_cjs_shims();
337
337
  var import_get_value = __toESM(require_get_value(), 1);
338
- var import_simple_git = require("simple-git");
339
338
  var import_git_url_parse = __toESM(require("git-url-parse"), 1);
339
+ var import_simple_git = require("simple-git");
340
340
  var GitClient = class {
341
341
  client;
342
+ #config;
342
343
  constructor(options = {}) {
343
344
  this.client = (0, import_simple_git.simpleGit)(options);
344
345
  }
345
346
  listConfig() {
346
347
  return this.client.listConfig();
347
348
  }
348
- async getGitUrl() {
349
+ async init() {
349
350
  const listConfig = await this.listConfig();
350
- const x = (0, import_get_value.default)(listConfig.all, "remote.origin.url");
351
+ this.#config = listConfig.all;
352
+ return this.#config;
353
+ }
354
+ async getConfig() {
355
+ if (this.#config) {
356
+ return this.#config;
357
+ } else {
358
+ return await this.init();
359
+ }
360
+ }
361
+ async getGitUrl() {
362
+ const config = await this.getConfig();
363
+ const x = (0, import_get_value.default)(config, "remote.origin.url");
351
364
  if (x) {
352
365
  return (0, import_git_url_parse.default)(x);
353
366
  }
@@ -358,6 +371,15 @@ var GitClient = class {
358
371
  return `${url.owner}/${url.name}`;
359
372
  }
360
373
  }
374
+ async getUser() {
375
+ const config = await this.getConfig();
376
+ const name = (0, import_get_value.default)(config, "user.name");
377
+ const email = (0, import_get_value.default)(config, "user.email");
378
+ return {
379
+ name,
380
+ email
381
+ };
382
+ }
361
383
  };
362
384
 
363
385
  // src/logger.ts
@@ -365,20 +387,6 @@ init_cjs_shims();
365
387
  var import_consola = require("consola");
366
388
  var logger = (0, import_consola.createConsola)();
367
389
 
368
- // src/utils.ts
369
- init_cjs_shims();
370
- function escapeStringRegexp(str) {
371
- return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
372
- }
373
- function isMatch(str, arr) {
374
- for (const reg of arr) {
375
- if (reg.test(str)) {
376
- return true;
377
- }
378
- }
379
- return false;
380
- }
381
-
382
390
  // src/targets.ts
383
391
  init_cjs_shims();
384
392
  function getTargets(raw) {
@@ -405,8 +413,9 @@ function getTargets(raw) {
405
413
  "vitest.workspace.ts",
406
414
  // #region docker
407
415
  "Dockerfile",
408
- ".dockerignore"
416
+ ".dockerignore",
409
417
  // #endregion
418
+ "scripts"
410
419
  ];
411
420
  if (!raw) {
412
421
  list.push(".github", "LICENSE", "renovate.json", "SECURITY.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "netlify.toml");
@@ -414,6 +423,20 @@ function getTargets(raw) {
414
423
  return list;
415
424
  }
416
425
 
426
+ // src/utils.ts
427
+ init_cjs_shims();
428
+ function escapeStringRegexp(str) {
429
+ return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
430
+ }
431
+ function isMatch(str, arr) {
432
+ for (const reg of arr) {
433
+ if (reg.test(str)) {
434
+ return true;
435
+ }
436
+ }
437
+ return false;
438
+ }
439
+
417
440
  // src/lib.ts
418
441
  var queue = new import_p_queue.default({ concurrency: 1 });
419
442
  var __filename2 = (0, import_node_url.fileURLToPath)(importMetaUrl);
@@ -439,6 +462,12 @@ async function main(opts) {
439
462
  })
440
463
  });
441
464
  }
465
+ const removeDirs = ["scripts"];
466
+ for (const dir of removeDirs) {
467
+ if (targets.includes(dir)) {
468
+ await import_fs_extra.default.remove(import_pathe.default.resolve(absOutDir, dir));
469
+ }
470
+ }
442
471
  const regexpArr = targets.map((x) => {
443
472
  return new RegExp(`^${escapeStringRegexp(x)}`);
444
473
  });
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  main
3
- } from "./chunk-CCXXIPGT.js";
3
+ } from "./chunk-HFEJOR7C.js";
4
4
  export {
5
5
  main
6
6
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "0.2.5",
4
+ "version": "0.3.0",
5
5
  "description": "icebreaker's monorepo config generator",
6
- "author": "sonofmagic",
6
+ "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://monorepo.icebreaker.top",
9
9
  "repository": {