create-ardo 2.0.0 → 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/dist/index.js +6 -0
- package/package.json +1 -1
- package/templates/minimal/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12,6 +12,11 @@ import path from "path";
|
|
|
12
12
|
import { fileURLToPath } from "url";
|
|
13
13
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
14
14
|
var templatesRoot = path.resolve(__dirname, "..", "templates");
|
|
15
|
+
var packageJsonPath = path.resolve(__dirname, "..", "package.json");
|
|
16
|
+
function getCliVersion() {
|
|
17
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
18
|
+
return pkg.version;
|
|
19
|
+
}
|
|
15
20
|
var templates = [
|
|
16
21
|
{
|
|
17
22
|
name: "minimal",
|
|
@@ -24,6 +29,7 @@ function createProjectStructure(root, template, options) {
|
|
|
24
29
|
const vars = {
|
|
25
30
|
SITE_TITLE: options.siteTitle,
|
|
26
31
|
PROJECT_NAME: options.projectName,
|
|
32
|
+
ARDO_VERSION: getCliVersion(),
|
|
27
33
|
TYPEDOC_CONFIG: options.typedoc ? "typedoc: true," : "// typedoc: true, // Uncomment to enable API docs",
|
|
28
34
|
GITHUB_PAGES_CONFIG: options.githubPages ? "// GitHub Pages: base path auto-detected from git remote" : "githubPages: false, // Disabled for non-GitHub Pages deployment"
|
|
29
35
|
};
|
package/package.json
CHANGED