Skip to content

Commit caecc7f

Browse files
committed
README updated
1 parent 7d102ad commit caecc7f

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,23 @@ $ npm install --save @featurevisor/sdk
2222
Then use it in your application:
2323

2424
```js
25-
import { createInstance } from '@featurevisor/sdk';
25+
import { createInstance } from "@featurevisor/sdk";
26+
27+
const DATAFILE_URL =
28+
"https://featurevisor-example-cloudflare.pages.dev/production/datafile-tag-all.json";
29+
30+
const datafileContent = await fetch(DATAFILE_URL).then((res) => res.json());
2631

2732
const sdk = createInstance({
28-
datafileUrl: 'https://featurevisor-example-cloudflare.pages.dev/production/datafile-tag-all.json',
33+
datafile: datafileContent,
2934
});
3035
```
3136

37+
Learn more about [SDK usage here](https://featurevisor.com/docs/sdks/javascript/).
38+
3239
## Installation
3340

34-
Since this example app lives outside of the Featurevisor [monorepo](https://github.com/fahad19/featurevisor), you are recommended to make sure [`package.json`](./package.json) has the latest version of [`@featurevisor/cli`](https://www.npmjs.com/package/@featurevisor/cli) package.
41+
Since this example app lives outside of the Featurevisor [monorepo](https://github.com/featurevisor/featurevisor), you are recommended to make sure [`package.json`](./package.json) has the latest version of [`@featurevisor/cli`](https://www.npmjs.com/package/@featurevisor/cli) package.
3542

3643
```
3744
$ npm ci
@@ -42,19 +49,21 @@ $ npm ci
4249
### Lint YAMLs
4350

4451
```
45-
$ npm run lint
52+
$ npx featurevisor lint
4653
```
4754

4855
### Build datafiles
4956

5057
```
51-
$ npm run build
58+
$ npx featurevisor build
5259
```
5360

61+
Checkout output in `datafiles` directory.
62+
5463
### Test features
5564

5665
```
57-
$ npm test
66+
$ npx featurevisor test
5867
```
5968

6069
## Cloudflare

0 commit comments

Comments
 (0)