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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abea1141b149da530439b191dda1330c09bd9fe4cf59ff8d13d03fb9c507e8d0
4
- data.tar.gz: a52ee15896ef53643cc62ba368e200bd76306fda27a7379509bbfe52e368998e
3
+ metadata.gz: bff7bd740b838f48ba037bb55c643d9acb9739e1fc2455403295ba2302157b58
4
+ data.tar.gz: 5a5f91ebf61b94f7ee2fe77cb9243db8259172a8b5d7650461763f800a8563e7
5
5
  SHA512:
6
- metadata.gz: 9309ab82def987376ff3ac02cb3c7bc2f21605fc2475afd5f521a69338aef17d00eb18a93e11165e68dc2965094ae04030aad5f022cdd0126cf2279056963731
7
- data.tar.gz: 9f4aa14608e0d6c1c7a56b15eedc97e6fa5a24b3f1745626c988acf11c5d2f986b5cdbb7e28c5fb1b8b965480d509b929abff4f1563eb95677c285e41b9e6f7b
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",
@@ -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 srcDir = join(this.root, this.config.watchDir || 'app/assets')
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
  },
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunBunBundle
4
- VERSION = '0.5.2'
4
+ VERSION = '0.6.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.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wout Fierens