create-revojs 0.1.58 → 0.2.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/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
2
3
  import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
3
4
  import { basename, join, relative, resolve } from "node:path";
4
5
  import { fileURLToPath } from "node:url";
@@ -17,10 +18,19 @@ else {
17
18
  mkdirSync(directory, { recursive: true });
18
19
  cpSync(join(root, "template"), directory, { recursive: true });
19
20
  const manifest = JSON.parse(readFileSync(join(directory, "package.json"), "utf8"));
20
- const { version } = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
21
21
  manifest.name = name;
22
- manifest.dependencies.revojs = `^${version}`;
23
22
  writeFileSync(join(directory, "package.json"), `${JSON.stringify(manifest, null, 4)}\n`);
24
23
  console.log(`Created ${name} with revojs.`);
25
- console.log(`\n cd ${relative(process.cwd(), directory) || "."}\n npm install\n npx skills add tellua/revojs --skill revojs\n npm run dev`);
24
+ console.log("Installing the revojs skill...");
25
+ const command = "npx skills add tellua/revojs --skill revojs";
26
+ const result = spawnSync(command, {
27
+ cwd: directory,
28
+ stdio: "inherit",
29
+ shell: true,
30
+ });
31
+ if (result.error || result.status !== 0) {
32
+ console.error(`Skill installation failed. Run \`${command}\` in the project.`);
33
+ process.exitCode = 1;
34
+ }
35
+ console.log(`\n cd ${relative(process.cwd(), directory) || "."}\n npm install\n npm run dev`);
26
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-revojs",
3
- "version": "0.1.58",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,11 @@
1
+ # revojs app
2
+
3
+ This project is a revojs app. When asked to create an app or add a feature, build it here with revojs. Keep the existing `revojs` dependency and `vite.config.ts`; do not replace this starter with another framework.
4
+
5
+ Before coding, load the `revojs` skill and read the references for the modules the task needs. If the skill is missing, install it with `npx skills add tellua/revojs --skill revojs` and then load it.
6
+
7
+ Use npm packages, not framework source code: run `npm install` for this starter, check that each needed `@revojs/*` package is available with `npm view @revojs/<module> version`, and install it with `npm install @revojs/<module>`. Import only public package exports such as `@revojs/vue/module`, then register the module in `revojs({ modules: [...] })` in `vite.config.ts`. Install only modules the app needs; use revojs routing, server, storage, auth, and other infrastructure where provided.
8
+
9
+ Do not add Git submodules, `vendor/`, copied revojs source, Git dependencies, or local package links to obtain framework modules. If a required package is unavailable on npm, report the exact package and registry error and stop that integration; do not silently substitute another implementation.
10
+
11
+ Run `npm run build` and `npm run typecheck` after changes.
@@ -8,7 +8,7 @@
8
8
  "typecheck": "tsc --noEmit"
9
9
  },
10
10
  "dependencies": {
11
- "revojs": "^0.1.58"
11
+ "revojs": "^0.2.0"
12
12
  },
13
13
  "devDependencies": {
14
14
  "typescript": "^7.0.2",