@26lights/orcha 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -40
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,51 +2,43 @@
2
2
 
3
3
  Activity orchestration front-end.
4
4
 
5
- ## Recommended IDE Setup
5
+ ## Integration
6
6
 
7
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
7
+ Add the exported routes into your own router:
8
+ ```typescript
9
+ import { RouteRecordRaw } from "vue-router";
8
10
 
9
- ## Type Support for `.vue` Imports in TS
11
+ import Templates from "@/views/Templates.vue";
12
+ import { getTemplateRoutes } from "@26lights/orcha";
10
13
 
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
14
+ const baseRoute = {
15
+ component: Templates,
16
+ };
12
17
 
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
-
15
- 1. Disable the built-in TypeScript Extension
16
- 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19
-
20
- ## Customize configuration
21
-
22
- See [Vite Configuration Reference](https://vitejs.dev/config/).
23
-
24
- ## Project Setup
25
-
26
- ```sh
27
- npm install
28
- ```
29
-
30
- ### Compile and Hot-Reload for Development
31
-
32
- ```sh
33
- npm run dev
18
+ export const orchaRoutes: Array<RouteRecordRaw> = getTemplateRoutes(
19
+ "/templates",
20
+ baseRoute
21
+ );
34
22
  ```
35
23
 
36
- ### Type-Check, Compile and Minify for Production
37
-
38
- ```sh
39
- npm run build
24
+ Define a component for the template view:
25
+ ```typescript
26
+ <template>
27
+ <router-view
28
+ :templates="templates"
29
+ @add-template="createTemplate"
30
+ />
31
+ </template>
32
+ <script setup lang="ts">
33
+ import "@26lights/orcha/dist/orcha.css";
34
+
35
+ const templates = []// your templates
36
+
37
+ const createTemplate = async () => {
38
+ // Create a new template
39
+ };
40
+ </script>
40
41
  ```
41
42
 
42
- ### Run Unit Tests with [Vitest](https://vitest.dev/)
43
-
44
- ```sh
45
- npm run test:unit
46
- ```
47
-
48
- ### Lint with [ESLint](https://eslint.org/)
49
-
50
- ```sh
51
- npm run lint
52
- ```
43
+ ## License
44
+ [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-ND-4.0",
6
6
  "author": "26lights <dev@26lights.com> (https://www.26lights.com)",
7
- "version": "0.1.0",
7
+ "version": "0.1.1",
8
8
  "workspaces": [
9
9
  "packages/*"
10
10
  ],