Files
spacedrive/docs/developers/clients/javascript.mdx
Utku dbec988147 [ENG-362, ENG-476, ENG-503] Next.js (#817)
* 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
2023-05-21 13:11:03 +00:00

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();
```