@icebreakers/monorepo 0.3.0 → 0.3.1

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.
@@ -0,0 +1,3 @@
1
+ # Contributing
2
+
3
+ TODO
@@ -4,6 +4,14 @@ import set from 'set-value'
4
4
  import type { PackageJson } from 'pkg-types'
5
5
  import type { Context } from './context'
6
6
 
7
+ const scripts = {
8
+ 'script:init': 'tsx scripts/init.ts',
9
+ 'script:sync': 'tsx scripts/sync.ts',
10
+ 'script:clean': 'tsx scripts/clean.ts',
11
+ }
12
+
13
+ const scriptsEntries = Object.entries(scripts)
14
+
7
15
  export default async function (ctx: Context) {
8
16
  const { git, projects, cwd, workspaceFilepath } = ctx
9
17
  const gitUrl = await git.getGitUrl()
@@ -20,10 +28,16 @@ export default async function (ctx: Context) {
20
28
  if (directory) {
21
29
  repository.directory = directory
22
30
  }
31
+ else {
32
+ for (const [k, v] of scriptsEntries) {
33
+ set(pkgJson, `scripts.${k}`, v)
34
+ }
35
+ }
23
36
  set(pkgJson, 'repository', repository)
24
37
  if (gitUser) {
25
38
  set(pkgJson, 'author', `${gitUser.name} <${gitUser.email}>`)
26
39
  }
40
+
27
41
  // "maintainers": [
28
42
  // "xxx <xxx@gmail.com> (url)",
29
43
  // ],
@@ -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
  }
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.0";
319
+ var version = "0.3.1";
320
320
 
321
321
  // src/lib.ts
322
322
  init_cjs_shims();
package/dist/cli.js CHANGED
@@ -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.0";
16
+ var version = "0.3.1";
17
17
 
18
18
  // src/program.ts
19
19
  program.name(name).version(version);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "description": "icebreaker's monorepo config generator",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",