create-docus 1.0.7 → 1.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.
- package/README.md +33 -2
- package/dist/create-docus/helpers.js +6 -4
- package/dist/create-docus/index.js +3 -3
- package/package.json +12 -11
package/README.md
CHANGED
|
@@ -8,14 +8,45 @@ Add `docus` package globally:
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
# Using Yarn
|
|
11
|
-
yarn
|
|
11
|
+
yarn global add docus
|
|
12
|
+
|
|
12
13
|
# Using NPM
|
|
13
14
|
npm install --global docus
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
## Commands
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
### `npm init docus`
|
|
20
|
+
|
|
21
|
+
This package is also responsible for the `npm init docus` command.
|
|
22
|
+
|
|
23
|
+
You can use it without installing `docus` package globally.
|
|
24
|
+
|
|
25
|
+
`--` is required as specified [here](https://docs.npmjs.com/cli/v7/commands/npm-init#forwarding-additional-options).
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm init docus -- path/to/project
|
|
29
|
+
|
|
30
|
+
npm init docus -- --type="module" path/to/project
|
|
31
|
+
|
|
32
|
+
npm init docus -- --type="theme" path/to/project
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### `create-docus`
|
|
36
|
+
|
|
37
|
+
If you install the `docus` package globally, it will be shipped with `create-docus` executable.
|
|
38
|
+
|
|
39
|
+
This allows the creation of a [Docus project](https://github.com/docusgen/starter), a [theme](https://github.com/docusgen/theme-starter) or a [module](https://github.com/docusgen/module-starter).
|
|
40
|
+
|
|
41
|
+
You can execute this command anywhere:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
create-docus path/to/project
|
|
45
|
+
|
|
46
|
+
create-docus --type="module" path/to/project
|
|
47
|
+
|
|
48
|
+
create-docus --type="theme" path/to/project
|
|
49
|
+
```
|
|
19
50
|
|
|
20
51
|
## Development
|
|
21
52
|
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.args = void 0;
|
|
7
|
+
exports.createDir = createDir;
|
|
8
|
+
exports.createProject = createProject;
|
|
9
|
+
exports.cwd = void 0;
|
|
6
10
|
exports.getProjectType = getProjectType;
|
|
11
|
+
exports.getTargetDir = getTargetDir;
|
|
7
12
|
exports.getTemplate = getTemplate;
|
|
8
|
-
exports.createDir = createDir;
|
|
9
13
|
exports.getValidPackageName = getValidPackageName;
|
|
10
|
-
exports.
|
|
11
|
-
exports.createProject = createProject;
|
|
12
|
-
exports.log = exports.pkgManager = exports.args = exports.cwd = void 0;
|
|
14
|
+
exports.pkgManager = exports.log = void 0;
|
|
13
15
|
|
|
14
16
|
var _package = require("../../package.json");
|
|
15
17
|
|
|
@@ -9,7 +9,7 @@ var _path = require("path");
|
|
|
9
9
|
|
|
10
10
|
var _prompts = _interopRequireDefault(require("prompts"));
|
|
11
11
|
|
|
12
|
-
var _execa =
|
|
12
|
+
var _execa = require("execa");
|
|
13
13
|
|
|
14
14
|
var _helpers = require("./helpers");
|
|
15
15
|
|
|
@@ -66,11 +66,11 @@ async function startProject(projectPath) {
|
|
|
66
66
|
return startItLater(projectPath);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
await (0, _execa.
|
|
69
|
+
await (0, _execa.execa)(agent, ["install"], {
|
|
70
70
|
stdio: "inherit",
|
|
71
71
|
cwd: projectPath
|
|
72
72
|
});
|
|
73
|
-
await (0, _execa.
|
|
73
|
+
await (0, _execa.execa)(agent, ["run", "dev"], {
|
|
74
74
|
stdio: "inherit",
|
|
75
75
|
cwd: projectPath
|
|
76
76
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-docus",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The Docus CLI.",
|
|
5
5
|
"repository": "https://github.com/docusgen/cli",
|
|
6
6
|
"bugs": {
|
|
@@ -38,25 +38,26 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"degit": "^2.8.4",
|
|
41
|
-
"execa": "^
|
|
41
|
+
"execa": "^6.0.0",
|
|
42
42
|
"kolorist": "^1.5.0",
|
|
43
43
|
"minimist": "^1.2.5",
|
|
44
|
-
"prompts": "^2.4.
|
|
44
|
+
"prompts": "^2.4.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/degit": "^2.8.3",
|
|
48
|
-
"@types/jest": "^27.0.
|
|
48
|
+
"@types/jest": "^27.0.3",
|
|
49
49
|
"@types/minimist": "^1.2.2",
|
|
50
50
|
"@types/prompts": "^2.0.14",
|
|
51
51
|
"chokidar": "^3.5.2",
|
|
52
|
-
"jest": "^27.
|
|
53
|
-
"jiti": "^1.
|
|
54
|
-
"lint-staged": "^
|
|
52
|
+
"jest": "^27.3.1",
|
|
53
|
+
"jiti": "^1.12.9",
|
|
54
|
+
"lint-staged": "^12.1.2",
|
|
55
55
|
"pascalcase": "^1.0.0",
|
|
56
|
-
"prettier": "^2.
|
|
57
|
-
"ts-jest": "^27.0.
|
|
58
|
-
"typescript": "^4.
|
|
59
|
-
"unbuild": "^0.
|
|
56
|
+
"prettier": "^2.4.1",
|
|
57
|
+
"ts-jest": "^27.0.7",
|
|
58
|
+
"typescript": "^4.5.2",
|
|
59
|
+
"unbuild": "^0.5.13",
|
|
60
|
+
"upath": "^2.0.1"
|
|
60
61
|
},
|
|
61
62
|
"gitHooks": {
|
|
62
63
|
"pre-commit": "lint-staged"
|