@launchframe/cli 0.1.6 → 0.1.7
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/package.json +1 -1
- package/src/commands/init.js +15 -1
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -26,7 +26,21 @@ function isDevMode() {
|
|
|
26
26
|
|
|
27
27
|
// Check if running from node_modules (production) or local directory (dev)
|
|
28
28
|
const scriptPath = __dirname;
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
// Check multiple indicators that we're in production:
|
|
31
|
+
// 1. Running from node_modules
|
|
32
|
+
// 2. Running from npm cache (_npx or .npm)
|
|
33
|
+
// 3. Package name in path
|
|
34
|
+
const isInNodeModules = scriptPath.includes('node_modules');
|
|
35
|
+
const isInNpmCache = scriptPath.includes('_npx') || scriptPath.includes('.npm');
|
|
36
|
+
const isInPackage = scriptPath.includes('@launchframe');
|
|
37
|
+
|
|
38
|
+
// If any production indicator is found, we're NOT in dev mode
|
|
39
|
+
if (isInNodeModules || isInNpmCache || isInPackage) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return true;
|
|
30
44
|
}
|
|
31
45
|
|
|
32
46
|
/**
|