docus 1.0.7 → 2.0.0-alpha.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/LICENSE +21 -0
- package/README.md +23 -16
- package/app/app/app.config.ts +33 -0
- package/app/app/app.vue +54 -0
- package/app/app/assets/css/main.css +5 -0
- package/app/app/components/IconMenuToggle.vue +81 -0
- package/app/app/components/OgImage/OgImageDocs.vue +76 -0
- package/app/app/components/OgImage/OgImageLanding.vue +73 -0
- package/app/app/components/app/AppFooter.vue +40 -0
- package/app/app/components/app/AppHeader.vue +57 -0
- package/app/app/components/app/AppHeaderBody.vue +13 -0
- package/app/app/components/app/AppHeaderCTA.vue +3 -0
- package/app/app/components/app/AppHeaderCenter.vue +6 -0
- package/app/app/components/app/AppHeaderLogo.vue +16 -0
- package/app/app/components/docs/DocsAsideLeftTop.vue +3 -0
- package/app/app/components/docs/DocsAsideRightBottom.vue +17 -0
- package/app/app/components/docs/DocsPageHeaderLinks.vue +91 -0
- package/app/app/error.vue +42 -0
- package/app/app/layouts/docs.vue +25 -0
- package/app/app/pages/[...slug].vue +112 -0
- package/app/app/pages/index.vue +37 -0
- package/app/content.config.ts +31 -0
- package/app/nuxt.config.ts +29 -0
- package/app/nuxt.schema.ts +255 -0
- package/app/server/routes/raw/[...slug].md.get.ts +24 -0
- package/dist/main.mjs +238 -0
- package/package.json +59 -58
- package/dist/create-docus/create-docus.js +0 -7
- package/dist/create-docus/helpers.js +0 -244
- package/dist/create-docus/index.js +0 -87
- package/dist/index.js +0 -10
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createDocus = createDocus;
|
|
7
|
-
|
|
8
|
-
var _path = require("path");
|
|
9
|
-
|
|
10
|
-
var _prompts = _interopRequireDefault(require("prompts"));
|
|
11
|
-
|
|
12
|
-
var _execa = _interopRequireDefault(require("execa"));
|
|
13
|
-
|
|
14
|
-
var _helpers = require("./helpers");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
const {
|
|
19
|
-
motd,
|
|
20
|
-
primary,
|
|
21
|
-
secondary,
|
|
22
|
-
warning,
|
|
23
|
-
bold,
|
|
24
|
-
space,
|
|
25
|
-
broadcast
|
|
26
|
-
} = _helpers.log;
|
|
27
|
-
|
|
28
|
-
async function createDocus() {
|
|
29
|
-
motd();
|
|
30
|
-
const projectType = (0, _helpers.getProjectType)();
|
|
31
|
-
const targetDir = await (0, _helpers.getTargetDir)(projectType);
|
|
32
|
-
const packageName = await (0, _helpers.getValidPackageName)(targetDir);
|
|
33
|
-
const projectPath = await (0, _helpers.createDir)(targetDir);
|
|
34
|
-
const templateDir = await (0, _helpers.getTemplate)(projectType);
|
|
35
|
-
(0, _helpers.createProject)(projectPath, templateDir, packageName);
|
|
36
|
-
broadcast(primary("Done."));
|
|
37
|
-
space();
|
|
38
|
-
const {
|
|
39
|
-
yes
|
|
40
|
-
} = await (0, _prompts.default)({
|
|
41
|
-
type: "confirm",
|
|
42
|
-
name: "yes",
|
|
43
|
-
initial: "Y",
|
|
44
|
-
message: "Install and start it now?"
|
|
45
|
-
});
|
|
46
|
-
if (yes) await startProject(projectPath);else startItLater(projectPath);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async function startProject(projectPath) {
|
|
50
|
-
space();
|
|
51
|
-
const {
|
|
52
|
-
agent
|
|
53
|
-
} = await (0, _prompts.default)({
|
|
54
|
-
name: "agent",
|
|
55
|
-
type: "select",
|
|
56
|
-
message: "Choose the agent",
|
|
57
|
-
choices: ["yarn", "npm", "pnpm"].map(i => ({
|
|
58
|
-
value: i,
|
|
59
|
-
title: i
|
|
60
|
-
}))
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
if (!agent) {
|
|
64
|
-
space();
|
|
65
|
-
broadcast(warning(`You cancelled the agent selection!`));
|
|
66
|
-
return startItLater(projectPath);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
await (0, _execa.default)(agent, ["install"], {
|
|
70
|
-
stdio: "inherit",
|
|
71
|
-
cwd: projectPath
|
|
72
|
-
});
|
|
73
|
-
await (0, _execa.default)(agent, ["run", "dev"], {
|
|
74
|
-
stdio: "inherit",
|
|
75
|
-
cwd: projectPath
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function startItLater(projectPath) {
|
|
80
|
-
space();
|
|
81
|
-
broadcast(secondary("Start it later with:"));
|
|
82
|
-
space();
|
|
83
|
-
const dir = (0, _path.relative)(_helpers.cwd, projectPath);
|
|
84
|
-
if (projectPath !== _helpers.cwd) broadcast(primary(`cd ${bold(dir)}`));
|
|
85
|
-
broadcast(primary(`${_helpers.pkgManager === "yarn" ? "yarn" : `${_helpers.pkgManager} install`}`));
|
|
86
|
-
broadcast(primary(`${_helpers.pkgManager === "yarn" ? "yarn dev" : `${_helpers.pkgManager} run dev`}`));
|
|
87
|
-
}
|