@tamagui/build 1.0.1-beta.21 → 1.0.1-beta.25

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.
@@ -1 +1 @@
1
- @tamagui/build:build: cache hit, replaying output f080f7f6d7747555
1
+ @tamagui/build:build: cache hit, replaying output 65b373e9d01221e0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.0.1-beta.21",
3
+ "version": "1.0.1-beta.25",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  "fast-glob": "^3.2.7",
19
19
  "fs-extra": "^9.1.0",
20
20
  "json5": "^2.2.0",
21
+ "lodash.debounce": "^4.0.8",
21
22
  "typescript": "^4.5.2"
22
23
  },
23
24
  "devDependencies": {
package/tamagui-build.js CHANGED
@@ -6,6 +6,7 @@ const json5 = require('json5')
6
6
  const esbuild = require('esbuild')
7
7
  const fg = require('fast-glob')
8
8
  const createExternalPlugin = require('./externalNodePlugin')
9
+ const debounce = require('lodash.debounce')
9
10
 
10
11
  const jsOnly = !!process.env.JS_ONLY
11
12
  const skipJS = !!(process.env.SKIP_JS || false)
@@ -175,9 +176,7 @@ if (shouldClean || shouldCleanBuildOnly) {
175
176
  process.env.IS_WATCHING = true
176
177
  process.env.DISABLE_AUTORUN = true
177
178
  build().then(() => {
178
- const finish = (_, path, stats) => {
179
- build()
180
- }
179
+ const rebuild = debounce(build, 100)
181
180
  const chokidar = require('chokidar')
182
181
  chokidar
183
182
  // prevent infinite loop but cause race condition if you just build directly
@@ -186,8 +185,8 @@ if (shouldClean || shouldCleanBuildOnly) {
186
185
  alwaysStat: true,
187
186
  ignoreInitial: true,
188
187
  })
189
- .on('change', finish)
190
- .on('add', finish)
188
+ .on('change', rebuild)
189
+ .on('add', rebuild)
191
190
  })
192
191
  } else {
193
192
  build()