mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-02-20 07:37:26 -05:00
* update landing packages & tailwind * move images * refactor to nextjs * doc stuff * rename markdown to mdx * working docs * Add math * fix pnpm-lock * Code highlighting * fix types * fix more stuff * Notice component and removed slot * delete editorconfig eslint rule * pnpm-lock * some fixes * fixed types (pls) * bump ui's typescript too * commit next-env.d.ts * fix doc links * Use next/head instead of react-helmet & rehype-external-links * fixes * fix unsub from list * add trim() to docs.excerpt * trim doc title too * fix titles * replace <a> to Link * hide .contentlayer & .next from vscode search
31 lines
527 B
Plaintext
31 lines
527 B
Plaintext
---
|
|
title: JavaScript
|
|
index: 500
|
|
---
|
|
|
|
# JavaScript Client
|
|
|
|
For developers who want to extend the functionality of Spacedrive, this library allows easy development of [Extensions](), providing full access to Spacedrive's functionality.
|
|
|
|
### Installation
|
|
|
|
```shell
|
|
$ npm i @spacedrive/client
|
|
```
|
|
|
|
Initialize the Spacedrive client
|
|
|
|
```ts
|
|
import spacedrive from '@spacedrive/client';
|
|
|
|
spacedrive.start();
|
|
```
|
|
|
|
Add a location
|
|
|
|
```ts
|
|
const location = await spacedrive.location.create('/Users/jamie/Documents');
|
|
|
|
location.scan();
|
|
```
|