@ramme-io/create-app 3.3.0 → 3.3.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.
Files changed (2) hide show
  1. package/index.js +10 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -29,7 +29,8 @@ if (!projectName || !TEMPLATES[templateName]) {
29
29
  else console.error('āŒ Error: Please specify the project directory.');
30
30
  console.log('\nšŸ“– Usage:');
31
31
  console.log(' npm create @ramme-io/app@latest <project-name>');
32
- console.log(' npm create @ramme-io/app@latest <project-name> --template device\n');
32
+ // The `--` is npm's: without it npm keeps `--template` for itself.
33
+ console.log(' npm create @ramme-io/app@latest <project-name> -- --template device\n');
33
34
  process.exit(1);
34
35
  }
35
36
 
@@ -73,8 +74,14 @@ const RELEASE_VERSIONS = {
73
74
  try {
74
75
  console.log(`\nšŸš€ Creating new Ramme app in: ${destinationPath}`);
75
76
 
76
- // 1. Copy template
77
- fs.copySync(templatePath, destinationPath);
77
+ // 1. Copy template — never what running it left behind. Inside the monorepo a
78
+ // template has its own node_modules, and the device server writes data.json,
79
+ // which holds that server's token; package.json's `files` keeps both out of
80
+ // the npm tarball, and this keeps them out of a copy made from a checkout.
81
+ const LEFT_BEHIND = /^(node_modules|data\.json(\.tmp)?)$/;
82
+ fs.copySync(templatePath, destinationPath, {
83
+ filter: src => !LEFT_BEHIND.test(path.basename(src)),
84
+ });
78
85
 
79
86
  // 2. Identify package.json (handle renamed source)
80
87
  let targetPkgPath = path.join(destinationPath, 'package.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/create-app",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "The official CLI to create Ramme applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",