Skip to content

Commit

Permalink
Introduce CLI Starter Kit, create-yorkie-app (#643)
Browse files Browse the repository at this point in the history
This commit introduces CLI starter kit, enabling users to easily
scaffold Yorkie-based cooperative applications. The goal is to provide
a convenient way for users to kickstart their projects using Yorkie.

All source codes related to this pull request have been organized
within the tools/create-yorkie-app directory.
  • Loading branch information
se030 authored and hackerwins committed Nov 18, 2023
1 parent 859c019 commit 2a35c42
Show file tree
Hide file tree
Showing 13 changed files with 900 additions and 1,140 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/create-yorkie-app-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: create-yorkie-app-publish
on:
release:
types: [ created ]
# TODO(hackerwins): We need to decide how to publish create-yorkie-app.
# on:
# workflow_dispatch:
# push:
# branches:
# - main
# paths:
# - tools/create-yorkie-app/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Setup Node 🔧
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: package-lock.json
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: cd tools/create-yorkie-app && npm run build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39 changes: 39 additions & 0 deletions examples/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributing

See [CONTRIBUTING.md](../CONTRIBUTING.md) for the general guides for contribution.

## Keeping create-yorkie-app in sync with examples

When adding a new example, you have to update create-yorkie-app's [frameworks.ts](../tools//create-yorkie-app/frameworks.ts).

Add FrameworkVariant to the variants array under appropriate category like:

```js
export const FRAMEWORKS: Array<Framework> = [
{
name: 'vanilla',
display: 'Vanilla',
color: yellow,
variants: [
{
name: 'vanilla-codemirror6',
display: 'codemirror',
},
{
name: 'vanilla-quill',
display: 'quill',
},
{
name: 'profile-stack',
display: 'profile-stack',
},
// Your yorkie example in Vanilla JS
{
name: 'directory-name',
display: 'display-name',
},
],
},
// ...
];
```
Loading

0 comments on commit 2a35c42

Please sign in to comment.