eyereasoner 2.3.14 → 2.4.1
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 +17 -1
- package/dist/eye.d.ts +1 -1
- package/dist/eye.js +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -175,7 +175,7 @@ There is a bundled version for each release - which can be found at the url:
|
|
|
175
175
|
<p align=center>
|
|
176
176
|
https://eyereasoner.github.io/eye-js/vMajor/vMinor/vPatch/index.js
|
|
177
177
|
|
|
178
|
-
for instance v2.3.
|
|
178
|
+
for instance v2.3.14 has the url https://eyereasoner.github.io/eye-js/2/3/14/index.js. We also have shortcuts for:
|
|
179
179
|
- the latest version https://eyereasoner.github.io/eye-js/latest/index.js,
|
|
180
180
|
- the latest of each major version https://eyereasoner.github.io/eye-js/vMajor/latest/index.js, and
|
|
181
181
|
- the latest of each minor version https://eyereasoner.github.io/eye-js/vMajor/vMinor/latest/index.js
|
|
@@ -186,6 +186,22 @@ Github also serves these files with a `gzip` content encoding which compresses t
|
|
|
186
186
|
|
|
187
187
|

|
|
188
188
|
|
|
189
|
+
### Dynamic imports
|
|
190
|
+
|
|
191
|
+
We also distribute bundles that can be dynamically imported on github pages; for example
|
|
192
|
+
```ts
|
|
193
|
+
const { eyereasoner } = await import('https://eyereasoner.github.io/eye-js/2/latest/dynamic-import.js');
|
|
194
|
+
|
|
195
|
+
// Instantiate a new SWIPL module and log any results it produces to the console
|
|
196
|
+
const Module = await eyereasoner.SwiplEye({ print: (str: string) => { console.log(str) }, arguments: ['-q'] });
|
|
197
|
+
|
|
198
|
+
// Load the the strings data and query as files data.n3 and query.n3 into the module
|
|
199
|
+
Module.FS.writeFile('data.n3', data);
|
|
200
|
+
Module.FS.writeFile('query.n3', query);
|
|
201
|
+
|
|
202
|
+
// Execute main(['--nope', '--quiet', './data.n3', '--query', './query.n3']).
|
|
203
|
+
eyereasoner.queryOnce(Module, 'main', ['--nope', '--quiet', './data.n3', '--query', './query.n3']);
|
|
204
|
+
```
|
|
189
205
|
## Examples
|
|
190
206
|
|
|
191
207
|
We provide some examples of using `eyereasoner`:
|