mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Make nym work
This commit is contained in:
2 files changed
+12
-17
No files matched your search
+10
-12
@@ -32,11 +32,16 @@ async function bundle(
|
||||
);
|
||||
|
||||
// Read package.json
|
||||
const packageJsonText = await fs.readFile(
|
||||
`${projectPath}/package.json`,
|
||||
"utf8",
|
||||
);
|
||||
const packageJson = JSON.parse(packageJsonText);
|
||||
let packageJson;
|
||||
try {
|
||||
const packageJsonText = await fs.readFile(
|
||||
`${projectPath}/package.json`,
|
||||
"utf8",
|
||||
);
|
||||
packageJson = JSON.parse(packageJsonText);
|
||||
} catch {
|
||||
packageJson = {};
|
||||
}
|
||||
|
||||
// Try to read tsconfig.json
|
||||
let tsconfig;
|
||||
@@ -187,13 +192,6 @@ export async function buildProject(options: BuildProjectOptions): Promise<{
|
||||
}> {
|
||||
const { fs, projectPath, outputPath = `${projectPath}/dist` } = options;
|
||||
|
||||
// Check if we're in a valid project directory
|
||||
try {
|
||||
await fs.readFile(`${projectPath}/package.json`, "utf8");
|
||||
} catch {
|
||||
throw new Error(`❌ Could not find package.json at ${projectPath}. Make sure you're in a valid project directory.`);
|
||||
}
|
||||
|
||||
// Check if index.html exists
|
||||
try {
|
||||
await fs.readFile(`${projectPath}/index.html`, "utf8");
|
||||
|
||||
Reference in new issue
Block a user