Help using different libs: rdflibjs, tripledoc, ldflex, solid-file-client

For reference, here’s the cheatsheet mentioned.

I would certainly recommend a bundler, because it will remove code for you that is unused. However, I just published v2.4 of Tripledoc that also includes a browser bundle. Do note that you will also currently need to include rdflib in your page, which is used by Tripledoc. Here’s an example of how to run Tripledoc without a bundler. Update: Tripledoc v3 and above no longer use rdflib behind the scenes, but N3.js. Here’s an updated example of running Tripledoc without manually running a bundler.

The examples in the Cheatsheet for rdflib should work as well by just including a <script> tag pointing to rdflib, but you’ll need to change code like

import { graph } from "rdflib";

const store = graph();

to

const store = $rdf.graph();

Does that help?

3 Likes