@@ -7,12 +7,14 @@ through [LDflex](https://github.com/RubenVerborgh/LDflex) expressions
77[ ![ Coverage Status] ( https://coveralls.io/repos/github/solid/query-ldflex/badge.svg?branch=master )] ( https://coveralls.io/github/solid/query-ldflex?branch=master )
88[ ![ Dependency Status] ( https://david-dm.org/solid/query-ldflex.svg )] ( https://david-dm.org/solid/query-ldflex )
99
10- This library brings the [ LDflex] ( https://github.com/RubenVerborgh/LDflex ) language
11- to Solid by:
10+ This library is a _ configuration_ of
11+ the [ LDflex] ( https://github.com/RubenVerborgh/LDflex ) language
12+ for the Solid ecosystem.
13+ It configures LDflex with:
1214
13- 1 . setting a [ JSON-LD context for Solid] ( https://github.com/solid/context )
14- 2 . binding a query engine ([ Comunica] ( https://github.com/RubenVerborgh/LDflex-Comunica ) )
15- 3 . exposing useful [ data paths] ( #data-paths )
15+ 1 . a [ JSON-LD context for Solid] ( https://github.com/solid/context )
16+ 2 . a Solid-authenticated query engine ([ Comunica] ( https://github.com/RubenVerborgh/LDflex-Comunica ) or [ rdflib.js ] ( https://github.com/LDflex/LDflex-rdflib/ ) )
17+ 3 . useful [ data paths] ( #data-paths ) for Solid
1618
1719LDflex expressions occur for example
1820on [ Solid React components] ( https://github.com/solid/react-components ) ,
@@ -97,7 +99,7 @@ npm install @solid/query-ldflex
9799```
98100
99101## Usage
100- ### With Node.js
102+ ### Within Node.js environments
101103``` javascript
102104const { default: data } = require (' @solid/query-ldflex' );
103105
@@ -119,6 +121,19 @@ async function showProfile(person) {
119121
120122```
121123
124+ If, instead of the Comunica query engine,
125+ you want to use the rdflib.js query engine,
126+ you can
127+
128+ ``` javascript
129+ const { default: data } = require (' @solid/query-ldflex/lib/exports/rdflib' );
130+ ```
131+
132+ When creating browser builds,
133+ it can be easier to simply tell webpack
134+ to replace ` @ldflex/comunica ` by ` @ldflex/rdflib ` .
135+
136+
122137### In the browser
123138``` html
124139<script src =" solid-auth-client.bundle.js" ></script >
@@ -133,6 +148,15 @@ document.addEventListener('DOMContentLoaded', async () => {
133148
134149```
135150
151+ To replace Comunica by rdflib.js,
152+ opt for
153+
154+ ``` html
155+ <script src =" solid-auth-client.bundle.js" ></script >
156+ <script src =" rdflib.min.js" ></script >
157+ <script src =" solid-query-ldflex.rdflib.js" ></script >
158+ ```
159+
136160### Adding a custom JSON-LD context
137161In addition to the [ default properties] ( https://github.com/solid/context/blob/master/context.json ) ,
138162you might want to support your own:
0 commit comments