bun_bun_bundle 0.11.0 → 0.12.1

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: 7c600790c95f2bacc7697a8d50cc9e74512a272709a8331efa6d6467656f6946
4
+ data.tar.gz: 434ce76cca79dc85965958b693a03e4f71761ec1c477c36430edff6e5346f188
5
5
  SHA512:
6
- metadata.gz: 7e7f845bfaff50c0c3a3b18e5dfcac5900929d9d2f261b3931a5bbac47775629d77a834c9e581a6c0dbea04004cbfd4d7a561a7d013524a55a67837e5b3cf42a
7
- data.tar.gz: 3d17dbcfe26e03538d349bb2a8ba48ec5ecd52b203712ab0296ebaa4502485c7b4275e0a4cfd8764a1d8e6dd2cb56651430ed42ac05c621151d807439eb54e11
6
+ metadata.gz: 879819d9d12864a9091fdbcf8c86a88aa09582c3d2b9388ea0e2b1040ba8fc1922b833e272e669fced5cc7c1720cbd38b88a7c663796a7d1fe20e2bb3143afe0
7
+ data.tar.gz: c70195c48956b37ce6c8af700f05015f065b90089aa21501ee0365f8a40d7677a9a97b0195605e1b86bc681528824ed79ddeaaaa9eff1f10fc91dbeab2b074b1
@@ -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,4 +1,4 @@
1
- const CSS_REGEX = /((?:url\(\s*|@import\s+)['"]?(?:glob:)?)\$\//g
1
+ const CSS_REGEX = /((?:url\(\s*|@import\s+|not\s+)['"]?(?:glob:)?)\$\//g
2
2
  const JS_REGEX =
3
3
  /((?:from\s+|require\s*\(\s*|import\s*\(\s*)['"](?:glob:)?)\$\//g
4
4
 
@@ -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.1'
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wout Fierens
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 4.0.9
76
+ rubygems_version: 4.0.6
77
77
  specification_version: 4
78
78
  summary: A self-contained asset bundler powered by Bun
79
79
  test_files: []