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 +4 -4
- data/lib/bun/bun_bundle.js +16 -6
- data/lib/bun/plugins/aliases.js +1 -1
- data/lib/bun_bun_bundle/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c600790c95f2bacc7697a8d50cc9e74512a272709a8331efa6d6467656f6946
|
|
4
|
+
data.tar.gz: 434ce76cca79dc85965958b693a03e4f71761ec1c477c36430edff6e5346f188
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 879819d9d12864a9091fdbcf8c86a88aa09582c3d2b9388ea0e2b1040ba8fc1922b833e272e669fced5cc7c1720cbd38b88a7c663796a7d1fe20e2bb3143afe0
|
|
7
|
+
data.tar.gz: c70195c48956b37ce6c8af700f05015f065b90089aa21501ee0365f8a40d7677a9a97b0195605e1b86bc681528824ed79ddeaaaa9eff1f10fc91dbeab2b074b1
|
data/lib/bun/bun_bundle.js
CHANGED
|
@@ -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 = [
|
|
284
|
-
const jsExts = [
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
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(
|
|
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)
|
data/lib/bun/plugins/aliases.js
CHANGED
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.
|
|
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.
|
|
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: []
|