Skip to content

Commit 3c80dc9

Browse files
authored
Merge pull request #343 from lutovich/1.6-cdn-support
Improve unpkg and jsDelivr support
2 parents 0238704 + 4234253 commit 3c80dc9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,22 @@ otherwise application shutdown might hang or it might exit with a non-zero exit
4040
## Include in web browser
4141

4242
We build a special browser version of the driver, which supports connecting to Neo4j over WebSockets.
43+
It can be included in an HTML page using one of the following tags:
4344

4445
```html
46+
<!-- Direct reference -->
4547
<script src="lib/browser/neo4j-web.min.js"></script>
48+
49+
<!-- unpkg CDN non-minified -->
50+
<script src="https://unpkg.com/neo4j-driver"></script>
51+
<!-- unpkg CDN minified for production use, version X.Y.Z -->
52+
<script src="https://unpkg.com/[email protected]/lib/browser/neo4j-web.min.js"></script>
53+
54+
<!-- jsDelivr CDN non-minified -->
55+
<script src="https://cdn.jsdelivr.net/npm/neo4j-driver"></script>
56+
<!-- jsDelivr CDN minified for production use, version X.Y.Z -->
57+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/browser/neo4j-web.min.js"></script>
58+
4659
```
4760

4861
This will make a global `neo4j` object available, where you can access the `v1` API at `neo4j.v1`:

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"browser": "gulp browser && gulp test-browser"
2222
},
2323
"main": "lib/index.js",
24-
"unpkg": "lib/browser/neo4j-web.min.js",
24+
"unpkg": "lib/browser/neo4j-web.js",
25+
"jsdelivr": "lib/browser/neo4j-web.js",
2526
"types": "types/index.d.ts",
2627
"devDependencies": {
2728
"async": "^2.4.0",

0 commit comments

Comments
 (0)