Skip to content

Commit

Permalink
chore: try docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicGBauer committed Nov 29, 2023
1 parent 65a3c12 commit 4a0a5b7
Show file tree
Hide file tree
Showing 187 changed files with 26,121 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:
run: yarn install --frozen-lockfile
- name: Build Packages
run: yarn build:packages
- name: Combine Docs
run: yarn docs
- name: Create Docs
run: cd docs && yarn build
- uses: actions/upload-pages-artifact@v2
with:
path: ./docs
path: ./docs/build
deploy:
runs-on: ubuntu-latest
environment:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ yarn-error.log
.vscode
.DS_STORE
.idea
/docs
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ Monorepo for all things React Native and PowerSync.

## Monorepo Structure

- [apps/supabase-todolist](./apps/supabase-todolist/README.md)
* An Expo React native app using Supabase.
- [apps/supabase-todolist](https://github.com/powersync-ja/powersync-supabase-react-native-todolist-demo/tree/e6a1d045ab8244041651757402adc562a6699a4f)
- An Expo React native app using Supabase.

- [packages/powersync-sdk-common](./packages/powersync-sdk-common/README.md)
* A Typescript implementation of a PowerSync database connector and streaming sync bucket implementation.
- A Typescript implementation of a PowerSync database connector and streaming sync bucket implementation.

- [packages/powersync-sdk-react-native](./packages/powersync-sdk-react-native/README.md)
* An extension of `packages/powersync-sdk-common` which provides React Native specific implementations of abstracted features.
- An extension of `packages/powersync-sdk-common` which provides React Native specific implementations of abstracted features.

# Development

## Git Submodules

After cloning this repo be sure to init the Git submodules

```bash
Expand All @@ -25,41 +26,45 @@ git submodule init && git submodule update
This monorepo uses Yarn as it works well with React native.

Install workspace dependencies

```bash
yarn install
```

Build packages

```bash
yarn build:packages
```


## Versioning


### Development Packages
Development packages can be published by manually triggering the `dev-packages` workflow. Development packages are versioned as `0.0.0-{tag}-DATETIMESTAMP`.

Development packages can be published by manually triggering the `dev-packages` workflow. Development packages are versioned as `0.0.0-{tag}-DATETIMESTAMP`.

### Production Packages

Pull requests should contain Changesets for changed packages.

Add changesets with

```Bash
yarn changeset add
```

Merging a PR with Changesets will automatically create a PR with version bumps. That PR will be merged when releasing.
Merging a PR with Changesets will automatically create a PR with version bumps. That PR will be merged when releasing.

## React Native Quick SQLite Development

Testing live development changes to `@journeyapps/react-native-quick-sqlite` will not with with standard `yarn link` commands. Metro does not work well with symlinks https://github.com/facebook/metro/issues/286.
Testing live development changes to `@journeyapps/react-native-quick-sqlite` will not with with standard `yarn link` commands. Metro does not work well with symlinks <https://github.com/facebook/metro/issues/286>.

The process of releasing development packages for `@journeyapps/react-native-quick-sqlite` for each change can be tedious and slow. A faster (and hackier) method is to use [mtsl](https://www.npmjs.com/package/mtsl) which will watch and copy the package into this workspace's `node_modules`.

```bash
npm install -g mtsl
```

```bash
mtsl add -s "[source path to your react-native-quick-sqlite repo folder]" -d "[this workspaces root node_modules folder]"/@journeyapps/react-native-quick-sqlite
```
Expand All @@ -68,15 +73,14 @@ mtsl add -s "[source path to your react-native-quick-sqlite repo folder]" -d "[t
mtsl start "[the id returned from step above]"
```


## Testing Supabase example app

``` bash
cd apps/supabase-todolist
```

Test on either Android or iOS

```bash
yarn ios
```

20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
1 change: 1 addition & 0 deletions docs/docs/attachments-sdk/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: "API"
Loading

0 comments on commit 4a0a5b7

Please sign in to comment.