Skip to content

Commit

Permalink
Added example to readme, note
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 13, 2024
1 parent 804148a commit 8aa2f26
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# ZenFS Dropbox

**_Work in progress_**
> [!WARNING]
> This package was implemented very recently and may not be stable.
>
> If you find a bug, please report it. Thanks!
> [!IMPORTANT]
> Please read the [ZenFS core documentation](https://zenfs.dev/core)!
This package adds the `Dropbox` backend.
This package adds the `Dropbox` backend for ZenFS.

For more information, see the [API documentation](https://zenfs.dev/dropbox).

> [!IMPORTANT]
> Please read the [ZenFS core documentation](https://zenfs.dev/core)!
## Installing

```sh
Expand All @@ -22,4 +25,22 @@ npm install @zenfs/dropbox
> For CJS, you can `require` the package.
> For a browser environment without support for `type=module` in `script` tags, you can add a `script` tag to your HTML pointing to the `browser.min.js` and use the global `ZenFS_Dropbox` object.
_Work in progress_
```ts
import { configure, fs } from '@zenfs/core';
import { Dropbox } from '@zenfs/dropbox';
import { Dropbox as DropboxClient } from 'dropbox';

const client = new DropboxClient({
accessToken: '...',
// ...
});

await configure({
mounts: {
'/mnt/dropbox': {
backend: Dropbox,
client,
},
},
});
```

0 comments on commit 8aa2f26

Please sign in to comment.