fragmented 2.0.40 → 2.0.42

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.
package/README.md CHANGED
@@ -22,6 +22,24 @@ You can also clone the repository with [Git](https://git-scm.com/)...
22
22
 
23
23
  You will need to do this if you want to look at the example.
24
24
 
25
+ ## Example
26
+
27
+ There is a small development server that can be run from within the project's directory with the following command:
28
+
29
+ npm start
30
+
31
+ The example will then be available at the following URL:
32
+
33
+ http://localhost:8888
34
+
35
+ The source for the example can be found in the `src/example.js` file and corresponding `src/example` folder. You are encouraged to try the example whilst reading what follows. You can rebuild it on the fly with the following command:
36
+
37
+ npm run watch-debug
38
+
39
+ The development server will reload the page whenever you make changes.
40
+
41
+ One last thing to bear in mind is that this package is included by way of a relative rather than a package import. If you are importing it into your own application, however, you should use the standard package import.
42
+
25
43
  ## Usage
26
44
 
27
45
  There are no objects exported as such, you only need to import the package:
@@ -68,10 +86,6 @@ Also note that the `fragment` variable is an instance of the `String` object, ra
68
86
 
69
87
  Finally, if you do not like the thought of a global `fragment` variable, you can of course refer to it as `window.fragment`.
70
88
 
71
- ## Example
72
-
73
- Launch the `example.html` file in the project's root directory.
74
-
75
89
  ## Building
76
90
 
77
91
  Automation is thanks to [npm scripts](https://docs.npmjs.com/misc/scripts), have a look at the `package.json` file. The pertinent commands are:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fragmented",
3
3
  "author": "James Smith",
4
- "version": "2.0.40",
4
+ "version": "2.0.42",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/fragmented",
7
7
  "description": "Relates to URL hash fragments.",
@@ -14,7 +14,7 @@
14
14
  "@swc/core": "^1.2.160",
15
15
  "esbuild": "^0.9.6",
16
16
  "express": "^4.17.1",
17
- "lively-cli": "^2.0.34",
17
+ "lively-cli": "^2.0.46",
18
18
  "watchful-cli": "^1.7.39"
19
19
  },
20
20
  "scripts": {
package/src/example.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import "./fragmented";
3
+ import "./index"; ///
4
4
 
5
5
  const { onFragmentChange, offFragmentChange } = fragment;
6
6