@tamagui/build 1.0.1-beta.135 → 1.0.1-beta.136
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 +9 -7
package/package.json
CHANGED
package/tamagui-build.js
CHANGED
|
@@ -96,13 +96,15 @@ async function buildTsc() {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
async function buildThenCopy() {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
if (!(await fs.pathExists(`tsconfig.json`))) {
|
|
100
|
+
throw new Error(`No tsconfig.json found`)
|
|
101
|
+
}
|
|
102
|
+
// nest it one extra so permissions of .tsbuildinfo thats written to parent folder arent off
|
|
103
|
+
const targetDir = join(tmpdir(), `tamagui-${Math.random() * 100000000}`.replace('.', ''), 'out')
|
|
104
|
+
await fs.ensureDir(targetDir)
|
|
105
|
+
const cmd = `tsc --baseUrl . --outDir ${targetDir} --rootDir src --declaration --emitDeclarationOnly --declarationMap`
|
|
106
|
+
// console.log('\x1b[2m$', `npx ${cmd}`)
|
|
107
|
+
await exec('npx', cmd.split(' '))
|
|
106
108
|
await fs.remove('types')
|
|
107
109
|
await fs.copy(targetDir, 'types')
|
|
108
110
|
}
|