Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation / help on how to use in the browser #75

Open
tfrancart opened this issue May 12, 2022 · 3 comments
Open

Documentation / help on how to use in the browser #75

tfrancart opened this issue May 12, 2022 · 3 comments

Comments

@tfrancart
Copy link

Is your feature request related to a problem? Please describe.

It's not related to a problem, but I would like documentation or examples on how to use sparql-engine + N3.js in the browser.

Describe the solution you'd like

A documentatio/example HTML page that demonstrates how to :

  1. Init an N3 storage + sparql-engine on top of that
  2. Load an RDF file from a URL in the N3 storage
  3. Executes a SPARQL query
  4. Shows the necessary Javascript files to do that (from a CDN ? needs to be compiled locally ?)

Describe alternatives you've considered

Additional context

My goal is to use a local SPARQL-compliant triplestore to execute SPARQL queries built with Sparnatural : https://github.com/sparna-git/Sparnatural

ccing @dwhitney As I read in another issue you are caching local data in the browser, so maybe you could share an example ?

Thanks for your help !

@tfrancart
Copy link
Author

@Callidon I was wondering if you help with this issue ?
My first attempt at compiling the beast are a failure, I tried

npm install
npm run build

But got a bunch of errors like these:

node_modules/@types/lodash/common/object.d.ts:2429:67 - error TS1005: ';' expected.

2429          * This method is like `_.update` except that it accepts `customizer` which is
                                                                       ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2430:47 - error TS1005: ';' expected.

2430          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`

@lucafabbian
Copy link

@tfrancart I managed to get it working. Check my fork here https://lucafabbian.github.io/sparql-engine/browser/example.html

@tfrancart
Copy link
Author

Thanks @lucafabbian !
I grabbed the sparqlEngine.js from your deployment as I am still not able to compile. And for the moment it seems to do the trick, so thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants