bun_bun_bundle 0.17.0 → 0.17.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 +18 -3
- 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: c387e6ad8916429ab55c3c5d40d242e38e07ec119c18a67ef2a26e822c838930
|
|
4
|
+
data.tar.gz: '0378dea82862a785be22673192f81fbb418df6c1b6316e09699ff1f4b7238e48'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7bd880d07c868b9a6ae9f7583d478c620937e17f8e1cb4739af7b166e9d21f4980ef735703182991f72806ae68044d78e0f5c7813b34af4b4a1ef7c90d4ac16d
|
|
7
|
+
data.tar.gz: c6e6731f9bd81ba9b4acc2396fa530c2f9e527569c4e7129a9aa4e70967936b8bc5aa9bebfc50587f1742b304a369feb9b282c887376ec710c24693ce34b92a1
|
data/lib/bun/bun_bundle.js
CHANGED
|
@@ -85,7 +85,10 @@ export default {
|
|
|
85
85
|
parseSriFlag(argv) {
|
|
86
86
|
const value = this.findValueFlag(argv, 'sri', 'sha384')
|
|
87
87
|
if (value === null) return {}
|
|
88
|
-
const algos = value
|
|
88
|
+
const algos = value
|
|
89
|
+
.split(',')
|
|
90
|
+
.map(a => a.trim())
|
|
91
|
+
.filter(Boolean)
|
|
89
92
|
const valid = algos.filter(a => this.SRI_ALGORITHMS.includes(a))
|
|
90
93
|
const invalid = algos.filter(a => !this.SRI_ALGORITHMS.includes(a))
|
|
91
94
|
if (invalid.length) {
|
|
@@ -237,6 +240,14 @@ export default {
|
|
|
237
240
|
`${type}/${fileName}`,
|
|
238
241
|
content
|
|
239
242
|
)
|
|
243
|
+
|
|
244
|
+
// Write extra outputs (CSS url() assets above Bun's 128KiB inline limit)
|
|
245
|
+
for (const output of result.outputs) {
|
|
246
|
+
if (output === mainOutput || output === mapOutput) continue
|
|
247
|
+
const dest = join(outDir, output.path)
|
|
248
|
+
mkdirSync(dirname(dest), {recursive: true})
|
|
249
|
+
await Bun.write(dest, output)
|
|
250
|
+
}
|
|
240
251
|
}
|
|
241
252
|
},
|
|
242
253
|
|
|
@@ -306,7 +317,9 @@ export default {
|
|
|
306
317
|
await this.buildCSS()
|
|
307
318
|
await this.writeManifest()
|
|
308
319
|
const ms = Math.round(performance.now() - start)
|
|
309
|
-
const status = this.ok
|
|
320
|
+
const status = this.ok
|
|
321
|
+
? 'DONE Built successfully'
|
|
322
|
+
: ' ✖ Built with errors'
|
|
310
323
|
console.log(`${status} in ${ms} ms`, this.prettyManifest())
|
|
311
324
|
return this.ok
|
|
312
325
|
},
|
|
@@ -390,7 +403,9 @@ export default {
|
|
|
390
403
|
|
|
391
404
|
for (const pattern of this.config.watchDirs) {
|
|
392
405
|
const dirs = pattern.includes('*')
|
|
393
|
-
? await Array.fromAsync(
|
|
406
|
+
? await Array.fromAsync(
|
|
407
|
+
new Glob(pattern).scan({cwd: this.root, onlyFiles: false})
|
|
408
|
+
)
|
|
394
409
|
: [pattern]
|
|
395
410
|
for (const dir of dirs) {
|
|
396
411
|
const fullDir = join(this.root, dir)
|
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.17.
|
|
4
|
+
version: 0.17.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.20
|
|
77
77
|
specification_version: 4
|
|
78
78
|
summary: A self-contained asset bundler powered by Bun
|
|
79
79
|
test_files: []
|