chemicaljs 1.5.0 → 1.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.
- package/README.md +48 -0
- package/examples/example/package-lock.json +20 -20
- package/examples/example/package.json +1 -1
- package/examples/example build/README.md +5 -0
- package/examples/example build/build.js +11 -0
- package/examples/example build/index.js +16 -0
- package/examples/example build/package-lock.json +3893 -0
- package/examples/example build/package.json +25 -0
- package/examples/example build/public/index.html +13 -0
- package/examples/example-components/package-lock.json +20 -20
- package/examples/example-components/package.json +1 -1
- package/examples/example-styled/package-lock.json +20 -20
- package/examples/example-styled/package.json +1 -1
- package/examples/example-vite/package-lock.json +24 -24
- package/examples/example-vite/package.json +2 -2
- package/index.js +91 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,9 @@ A example with all the components can be found in [`/example-components/`](https
|
|
|
11
11
|
|
|
12
12
|
A real world styled example can be found in [`/example-styled/`](https://github.com/chemicaljs/chemical/tree/main/examples/example-styled).
|
|
13
13
|
|
|
14
|
+
A example with a build command and an external wisp server can be found in [`/example-build/`](https://github.com/chemicaljs/chemical/tree/main/examples/example-build).
|
|
15
|
+
|
|
16
|
+
|
|
14
17
|
### Server
|
|
15
18
|
|
|
16
19
|
Create a new Node.js project and create a script file for the server.
|
|
@@ -73,6 +76,42 @@ chemical.server.listen(port, () => {
|
|
|
73
76
|
});
|
|
74
77
|
```
|
|
75
78
|
|
|
79
|
+
### Build
|
|
80
|
+
|
|
81
|
+
Want to use Chemical without using a custom wisp and/or rammerhead server or without a server at all?
|
|
82
|
+
|
|
83
|
+
Using the build command you can clone all needed assets into your build folder (like BareMux, Libcurl, and proxies enabled). Note that UV and Scramjet will need an external wisp server to function if you do not provide your own and Rammerhead will not work without your own Rammerhead server running.
|
|
84
|
+
|
|
85
|
+
1. Import `ChemicalBuild` and create a new build.
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
const build = new ChemicalBuild({
|
|
89
|
+
path: "dist",
|
|
90
|
+
default: "uv",
|
|
91
|
+
uv: true,
|
|
92
|
+
scramjet: true,
|
|
93
|
+
rammerhead: false,
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
2. Use `build.write()` to write into the build path.
|
|
98
|
+
|
|
99
|
+
3. Use `build.write(true)` to first empty the build path.
|
|
100
|
+
|
|
101
|
+
Below if a full example of building Chemical.
|
|
102
|
+
|
|
103
|
+
```js
|
|
104
|
+
const build = new ChemicalBuild({
|
|
105
|
+
path: "dist",
|
|
106
|
+
default: "uv",
|
|
107
|
+
uv: true,
|
|
108
|
+
scramjet: true,
|
|
109
|
+
rammerhead: false,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
await build.write(true);
|
|
113
|
+
```
|
|
114
|
+
|
|
76
115
|
### Client
|
|
77
116
|
|
|
78
117
|
In your project create a folder to store your static assets. Create an index.html file which will be the homepage of your website.
|
|
@@ -250,5 +289,14 @@ Set the second parameter of `chemicalAction` to the `id` of the iframe.
|
|
|
250
289
|
<iframe controls="my-controls-2" id="my-iframe-2" is="chemical-iframe"></iframe>
|
|
251
290
|
```
|
|
252
291
|
|
|
292
|
+
## Future Additions
|
|
293
|
+
|
|
294
|
+
- Link chemical component
|
|
295
|
+
- Automatically add https:// if needed
|
|
296
|
+
- Search engine option for search
|
|
297
|
+
- Easy tab cloaking
|
|
298
|
+
- Easy about:blank
|
|
299
|
+
- Proxy switcher/searchengine switcher/cloak switcher
|
|
300
|
+
|
|
253
301
|
## License
|
|
254
302
|
Chemical Uses the MIT license.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"version": "1.0.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"chemicaljs": "^1.
|
|
12
|
+
"chemicaljs": "^1.5.0",
|
|
13
13
|
"express": "^4.19.2"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
@@ -404,9 +404,9 @@
|
|
|
404
404
|
"optional": true
|
|
405
405
|
},
|
|
406
406
|
"node_modules/@mercuryworkshop/bare-mux": {
|
|
407
|
-
"version": "2.0.
|
|
408
|
-
"resolved": "https://registry.npmjs.org/@mercuryworkshop/bare-mux/-/bare-mux-2.0.
|
|
409
|
-
"integrity": "sha512-
|
|
407
|
+
"version": "2.0.4",
|
|
408
|
+
"resolved": "https://registry.npmjs.org/@mercuryworkshop/bare-mux/-/bare-mux-2.0.4.tgz",
|
|
409
|
+
"integrity": "sha512-Y5jByKQ/5ZhyKd3adHUQ18nB+HOUpopxRXIJh6KHXEq4rkG2AazHyMm42dvtAxHvkKlHkLxR7/5oxKZSD6rE4A=="
|
|
410
410
|
},
|
|
411
411
|
"node_modules/@mercuryworkshop/epoxy-tls": {
|
|
412
412
|
"version": "2.0.6-1",
|
|
@@ -426,12 +426,12 @@
|
|
|
426
426
|
}
|
|
427
427
|
},
|
|
428
428
|
"node_modules/@mercuryworkshop/libcurl-transport": {
|
|
429
|
-
"version": "1.3.
|
|
430
|
-
"resolved": "https://registry.npmjs.org/@mercuryworkshop/libcurl-transport/-/libcurl-transport-1.3.
|
|
431
|
-
"integrity": "sha512-
|
|
429
|
+
"version": "1.3.7",
|
|
430
|
+
"resolved": "https://registry.npmjs.org/@mercuryworkshop/libcurl-transport/-/libcurl-transport-1.3.7.tgz",
|
|
431
|
+
"integrity": "sha512-Ef2BpZRPzkWaCf6FDv63uYyocz96sIwbScI2GrU/Oiu5Etyyq5bOo0mA6sHh8KCwioFSulvh61lO2MbfaEzH9g==",
|
|
432
432
|
"dependencies": {
|
|
433
433
|
"esbuild-plugin-umd-wrapper": "^2.0.0",
|
|
434
|
-
"libcurl.js": "^0.6.
|
|
434
|
+
"libcurl.js": "^0.6.11",
|
|
435
435
|
"rollup": "^4.12.0",
|
|
436
436
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
437
437
|
"rollup-plugin-typescript2": "^0.36.0"
|
|
@@ -713,9 +713,9 @@
|
|
|
713
713
|
]
|
|
714
714
|
},
|
|
715
715
|
"node_modules/@titaniumnetwork-dev/ultraviolet": {
|
|
716
|
-
"version": "3.2.
|
|
717
|
-
"resolved": "https://registry.npmjs.org/@titaniumnetwork-dev/ultraviolet/-/ultraviolet-3.2.
|
|
718
|
-
"integrity": "sha512-
|
|
716
|
+
"version": "3.2.6",
|
|
717
|
+
"resolved": "https://registry.npmjs.org/@titaniumnetwork-dev/ultraviolet/-/ultraviolet-3.2.6.tgz",
|
|
718
|
+
"integrity": "sha512-kMyUdXBWKIOjO/0sGlj/uTNjNK2/3dn+gnhlBTs/CB3EPUPD+DAKnH99yYqBs0R+YE0Hjm54pCyBHY7ztq6iOQ=="
|
|
719
719
|
},
|
|
720
720
|
"node_modules/@tootallnate/once": {
|
|
721
721
|
"version": "1.1.2",
|
|
@@ -1167,16 +1167,16 @@
|
|
|
1167
1167
|
}
|
|
1168
1168
|
},
|
|
1169
1169
|
"node_modules/chemicaljs": {
|
|
1170
|
-
"version": "1.
|
|
1171
|
-
"resolved": "https://registry.npmjs.org/chemicaljs/-/chemicaljs-1.
|
|
1172
|
-
"integrity": "sha512-
|
|
1170
|
+
"version": "1.5.0",
|
|
1171
|
+
"resolved": "https://registry.npmjs.org/chemicaljs/-/chemicaljs-1.5.0.tgz",
|
|
1172
|
+
"integrity": "sha512-kDNm1OZfKEVQgaUv2dANM75/9Eg3xKzkKQ1C7tZT745sHEMYmRhRP98uHpLpVsmtfvE0hULN1U97KifPuWDxTg==",
|
|
1173
1173
|
"dependencies": {
|
|
1174
|
-
"@mercuryworkshop/bare-mux": "^2.0.
|
|
1174
|
+
"@mercuryworkshop/bare-mux": "^2.0.4",
|
|
1175
1175
|
"@mercuryworkshop/epoxy-transport": "^2.1.3",
|
|
1176
|
-
"@mercuryworkshop/libcurl-transport": "^1.3.
|
|
1176
|
+
"@mercuryworkshop/libcurl-transport": "^1.3.7",
|
|
1177
1177
|
"@mercuryworkshop/scramjet": "^1.0.2",
|
|
1178
1178
|
"@mercuryworkshop/wisp-js": "^0.1.1",
|
|
1179
|
-
"@titaniumnetwork-dev/ultraviolet": "^3.2.
|
|
1179
|
+
"@titaniumnetwork-dev/ultraviolet": "^3.2.6",
|
|
1180
1180
|
"express": "^4.19.2",
|
|
1181
1181
|
"rammerhead": "https://github.com/chemicaljs/chemical/raw/main/rammerhead.tgz"
|
|
1182
1182
|
}
|
|
@@ -2204,9 +2204,9 @@
|
|
|
2204
2204
|
}
|
|
2205
2205
|
},
|
|
2206
2206
|
"node_modules/libcurl.js": {
|
|
2207
|
-
"version": "0.6.
|
|
2208
|
-
"resolved": "https://registry.npmjs.org/libcurl.js/-/libcurl.js-0.6.
|
|
2209
|
-
"integrity": "sha512-
|
|
2207
|
+
"version": "0.6.11",
|
|
2208
|
+
"resolved": "https://registry.npmjs.org/libcurl.js/-/libcurl.js-0.6.11.tgz",
|
|
2209
|
+
"integrity": "sha512-mCYCfjb5hnThNq0qzKPDUCRnHkDZENpCqGZ1flh4npu+zqWGun2/gsDmXCi+0J3TOsCDjmyMEt+W/eGNvqEHvQ=="
|
|
2210
2210
|
},
|
|
2211
2211
|
"node_modules/locate-path": {
|
|
2212
2212
|
"version": "5.0.0",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChemicalServer } from "chemicaljs";
|
|
2
|
+
import express from "express";
|
|
3
|
+
|
|
4
|
+
const chemical = new ChemicalServer({
|
|
5
|
+
rammerhead: false,
|
|
6
|
+
});
|
|
7
|
+
const port = process.env.PORT || 3000;
|
|
8
|
+
|
|
9
|
+
chemical.app.use(express.static("public", {
|
|
10
|
+
index: "index.html",
|
|
11
|
+
extensions: ["html"]
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
chemical.server.listen(port, () => {
|
|
15
|
+
console.log(`Chemical example build listening on port ${port}`);
|
|
16
|
+
});
|