Skip to content

Commit

Permalink
pre runts
Browse files Browse the repository at this point in the history
  • Loading branch information
r1tsuu committed Dec 28, 2024
1 parent dce8a37 commit 8771661
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"reinstall": "pnpm clean:all && pnpm install",
"release": "pnpm runts ./scripts/release.ts --tag latest",
"release:beta": "pnpm runts ./scripts/release.ts --bump prerelease --tag beta",
"runts": "cross-env NODE_OPTIONS=--no-deprecation node --no-deprecation --import @swc-node/register/esm-register",
"runts": "node ./scripts/ensure-generated-tsconfig.js && cross-env NODE_OPTIONS=--no-deprecation node --no-deprecation --import @swc-node/register/esm-register",
"script:gen-templates": "pnpm runts ./scripts/generate-template-variations.ts",
"script:list-published": "pnpm runts scripts/lib/getPackageRegistryVersions.ts",
"script:pack": "pnpm runts scripts/pack-all-to-dest.ts",
Expand Down
14 changes: 14 additions & 0 deletions scripts/ensure-generated-tsconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import path from 'path'
import { fileURLToPath } from 'url'
import { existsSync, writeFileSync, readFileSync } from 'fs'

const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)

const tsConfigBasePath = path.resolve(dirname, '../tsconfig.base.json')
const tsconfigGeneratedPath = path.resolve(dirname, '../tsconfig.generated.json')

if (!existsSync(tsconfigGeneratedPath)) {
const tsConfigContent = readFileSync(tsConfigBasePath, 'utf8')
writeFileSync(tsconfigGeneratedPath, tsConfigContent, 'utf-8')
}
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"compilerOptions": {
"composite": false,
"noEmit": true,
"baseUrl": ".",

"baseUrl": "."
},
"references": [
{
Expand Down Expand Up @@ -76,6 +75,8 @@
],
"include": [
"${configDir}/src",
".next/types/**/*.ts"
".next/types/**/*.ts",
"scripts/**/*.ts",
"scripts/**/*.js",
]
}

0 comments on commit 8771661

Please sign in to comment.