create-jant 0.1.3 → 0.1.4
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
CHANGED
|
@@ -8,6 +8,7 @@ import path from "path";
|
|
|
8
8
|
import { fileURLToPath } from "url";
|
|
9
9
|
var __filename = fileURLToPath(import.meta.url);
|
|
10
10
|
var __dirname = path.dirname(__filename);
|
|
11
|
+
var CORE_VERSION = "0.2.1";
|
|
11
12
|
var TEMPLATE_DIR = fs.existsSync(path.resolve(__dirname, "../template")) ? path.resolve(__dirname, "../template") : path.resolve(__dirname, "../../../templates/jant-site");
|
|
12
13
|
function isValidProjectName(name) {
|
|
13
14
|
return /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/.test(name);
|
|
@@ -51,7 +52,7 @@ async function copyTemplate(config) {
|
|
|
51
52
|
const pkg = await fs.readJson(pkgPath);
|
|
52
53
|
pkg.name = projectName;
|
|
53
54
|
if (pkg.dependencies?.["@jant/core"] === "workspace:*") {
|
|
54
|
-
pkg.dependencies["@jant/core"] =
|
|
55
|
+
pkg.dependencies["@jant/core"] = `^${CORE_VERSION}`;
|
|
55
56
|
}
|
|
56
57
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
57
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-jant",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Create a new Jant project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"build": "tsup src/index.ts --format esm --clean --outDir dist",
|
|
54
54
|
"dev": "tsup src/index.ts --format esm --watch",
|
|
55
55
|
"typecheck": "tsc --noEmit",
|
|
56
|
-
"copy-template": "rm -rf template && cp -r ../../templates/jant-site template"
|
|
56
|
+
"copy-template": "rm -rf template && cp -r ../../templates/jant-site template",
|
|
57
|
+
"inject-version": "node -e \"const fs=require('fs');const v=require('../core/package.json').version;const f='dist/index.js';fs.writeFileSync(f,fs.readFileSync(f,'utf8').replace('__JANT_CORE_VERSION__',v))\""
|
|
57
58
|
}
|
|
58
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jant/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A modern, open-source microblogging platform built on Cloudflare Workers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,13 +15,7 @@
|
|
|
15
15
|
"types": "./dist/theme/index.d.ts",
|
|
16
16
|
"default": "./dist/theme/index.js"
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
"types": "./dist/theme/*.d.ts",
|
|
20
|
-
"default": "./dist/theme/*.js"
|
|
21
|
-
},
|
|
22
|
-
"./dist/*": "./dist/*",
|
|
23
|
-
"./static/*": "./static/*",
|
|
24
|
-
"./migrations/*": "./migrations/*"
|
|
18
|
+
"./*": "./*"
|
|
25
19
|
},
|
|
26
20
|
"files": [
|
|
27
21
|
"bin",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["vite.config.ts"],"names":[],"mappings":";AAMA,wBAiFG"}
|