@tamagui/build 1.11.2 → 1.12.0
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 +7 -3
package/package.json
CHANGED
package/tamagui-build.js
CHANGED
|
@@ -19,6 +19,7 @@ const shouldBundleNodeModules = !!process.argv.includes('--bundle-modules')
|
|
|
19
19
|
const shouldClean = !!process.argv.includes('clean')
|
|
20
20
|
const shouldCleanBuildOnly = !!process.argv.includes('clean:build')
|
|
21
21
|
const shouldWatch = process.argv.includes('--watch')
|
|
22
|
+
const declarationToRoot = !!process.argv.includes('--declaration-root')
|
|
22
23
|
|
|
23
24
|
const pkg = fs.readJSONSync('./package.json')
|
|
24
25
|
let shouldSkipInitialTypes = !!process.env.SKIP_TYPES_INITIAL
|
|
@@ -127,7 +128,10 @@ async function buildTsc() {
|
|
|
127
128
|
// typescripts build cache messes up when doing declarationOnly
|
|
128
129
|
await fs.remove('tsconfig.tsbuildinfo')
|
|
129
130
|
await fs.ensureDir(targetDir)
|
|
130
|
-
|
|
131
|
+
|
|
132
|
+
const declarationToRootFlag = declarationToRoot ? ' --declarationDir ./' : ''
|
|
133
|
+
const cmd = `tsc --baseUrl . --outDir ${targetDir} --rootDir src ${declarationToRootFlag}--emitDeclarationOnly --declarationMap`
|
|
134
|
+
|
|
131
135
|
// console.log('\x1b[2m$', `npx ${cmd}`)
|
|
132
136
|
await exec('npx', cmd.split(' '))
|
|
133
137
|
} catch (err) {
|
|
@@ -170,7 +174,7 @@ async function buildJs() {
|
|
|
170
174
|
platform: 'node',
|
|
171
175
|
})
|
|
172
176
|
: null,
|
|
173
|
-
|
|
177
|
+
pkgModule
|
|
174
178
|
? esbuildWriteIfChanged({
|
|
175
179
|
entryPoints: files,
|
|
176
180
|
outdir: flatOut ? 'dist' : 'dist/esm',
|
|
@@ -224,7 +228,7 @@ async function buildJs() {
|
|
|
224
228
|
platform: 'neutral',
|
|
225
229
|
})
|
|
226
230
|
: null,
|
|
227
|
-
|
|
231
|
+
pkgModuleJSX
|
|
228
232
|
? esbuildWriteIfChanged({
|
|
229
233
|
// only diff is jsx preserve and outdir
|
|
230
234
|
jsx: 'preserve',
|