diff --git a/readme.md b/readme.md index 226abe0..30b68d6 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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, + }, + }, +}); +``` \ No newline at end of file