diff --git a/build.ts b/build.ts index 5df2d4d..93612f1 100644 --- a/build.ts +++ b/build.ts @@ -1,4 +1,5 @@ import { log } from '@stacksjs/cli' +import { fs } from '@stacksjs/storage' import { generateDeclarationsFromFiles } from './src/generate' log.info('Building...') @@ -18,4 +19,10 @@ catch (error) { console.error('Error generating declarations:', error) } +// prepare dist for publishing +await fs.move('./dist/bin/cli.js', './dist/cli.js') +await fs.move('./dist/src/index.js', './dist/index.js') +await fs.remove('./dist/src') +await fs.remove('./dist/bin') + log.success('Built') diff --git a/bun.lockb b/bun.lockb index a4a2aea..23ad1ee 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 44dbccc..9c62df7 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ "docs:preview": "vitepress preview docs" }, "devDependencies": { - "@stacksjs/cli": "^0.65.0", - "@stacksjs/development": "^0.65.0", + "@stacksjs/cli": "^0.67.0", + "@stacksjs/development": "^0.67.0", "@stacksjs/eslint-config": "^3.8.1-beta.2", "@types/bun": "^1.1.11", "c12": "^2.0.1", diff --git a/src/utils.ts b/src/utils.ts index 2868a83..c18a6e4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -29,6 +29,8 @@ export async function checkIsolatedDeclarations(options?: DtsGenerationConfig): return tsconfig.compilerOptions?.isolatedDeclarations === true } catch (error) { + // eslint-disable-next-line no-console + console.log('Error reading tsconfig.json:', error) return false } }