@icebreakers/monorepo 0.3.0 → 0.3.2
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/assets/CONTRIBUTING.md +3 -0
- package/assets/eslint.config.js +0 -1
- package/assets/scripts/setPkgJson.ts +2 -0
- package/assets/scripts/setReadme.ts +29 -0
- package/dist/{chunk-HFEJOR7C.js → chunk-CRQVH5BN.js} +9 -0
- package/dist/cli.cjs +10 -1
- package/dist/cli.js +2 -2
- package/dist/index.cjs +9 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/assets/CONTRIBUTING.md
CHANGED
package/assets/eslint.config.js
CHANGED
|
@@ -20,10 +20,12 @@ export default async function (ctx: Context) {
|
|
|
20
20
|
if (directory) {
|
|
21
21
|
repository.directory = directory
|
|
22
22
|
}
|
|
23
|
+
|
|
23
24
|
set(pkgJson, 'repository', repository)
|
|
24
25
|
if (gitUser) {
|
|
25
26
|
set(pkgJson, 'author', `${gitUser.name} <${gitUser.email}>`)
|
|
26
27
|
}
|
|
28
|
+
|
|
27
29
|
// "maintainers": [
|
|
28
30
|
// "xxx <xxx@gmail.com> (url)",
|
|
29
31
|
// ],
|
|
@@ -5,6 +5,7 @@ import type { Context } from './context'
|
|
|
5
5
|
async function getRows(ctx: Context) {
|
|
6
6
|
const { projects, git, cwd } = ctx
|
|
7
7
|
const gitUrl = await git.getGitUrl()
|
|
8
|
+
const gitUser = await git.getUser()
|
|
8
9
|
const rows: string[] = []
|
|
9
10
|
if (gitUrl) {
|
|
10
11
|
rows.push(`# ${gitUrl.name}\n`)
|
|
@@ -14,6 +15,34 @@ async function getRows(ctx: Context) {
|
|
|
14
15
|
const p = path.relative(cwd, project.rootDirRealPath)
|
|
15
16
|
p && rows.push(`- [${project.manifest.name}](${p}) ${project.manifest.description ? `- ${project.manifest.description}` : ''}`)
|
|
16
17
|
}
|
|
18
|
+
// ## Documentation
|
|
19
|
+
// ## Communication
|
|
20
|
+
if (gitUrl) {
|
|
21
|
+
// ## Contributing
|
|
22
|
+
rows.push('\n## Contributing\n')
|
|
23
|
+
rows.push('Contributions Welcome! You can contribute in the following ways.')
|
|
24
|
+
rows.push('')
|
|
25
|
+
rows.push('- Create an Issue - Propose a new feature. Report a bug.')
|
|
26
|
+
rows.push('- Pull Request - Fix a bug and typo. Refactor the code.')
|
|
27
|
+
rows.push('- Create third-party middleware - Instruct below.')
|
|
28
|
+
rows.push('- Share - Share your thoughts on the Blog, X, and others.')
|
|
29
|
+
rows.push(`- Make your application - Please try to use ${gitUrl.name}.`)
|
|
30
|
+
rows.push('')
|
|
31
|
+
rows.push('For more details, see [CONTRIBUTING.md](CONTRIBUTING.md).')
|
|
32
|
+
// ## Contributors
|
|
33
|
+
rows.push('\n## Contributors\n')
|
|
34
|
+
rows.push(`Thanks to [all contributors](https://github.com/${gitUrl.full_name}/graphs/contributors)!`)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ## Authors
|
|
38
|
+
|
|
39
|
+
rows.push('\n## Authors\n')
|
|
40
|
+
rows.push(`${gitUser.name} <${gitUser.email}>`)
|
|
41
|
+
|
|
42
|
+
// ## License
|
|
43
|
+
|
|
44
|
+
rows.push('\n## License\n')
|
|
45
|
+
rows.push('Distributed under the MIT License. See [LICENSE](LICENSE) for more information.')
|
|
17
46
|
|
|
18
47
|
return rows
|
|
19
48
|
}
|
|
@@ -429,6 +429,12 @@ var __filename2 = fileURLToPath(import.meta.url);
|
|
|
429
429
|
var __dirname2 = path.dirname(__filename2);
|
|
430
430
|
var assetsDir = path.join(__dirname2, "../assets");
|
|
431
431
|
var cwd = process.cwd();
|
|
432
|
+
var scripts = {
|
|
433
|
+
"script:init": "tsx scripts/init.ts",
|
|
434
|
+
"script:sync": "tsx scripts/sync.ts",
|
|
435
|
+
"script:clean": "tsx scripts/clean.ts"
|
|
436
|
+
};
|
|
437
|
+
var scriptsEntries = Object.entries(scripts);
|
|
432
438
|
async function main(opts) {
|
|
433
439
|
const { outDir = "", raw, interactive } = opts;
|
|
434
440
|
const absOutDir = path.isAbsolute(outDir) ? outDir : path.join(cwd, outDir);
|
|
@@ -482,6 +488,9 @@ async function main(opts) {
|
|
|
482
488
|
Object.entries(devDeps).forEach((x) => {
|
|
483
489
|
(0, import_set_value.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
|
|
484
490
|
});
|
|
491
|
+
for (const [k, v] of scriptsEntries) {
|
|
492
|
+
(0, import_set_value.default)(targetPkgJson, `scripts.${k}`, v);
|
|
493
|
+
}
|
|
485
494
|
await fs.writeJson(targetPath, targetPkgJson, {
|
|
486
495
|
spaces: 2
|
|
487
496
|
});
|
package/dist/cli.cjs
CHANGED
|
@@ -316,7 +316,7 @@ var import_commander = require("commander");
|
|
|
316
316
|
|
|
317
317
|
// package.json
|
|
318
318
|
var name = "@icebreakers/monorepo";
|
|
319
|
-
var version = "0.3.
|
|
319
|
+
var version = "0.3.2";
|
|
320
320
|
|
|
321
321
|
// src/lib.ts
|
|
322
322
|
init_cjs_shims();
|
|
@@ -441,6 +441,12 @@ var __filename2 = (0, import_node_url.fileURLToPath)(importMetaUrl);
|
|
|
441
441
|
var __dirname = import_pathe.default.dirname(__filename2);
|
|
442
442
|
var assetsDir = import_pathe.default.join(__dirname, "../assets");
|
|
443
443
|
var cwd = import_node_process.default.cwd();
|
|
444
|
+
var scripts = {
|
|
445
|
+
"script:init": "tsx scripts/init.ts",
|
|
446
|
+
"script:sync": "tsx scripts/sync.ts",
|
|
447
|
+
"script:clean": "tsx scripts/clean.ts"
|
|
448
|
+
};
|
|
449
|
+
var scriptsEntries = Object.entries(scripts);
|
|
444
450
|
async function main(opts) {
|
|
445
451
|
const { outDir = "", raw, interactive } = opts;
|
|
446
452
|
const absOutDir = import_pathe.default.isAbsolute(outDir) ? outDir : import_pathe.default.join(cwd, outDir);
|
|
@@ -494,6 +500,9 @@ async function main(opts) {
|
|
|
494
500
|
Object.entries(devDeps).forEach((x) => {
|
|
495
501
|
(0, import_set_value.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
|
|
496
502
|
});
|
|
503
|
+
for (const [k, v] of scriptsEntries) {
|
|
504
|
+
(0, import_set_value.default)(targetPkgJson, `scripts.${k}`, v);
|
|
505
|
+
}
|
|
497
506
|
await import_fs_extra.default.writeJson(targetPath, targetPkgJson, {
|
|
498
507
|
spaces: 2
|
|
499
508
|
});
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
init_esm_shims,
|
|
3
3
|
logger,
|
|
4
4
|
main
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CRQVH5BN.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.3.
|
|
16
|
+
var version = "0.3.2";
|
|
17
17
|
|
|
18
18
|
// src/program.ts
|
|
19
19
|
program.name(name).version(version);
|
package/dist/index.cjs
CHANGED
|
@@ -443,6 +443,12 @@ var __filename2 = (0, import_node_url.fileURLToPath)(importMetaUrl);
|
|
|
443
443
|
var __dirname = import_pathe.default.dirname(__filename2);
|
|
444
444
|
var assetsDir = import_pathe.default.join(__dirname, "../assets");
|
|
445
445
|
var cwd = import_node_process.default.cwd();
|
|
446
|
+
var scripts = {
|
|
447
|
+
"script:init": "tsx scripts/init.ts",
|
|
448
|
+
"script:sync": "tsx scripts/sync.ts",
|
|
449
|
+
"script:clean": "tsx scripts/clean.ts"
|
|
450
|
+
};
|
|
451
|
+
var scriptsEntries = Object.entries(scripts);
|
|
446
452
|
async function main(opts) {
|
|
447
453
|
const { outDir = "", raw, interactive } = opts;
|
|
448
454
|
const absOutDir = import_pathe.default.isAbsolute(outDir) ? outDir : import_pathe.default.join(cwd, outDir);
|
|
@@ -496,6 +502,9 @@ async function main(opts) {
|
|
|
496
502
|
Object.entries(devDeps).forEach((x) => {
|
|
497
503
|
(0, import_set_value.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
|
|
498
504
|
});
|
|
505
|
+
for (const [k, v] of scriptsEntries) {
|
|
506
|
+
(0, import_set_value.default)(targetPkgJson, `scripts.${k}`, v);
|
|
507
|
+
}
|
|
499
508
|
await import_fs_extra.default.writeJson(targetPath, targetPkgJson, {
|
|
500
509
|
spaces: 2
|
|
501
510
|
});
|
package/dist/index.js
CHANGED