@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.
- package/index.js +10 -3
- 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
|
-
|
|
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
|
-
|
|
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');
|