bun_bun_bundle 0.11.0 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d45723ba4d7826f7a860af793c4acf6fbceda366e442f9b9858ec2c1f340e5ec
4
- data.tar.gz: 13a119627c68cd7009975c40e0caa22f91adc35797b74f7604c35237960a69c8
3
+ metadata.gz: e88344a8027274fd0bf210fd826b6a8eb4cd80b34e48db2cc886fdb9c011972a
4
+ data.tar.gz: 89491a62dde5fd360eb425beae246e86ff864aaab65bf6a36b8eea06206b2480
5
5
  SHA512:
6
- metadata.gz: 7e7f845bfaff50c0c3a3b18e5dfcac5900929d9d2f261b3931a5bbac47775629d77a834c9e581a6c0dbea04004cbfd4d7a561a7d013524a55a67837e5b3cf42a
7
- data.tar.gz: 3d17dbcfe26e03538d349bb2a8ba48ec5ecd52b203712ab0296ebaa4502485c7b4275e0a4cfd8764a1d8e6dd2cb56651430ed42ac05c621151d807439eb54e11
6
+ metadata.gz: 075a8083d7f4c3475baf35338945f2342165bcad6da5fc801f656be6fbef9f4448b6231d2b11abc720b4bb02974abeb0ea1dfa1c5db7bc4d50e705601b4f0b5b
7
+ data.tar.gz: 1b5efa9b78a883cb40d4d266534f93193bcb5d3c74095ccb2a8d2293da7a7cd922f727a60c6c9850478b64530456fcaa9bf3908ad45d05756ab94b7decfd0a69
@@ -279,9 +279,11 @@ export default {
279
279
  },
280
280
 
281
281
  async watch() {
282
+ const cssBase = ['css']
283
+ const jsBase = ['js', 'ts', 'jsx', 'tsx']
282
284
  const extras = this.config.watchExtensions || {}
283
- const cssExts = ['css', ...(extras.css || [])]
284
- const jsExts = ['js', 'ts', 'jsx', 'tsx', ...(extras.js || [])]
285
+ const cssExts = [...cssBase, ...(extras.css || [])]
286
+ const jsExts = [...jsBase, ...(extras.js || [])]
285
287
 
286
288
  const handler = (event, filename) => {
287
289
  if (!filename) return
@@ -309,12 +311,20 @@ export default {
309
311
  console.log(` ▸ ${normalizedFilename} changed`)
310
312
  ;(async () => {
311
313
  try {
312
- if (cssExts.includes(ext)) await this.buildCSS()
313
- else if (jsExts.includes(ext)) await this.buildJS()
314
- else if (base.includes('.')) await this.copyStaticAssets()
314
+ let kind = null
315
+ if (cssExts.includes(ext)) {
316
+ await this.buildCSS()
317
+ if (cssBase.includes(ext)) kind = 'css'
318
+ } else if (jsExts.includes(ext)) {
319
+ await this.buildJS()
320
+ if (jsBase.includes(ext)) kind = 'full'
321
+ } else if (base.includes('.')) {
322
+ await this.copyStaticAssets()
323
+ kind = 'full'
324
+ }
315
325
 
316
326
  await this.writeManifest()
317
- this.reload(ext === 'css' ? 'css' : 'full')
327
+ if (kind) this.reload(kind)
318
328
  } catch (err) {
319
329
  console.error(' ✖ Build error:', err.message)
320
330
  if (err.errors) for (const e of err.errors) console.error(e)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunBunBundle
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bun_bun_bundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wout Fierens