|
1 |
| -# Supabase JS |
| 1 | +# `supabase-js` |
2 | 2 |
|
3 |
| -## Commands |
4 |
| -- `npm run clean` - Remove `lib/` directory |
5 |
| -- `npm test` - Run tests with linting and coverage results. |
6 |
| -- `npm run test:integration` - Run the integration tests without docker (requires you to run the docker container separately) |
7 |
| -- `npm run test:integration:full` - Run the integration tests (requires docker to be running) |
8 |
| -- `npm test:only` - Run tests without linting or coverage. |
9 |
| -- `npm test:watch` - You can even re-run tests on file changes! |
10 |
| -- `npm test:prod` - Run tests with minified code. |
11 |
| -- `npm run test:examples` - Test written examples on pure JS for better understanding module usage. |
12 |
| -- `npm run lint` - Run ESlint with airbnb-config |
13 |
| -- `npm run cover` - Get coverage report for your code. |
14 |
| -- `npm run build` - Babel will transpile ES6 => ES5 and minify the code. |
15 |
| -- `npm run build:umd` - Babel will transpile ES6 => UMD, minify the code and webpack to supabase.js |
16 |
| -- `npm run prepublish` - Hook for npm. Do all the checks before publishing your module. |
| 3 | +An isomorphic Javascript client for Supabase. |
17 | 4 |
|
| 5 | +- Documentation: http://localhost:3005/docs/client/supabase-client |
18 | 6 |
|
19 |
| -## Publishing |
20 |
| - |
21 |
| -Bump the semver. |
| 7 | +## Usage |
22 | 8 |
|
23 | 9 | ```sh
|
24 |
| -npm publish --access=public |
| 10 | +npm install @supabase/supabase-js |
25 | 11 | ```
|
26 | 12 |
|
| 13 | +```js |
| 14 | +import { createClient } from '@supabase/supabase-js' |
| 15 | + |
| 16 | +// Create a single supabase client for interacting with your database |
| 17 | +const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key') |
| 18 | +``` |
27 | 19 |
|
28 | 20 | ## Sponsors
|
29 | 21 |
|
30 | 22 | We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.
|
31 | 23 |
|
32 |
| -[](https://www.worklife.vc) |
33 | 24 | [](https://github.com/sponsors/supabase)
|
0 commit comments