bun_bun_bundle 0.5.2 → 0.6.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 +4 -4
- data/README.md +1 -0
- data/lib/bun/bun_bundle.js +6 -4
- data/lib/bun_bun_bundle/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bff7bd740b838f48ba037bb55c643d9acb9739e1fc2455403295ba2302157b58
|
|
4
|
+
data.tar.gz: 5a5f91ebf61b94f7ee2fe77cb9243db8259172a8b5d7650461763f800a8563e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a266d1e7f52c59eeb0ded668af5c10ee8f8924c55b0768cda805772a2211b4936d21ea5a3f804b4d2d2fdfd8422960d5c0e418b58ba4d4c0c04ae8b248310bb9
|
|
7
|
+
data.tar.gz: bd81cf02e502d776d05718877b30433d6c2700fbc8a26d6fac78db37f55f68433a6a1cfb4ef5cc47029786c180aaa2c0b6a521335d5009c43056ed1895d71304
|
data/README.md
CHANGED
|
@@ -200,6 +200,7 @@ Place a `config/bun.json` in your project root:
|
|
|
200
200
|
"outDir": "public/assets",
|
|
201
201
|
"publicPath": "/assets",
|
|
202
202
|
"manifestPath": "public/bun-manifest.json",
|
|
203
|
+
"watchDirs": ["app/assets"],
|
|
203
204
|
"staticDirs": ["app/assets/images", "app/assets/fonts"],
|
|
204
205
|
"devServer": {
|
|
205
206
|
"host": "127.0.0.1",
|
data/lib/bun/bun_bundle.js
CHANGED
|
@@ -45,6 +45,7 @@ export default {
|
|
|
45
45
|
const defaults = {
|
|
46
46
|
entryPoints: {js: ['app/assets/js/app.js'], css: ['app/assets/css/app.css']},
|
|
47
47
|
plugins: {css: ['aliases', 'cssGlobs'], js: ['aliases', 'jsGlobs']},
|
|
48
|
+
watchDirs: ['app/assets'],
|
|
48
49
|
staticDirs: ['app/assets/images', 'app/assets/fonts'],
|
|
49
50
|
outDir: 'public/assets',
|
|
50
51
|
publicPath: '/assets',
|
|
@@ -222,9 +223,7 @@ export default {
|
|
|
222
223
|
},
|
|
223
224
|
|
|
224
225
|
async watch() {
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
watch(srcDir, {recursive: true}, (event, filename) => {
|
|
226
|
+
const handler = (event, filename) => {
|
|
228
227
|
if (!filename) return
|
|
229
228
|
|
|
230
229
|
let normalizedFilename = filename.replace(/\\/g, '/')
|
|
@@ -259,7 +258,10 @@ export default {
|
|
|
259
258
|
if (err.errors) for (const e of err.errors) console.error(e)
|
|
260
259
|
}
|
|
261
260
|
})()
|
|
262
|
-
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
for (const dir of this.config.watchDirs)
|
|
264
|
+
watch(join(this.root, dir), {recursive: true}, handler)
|
|
263
265
|
|
|
264
266
|
console.log('Beginning to watch your project')
|
|
265
267
|
},
|