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 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.4.9",
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.2",
408
- "resolved": "https://registry.npmjs.org/@mercuryworkshop/bare-mux/-/bare-mux-2.0.2.tgz",
409
- "integrity": "sha512-1rnqFfI29VXi3jrMbkotHV+NnafJ3tpTIuH3Ov/BtVAfZMNGcsCRr3dwEKRWc+mDb0tWdNWC0PnZghgfAlbr+A=="
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.6",
430
- "resolved": "https://registry.npmjs.org/@mercuryworkshop/libcurl-transport/-/libcurl-transport-1.3.6.tgz",
431
- "integrity": "sha512-K4/TSfHlkjuzY6j0XXFmIbG8m3tpMoTxLga46fhmeuX8k3EJR/FVbW8JTXOD34Iofu0vCZuuY8n/ywNCcB6XjA==",
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.10",
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.4",
717
- "resolved": "https://registry.npmjs.org/@titaniumnetwork-dev/ultraviolet/-/ultraviolet-3.2.4.tgz",
718
- "integrity": "sha512-vdYVDtk5n0bGOpcDFIUDyW/Nmlu7y5QToomed2Ewo1R9HwO6ewy3eTctpNKZJF0vv0XfGPrTWsozBU3rLX07Ng=="
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.4.9",
1171
- "resolved": "https://registry.npmjs.org/chemicaljs/-/chemicaljs-1.4.9.tgz",
1172
- "integrity": "sha512-1fTpJy+AE79XCM7MDrvwIeBSTozyGKkVexucETVWktVcWjbG7PSFS4UxD5W+R8fRE4qdb2Tzxsd/yQlJIUgj7g==",
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.2",
1174
+ "@mercuryworkshop/bare-mux": "^2.0.4",
1175
1175
  "@mercuryworkshop/epoxy-transport": "^2.1.3",
1176
- "@mercuryworkshop/libcurl-transport": "^1.3.6",
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.4",
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.10",
2208
- "resolved": "https://registry.npmjs.org/libcurl.js/-/libcurl.js-0.6.10.tgz",
2209
- "integrity": "sha512-GDyxCRi7+R7XFhcCRFAsNYxg3x91LiwiBISo+pWfUXfgO45J/9ZWcHqjKQg8/FbWHRkV1wwSCyPOZ8pLlbdivg=="
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",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "homepage": "https://github.com/chemicaljs/chemical#readme",
20
20
  "dependencies": {
21
- "chemicaljs": "^1.4.9",
21
+ "chemicaljs": "^1.5.0",
22
22
  "express": "^4.19.2"
23
23
  }
24
24
  }
@@ -0,0 +1,5 @@
1
+ # Chemical Example Build
2
+
3
+ Run `npm install` to install dependencies and then `npm start` to start.
4
+
5
+ Run `npm run build` to build chemical for static use.
@@ -0,0 +1,11 @@
1
+ import { ChemicalBuild } from "chemicaljs";
2
+
3
+ const build = new ChemicalBuild({
4
+ path: "dist",
5
+ default: "uv",
6
+ uv: true,
7
+ scramjet: true,
8
+ rammerhead: false,
9
+ });
10
+
11
+ await build.write(true);
@@ -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
+ });