create-juisy 2.0.0-beta.19 → 2.0.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.
- package/package.json +2 -2
- package/template/CONTRIBUTING.md +4 -4
- package/template/bin/cli/cmds/index.js +4 -4
- package/template/bin/cli/cmds/private/docs/{generate-api.js → GenerateAPI.js} +43 -22
- package/template/bin/cli/cmds/private/docs/index.js +29 -11
- package/template/bin/cli/cmds/private/test.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-juisy",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Juisy boilerplate for npm init",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"homepage": "https://hperchec.gitlab.io/juisy",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"execa": "^9.5.2",
|
|
45
|
-
"juisy": "2.0.
|
|
45
|
+
"juisy": "2.0.1",
|
|
46
46
|
"mri": "^1.2.0"
|
|
47
47
|
},
|
|
48
48
|
"release-it": {
|
package/template/CONTRIBUTING.md
CHANGED
|
@@ -36,15 +36,15 @@ Run the following command to make a release:
|
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
38
|
# Show help
|
|
39
|
-
npm run release --help
|
|
39
|
+
npm run release -- --help
|
|
40
40
|
# Release a patch
|
|
41
|
-
npm run release --increment patch
|
|
41
|
+
npm run release -- --increment patch
|
|
42
42
|
# Release a specific version
|
|
43
|
-
npm run release -i 2.0.0
|
|
43
|
+
npm run release -- -i 2.0.0
|
|
44
44
|
# To increment the current prerelease. For example:
|
|
45
45
|
# from 1.0.0-beta.1
|
|
46
46
|
# to 1.0.0-beta.2
|
|
47
|
-
npm run release -i pre
|
|
47
|
+
npm run release -- -i pre
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
> 💡 See also:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Private commands
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import Docs from './private/docs/index.js'
|
|
3
|
+
import Test from './private/test.js'
|
|
4
4
|
|
|
5
5
|
export const commands = [
|
|
6
6
|
// Private commands
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Docs,
|
|
8
|
+
Test
|
|
9
9
|
// Public commands
|
|
10
10
|
// ...
|
|
11
11
|
]
|
|
@@ -1,22 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
export default class GenerateAPI extends CLI.Command {
|
|
2
|
+
/**
|
|
3
|
+
* The command signature
|
|
4
|
+
*/
|
|
5
|
+
command = 'generate:api'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The command description
|
|
9
|
+
*/
|
|
10
|
+
describe = 'Generate API docs from source code'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The command meta
|
|
14
|
+
*/
|
|
15
|
+
meta = {
|
|
16
|
+
private: true
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Command builder
|
|
21
|
+
*/
|
|
22
|
+
builder (cli) {
|
|
23
|
+
return cli
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Command handler
|
|
28
|
+
*/
|
|
29
|
+
async handler (argv) {
|
|
30
|
+
// Utils
|
|
31
|
+
const { $style, step, substep } = CLI.OutputUtils
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Generate api documentation
|
|
35
|
+
*/
|
|
36
|
+
step('Generating API documentation')
|
|
37
|
+
|
|
38
|
+
substep($style.yellow('⚠ This command does nothing...'), { last: true })
|
|
39
|
+
this.log() // blank line
|
|
40
|
+
this.log($style.yellow('You can use JSDoc or TypeDoc for example. See documentation'))
|
|
41
|
+
this.log() // blank line
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,21 +1,39 @@
|
|
|
1
|
-
import
|
|
1
|
+
import GenerateAPI from './GenerateAPI.js'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export default class Docs extends CLI.Command {
|
|
4
|
+
/**
|
|
5
|
+
* The command signature
|
|
6
|
+
*/
|
|
7
|
+
command = 'docs <command>'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The command description
|
|
11
|
+
*/
|
|
12
|
+
describe = 'Manage project documentation'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The command meta
|
|
16
|
+
*/
|
|
17
|
+
meta = {
|
|
8
18
|
private: true
|
|
9
|
-
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Command builder
|
|
23
|
+
*/
|
|
10
24
|
builder (cli) {
|
|
11
25
|
return cli
|
|
12
26
|
.command([
|
|
13
27
|
/**
|
|
14
28
|
* Default command are automatically injected here...
|
|
15
29
|
*/
|
|
16
|
-
|
|
30
|
+
GenerateAPI
|
|
17
31
|
])
|
|
18
32
|
.demandCommand(1, 'Command is missing. See help to learn more.')
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Command handler
|
|
37
|
+
*/
|
|
38
|
+
async handler (argv) {}
|
|
39
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export default class TestCommand extends CLI.Command {
|
|
1
|
+
export default class Test extends CLI.Command {
|
|
3
2
|
/**
|
|
4
3
|
* The command signature
|
|
5
4
|
*/
|
|
@@ -28,7 +27,7 @@ export default class TestCommand extends CLI.Command {
|
|
|
28
27
|
/**
|
|
29
28
|
* Command handler
|
|
30
29
|
*/
|
|
31
|
-
async handler (
|
|
30
|
+
async handler (argv) {
|
|
32
31
|
const { run } = CLI.InterfaceUtils
|
|
33
32
|
|
|
34
33
|
// Forward arguments to vitest command
|