@tamagui/build 1.0.13 → 1.0.15
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 +18 -25
package/package.json
CHANGED
package/tamagui-build.js
CHANGED
|
@@ -118,33 +118,26 @@ async function buildTsc() {
|
|
|
118
118
|
return
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
throw new Error(`No tsconfig.json found`)
|
|
124
|
-
}
|
|
125
|
-
const targetDir = 'types'
|
|
126
|
-
try {
|
|
127
|
-
// typescripts build cache messes up when doing declarationOnly
|
|
128
|
-
await fs.remove('tsconfig.tsbuildinfo')
|
|
129
|
-
await fs.ensureDir(targetDir)
|
|
130
|
-
const cmd = `tsc --baseUrl . --outDir ${targetDir} --rootDir src --emitDeclarationOnly --declarationMap`
|
|
131
|
-
// console.log('\x1b[2m$', `npx ${cmd}`)
|
|
132
|
-
await exec('npx', cmd.split(' '))
|
|
133
|
-
} finally {
|
|
134
|
-
await fs.remove('tsconfig.tsbuildinfo')
|
|
135
|
-
}
|
|
121
|
+
if (!(await fs.pathExists(`tsconfig.json`))) {
|
|
122
|
+
throw new Error(`No tsconfig.json found`)
|
|
136
123
|
}
|
|
137
124
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
125
|
+
const targetDir = 'types'
|
|
126
|
+
try {
|
|
127
|
+
// typescripts build cache messes up when doing declarationOnly
|
|
128
|
+
await fs.remove('tsconfig.tsbuildinfo')
|
|
129
|
+
await fs.ensureDir(targetDir)
|
|
130
|
+
const cmd = `tsc --baseUrl . --outDir ${targetDir} --rootDir src --emitDeclarationOnly --declarationMap`
|
|
131
|
+
// console.log('\x1b[2m$', `npx ${cmd}`)
|
|
132
|
+
await exec('npx', cmd.split(' '))
|
|
133
|
+
} catch (err) {
|
|
134
|
+
console.log(err.message)
|
|
135
|
+
if (!shouldWatch) {
|
|
136
|
+
process.exit(1)
|
|
137
|
+
}
|
|
138
|
+
} finally {
|
|
139
|
+
await fs.remove('tsconfig.tsbuildinfo')
|
|
140
|
+
}
|
|
148
141
|
}
|
|
149
142
|
|
|
150
143
|
async function buildJs() {
|