@tamagui/build 1.30.27 → 1.30.29
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/tamagui-build.js +5 -4
package/package.json
CHANGED
package/tamagui-build.js
CHANGED
|
@@ -22,6 +22,9 @@ const shouldClean = !!process.argv.includes('clean')
|
|
|
22
22
|
const shouldCleanBuildOnly = !!process.argv.includes('clean:build')
|
|
23
23
|
const shouldWatch = process.argv.includes('--watch')
|
|
24
24
|
const declarationToRoot = !!process.argv.includes('--declaration-root')
|
|
25
|
+
const ignoreBaseUrl = process.argv.includes('--ignore-base-url')
|
|
26
|
+
const baseUrlIndex = process.argv.indexOf('--base-url')
|
|
27
|
+
const baseUrl = baseUrlIndex > -1 ? process.argv[baseUrlIndex] : '.'
|
|
25
28
|
|
|
26
29
|
const pkg = fs.readJSONSync('./package.json')
|
|
27
30
|
let shouldSkipInitialTypes = !!process.env.SKIP_TYPES_INITIAL
|
|
@@ -121,9 +124,6 @@ async function buildTsc() {
|
|
|
121
124
|
return
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
const config = getTsconfig()
|
|
125
|
-
const baseUrl = config.compilerOptions?.baseUrl || '.'
|
|
126
|
-
|
|
127
127
|
const targetDir = 'types'
|
|
128
128
|
try {
|
|
129
129
|
// typescripts build cache messes up when doing declarationOnly
|
|
@@ -131,7 +131,8 @@ async function buildTsc() {
|
|
|
131
131
|
await fs.ensureDir(targetDir)
|
|
132
132
|
|
|
133
133
|
const declarationToRootFlag = declarationToRoot ? ' --declarationDir ./' : ''
|
|
134
|
-
const
|
|
134
|
+
const baseUrlFlag = ignoreBaseUrl ? '' : `--baseUrl ${baseUrl}`
|
|
135
|
+
const cmd = `tsc ${baseUrlFlag} --outDir ${targetDir} --rootDir src ${declarationToRootFlag}--emitDeclarationOnly --declarationMap`
|
|
135
136
|
|
|
136
137
|
// console.log('\x1b[2m$', `npx ${cmd}`)
|
|
137
138
|
await exec('npx', cmd.split(' '))
|