@ramme-io/create-app 1.3.18 → 1.3.19

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.
Files changed (2) hide show
  1. package/index.js +18 -17
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6,29 +6,26 @@ import { fileURLToPath } from 'url';
6
6
  const __filename = fileURLToPath(import.meta.url);
7
7
  const __dirname = path.dirname(__filename);
8
8
 
9
- const projectPath = process.argv[2];
10
- if (!projectPath) {
9
+ const projectName = process.argv[2];
10
+ if (!projectName) {
11
11
  console.error('Error: Please specify the project directory.');
12
+ console.log(' Usage: npx @ramme-io/create-app <project-name>');
12
13
  process.exit(1);
13
14
  }
14
15
 
15
16
  const templatePath = path.resolve(__dirname, 'template');
16
- const destinationPath = path.resolve(process.cwd(), projectPath);
17
+ const destinationPath = path.resolve(process.cwd(), projectName);
17
18
 
18
19
  // THE STABILITY PACT: Hardcoded target versions for the public release
19
20
  const RELEASE_VERSION = "^1.4.5";
20
21
 
21
22
  try {
22
- console.log(`šŸš€ Creating new Ramme app in: ${destinationPath}`);
23
+ console.log(`\nšŸš€ Creating new Ramme app in: ${destinationPath}`);
23
24
 
24
- // 1. Clean destination and copy template
25
- if (fs.existsSync(destinationPath)) {
26
- console.warn("āš ļø Directory exists. Overwriting...");
27
- }
25
+ // 1. Copy template
28
26
  fs.copySync(templatePath, destinationPath);
29
27
 
30
- // 2. Identify package.json
31
- // We check for both names to ensure we catch it regardless of NPM filters
28
+ // 2. Identify package.json (handle renamed source)
32
29
  let targetPkgPath = path.join(destinationPath, 'package.json');
33
30
  const fallbackPkgPath = path.join(destinationPath, 'pkg.json');
34
31
 
@@ -38,21 +35,18 @@ try {
38
35
 
39
36
  // 3. HARDEN SUPPLY CHAIN (Force Injection)
40
37
  if (fs.existsSync(targetPkgPath)) {
41
- console.log("šŸ› ļø Hardening Supply Chain...");
42
38
  const pkg = fs.readJsonSync(targetPkgPath);
43
39
 
44
- // Direct Overwrite - No logic, just results.
40
+ // Direct Overwrite
45
41
  pkg.dependencies["@ramme-io/kernel"] = RELEASE_VERSION;
46
42
  pkg.dependencies["@ramme-io/ui"] = RELEASE_VERSION;
47
43
 
48
- // Clean up any internal metadata
44
+ // Cleanup
49
45
  delete pkg.devDependencies["@ramme-io/kernel"];
50
46
  delete pkg.devDependencies["@ramme-io/ui"];
51
47
 
52
48
  fs.writeJsonSync(targetPkgPath, pkg, { spaces: 2 });
53
- console.log(`āœ… Pinned dependencies to: ${RELEASE_VERSION}`);
54
- } else {
55
- throw new Error("Critical Failure: package.json not found in template.");
49
+ console.log(`āœ… Hardened Supply Chain: Pinned to ${RELEASE_VERSION}`);
56
50
  }
57
51
 
58
52
  // 4. Handle Gitignore
@@ -61,7 +55,14 @@ try {
61
55
  fs.renameSync(gitignorePath, path.join(destinationPath, '.gitignore'));
62
56
  }
63
57
 
64
- console.log(`\n✨ Success! Standalone app generated.`);
58
+ // 5. ONBOARDING INSTRUCTIONS
59
+ console.log(`\n✨ Success! Your Ramme project is ready.`);
60
+ console.log(`\nNext steps:`);
61
+ console.log(` 1. cd ${projectName}`);
62
+ console.log(` 2. pnpm install`);
63
+ console.log(` 3. pnpm dev`);
64
+ console.log(`\nHappy building! šŸ› ļø\n`);
65
+
65
66
  } catch (err) {
66
67
  console.error('\nāŒ Critical Failure:', err.message);
67
68
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/create-app",
3
- "version": "1.3.18",
3
+ "version": "1.3.19",
4
4
  "description": "The official CLI to create Ramme applications.",
5
5
  "type": "module",
6
6
  "private": false,