create-juisy 2.0.0-beta.9 → 2.1.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.
Files changed (47) hide show
  1. package/LICENSE +661 -0
  2. package/index.js +45 -17
  3. package/package.json +57 -59
  4. package/template/.env.example +1 -1
  5. package/template/COMMIT_CONVENTION.md +116 -0
  6. package/template/CONTRIBUTING.md +61 -0
  7. package/template/bin/cli/cli.js +11 -14
  8. package/template/bin/cli/cmds/index.js +4 -6
  9. package/template/bin/cli/cmds/private/docs/{generate-api.js → GenerateAPI.js} +28 -7
  10. package/template/bin/cli/cmds/private/docs/index.js +30 -11
  11. package/template/bin/cli/cmds/private/test.js +40 -25
  12. package/template/bin/cli/index.js +4 -2
  13. package/template/bin/scripts/commit-msg.js +13 -18
  14. package/template/bin/scripts/pre-commit.js +13 -11
  15. package/template/dev.config.js +37 -5
  16. package/template/dev.config.json +19 -1
  17. package/template/dev.config.ts +40 -1
  18. package/template/docs/.markdownlint-cli2.mjs +21 -0
  19. package/template/docs/cli/private/config.js +37 -0
  20. package/template/docs/cli/private/data.js +14 -0
  21. package/template/docs/cli/private/partials/child-command.md +26 -0
  22. package/template/docs/cli/private/template.md +26 -0
  23. package/template/docs/cli/public/config.js +21 -0
  24. package/template/docs/cli/public/template.md +19 -0
  25. package/template/docs/readme/config.js +24 -13
  26. package/template/docs/readme/data.js +45 -0
  27. package/template/docs/readme/template.md +37 -9
  28. package/template/eslint.config.js +47 -0
  29. package/template/package.json +9 -6
  30. package/template/project.globals.js +20 -29
  31. package/template/tests/unit/example.spec.ts +13 -0
  32. package/template/tests/unit/setup.unit.ts +14 -0
  33. package/template/tests/vitest.d.ts +16 -0
  34. package/template/tsconfig.json +18 -0
  35. package/template/vite.config.ts +22 -0
  36. package/template/bin/cli/cmds/private/changelog.js +0 -44
  37. package/template/bin/cli/cmds/private/docs/generate-cli.js +0 -11
  38. package/template/bin/cli/cmds/private/docs/generate-readme.js +0 -11
  39. package/template/bin/cli/cmds/private/docs/lint.js +0 -42
  40. package/template/bin/cli/cmds/private/git-hooks/index.js +0 -20
  41. package/template/bin/cli/cmds/private/git-hooks/reset.js +0 -48
  42. package/template/bin/cli/cmds/private/git-hooks/sync.js +0 -19
  43. package/template/bin/cli/cmds/private/release.js +0 -223
  44. package/template/bin/cli/lib/docs/generate-api-doc.js +0 -33
  45. package/template/bin/cli/lib/release/generate-release-note.js +0 -3
  46. package/template/bin/cli/lib/version/update-version.js +0 -51
  47. package/template/docs/readme/readme.js +0 -70
@@ -1,70 +0,0 @@
1
- /**
2
- * @hperchec/readme-generator Template EJS data example file
3
- */
4
-
5
- const markdownTable = require('markdown-table') // ! v3 not compatible, use v2
6
-
7
- // Based on the package.json file, get some data and informations
8
- const pkg = require('../../package.json')
9
- const packageName = pkg.name
10
- const packageUrl = `https://www.npmjs.com/package/${packageName}`
11
- const dependencies = pkg.dependencies || {}
12
- const devDependencies = pkg.devDependencies || {}
13
- const peerDependencies = pkg.peerDependencies || {}
14
- const author = pkg.author
15
- const contributors = pkg.contributors || []
16
- const license = pkg.license || 'Unknown'
17
- const homepage = pkg.homepage
18
- const projectUrl = pkg.repository.url
19
- const issuesUrl = pkg.bugs.url
20
-
21
- // Output a markdown formatted table from a js object
22
- // Like:
23
- // |name|version|
24
- // |----|-------|
25
- // | | |
26
- function getMdDependencies (deps) {
27
- return markdownTable([
28
- [ 'name', 'version' ],
29
- ...(Object.entries(deps))
30
- ])
31
- }
32
-
33
- /**
34
- * Return author link
35
- * @param {Object} author
36
- * @return {string}
37
- */
38
- function getMdAuthor (author) {
39
- return '[' + author.name + '](' + author.url + ')'
40
- }
41
-
42
- /**
43
- * Return markdown list of persons
44
- * @param {Array} contributors
45
- * @return {String}
46
- */
47
- function getMdContributors (contributors) {
48
- let mdString = ''
49
- contributors.forEach((person) => {
50
- mdString += '- [' + person.name + '](' + person.url + ')\n'
51
- })
52
- return mdString
53
- }
54
-
55
- /**
56
- * Export data for readme file templating
57
- */
58
- module.exports = {
59
- packageName,
60
- packageUrl,
61
- projectUrl,
62
- homepage,
63
- issuesUrl,
64
- dependencies: getMdDependencies(dependencies),
65
- devDependencies: getMdDependencies(devDependencies),
66
- peerDependencies: getMdDependencies(peerDependencies),
67
- author: getMdAuthor(author),
68
- contributors: getMdContributors(contributors),
69
- license
70
- }