@getdashi/cli 0.1.3 → 0.1.6
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.
|
@@ -53,7 +53,8 @@ export async function appCreate({ name, port }) {
|
|
|
53
53
|
const spin = spinner('Installing dependencies…');
|
|
54
54
|
spin.start();
|
|
55
55
|
try {
|
|
56
|
-
|
|
56
|
+
const installCmd = pm === 'yarn' ? `${pm} install --ignore-engines` : `${pm} install --engine-strict=false`;
|
|
57
|
+
execSync(installCmd, { cwd: targetDir, stdio: 'pipe' });
|
|
57
58
|
spin.succeed('Dependencies installed');
|
|
58
59
|
}
|
|
59
60
|
catch (err) {
|
|
@@ -27,7 +27,11 @@ export function servePreview(port) {
|
|
|
27
27
|
const distDir = join(__dirname, '..', '..', 'preview-dist');
|
|
28
28
|
const server = createServer((req, res) => {
|
|
29
29
|
const rawPath = req.url?.split('?')[0] ?? '/';
|
|
30
|
-
|
|
30
|
+
// The preview bundle is built with --base=/_preview/ for the platform, so
|
|
31
|
+
// asset URLs are prefixed with /_preview/. Strip that prefix when serving
|
|
32
|
+
// locally so files resolve to their actual location in preview-dist/.
|
|
33
|
+
const normalizedPath = rawPath.replace(/^\/_preview\//, '/');
|
|
34
|
+
const filePath = normalizedPath === '/' ? 'index.html' : normalizedPath.replace(/^\//, '');
|
|
31
35
|
const fullPath = join(distDir, filePath);
|
|
32
36
|
let exists = false;
|
|
33
37
|
try {
|
package/package.json
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@getdashi/cli": "latest",
|
|
23
|
-
"@eslint/js": "^9.
|
|
23
|
+
"@eslint/js": "^9.23.0",
|
|
24
24
|
"@tailwindcss/postcss": "^4.2.1",
|
|
25
25
|
"@types/node": "^20.11.19",
|
|
26
26
|
"@types/react": "^19.0.0",
|
|
27
27
|
"@types/react-dom": "^19.0.0",
|
|
28
|
-
"eslint": "^9.
|
|
28
|
+
"eslint": "^9.23.0",
|
|
29
29
|
"eslint-config-prettier": "^10.1.1",
|
|
30
30
|
"postcss": "^8.5.6",
|
|
31
31
|
"prettier": "^3.5.3",
|