@csedl/svelte-on-rails 10.0.1 → 10.0.3

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.
Files changed (2) hide show
  1. package/README.md +7 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -29,6 +29,13 @@ For configs you can do
29
29
  ```javascript
30
30
  import { SvelteOnRails } from '@csedl/svelte-on-rails'
31
31
  SvelteOnRails.debug = true
32
+
33
+ // source for svelte components for hydration
34
+ // by default svelte components are mapped by sourceCodeDir from vite.json
35
+ // which usually is app/frontend/**/*.svelte
36
+ SvelteOnRails.includeRailsViews = true
37
+ // when set to true, additionaly, app/views/**/*.svelte is mapped
38
+ // => this is a 2016 new introduced feature, status: experimental
32
39
  ```
33
40
 
34
41
  The `SvelteOnRails` Object is accessible by `window.SvelteOnRails`
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@csedl/svelte-on-rails",
3
- "version": "10.0.1",
3
+ "version": "10.0.3",
4
4
  "description": "Hydrates Svelte components from the svelte-on-rails gem and can handle Actions received by Web Socket.",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./index.js",
9
- "./src/componentStreamListener": "./src/componentStreamListener.js",
10
- "./src/dispatch-event": "./src/dispatch-event.js"
9
+ "./src/componentStreamListener": "./src/streams/componentStreamListener.js",
10
+ "./src/dispatch-event": "./src/streams/dispatch-event.js"
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@hotwired/stimulus": "^3.2.2",