@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.
- package/README.md +32 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,51 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
Activity orchestration front-end.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Integration
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Add the exported routes into your own router:
|
|
8
|
+
```typescript
|
|
9
|
+
import { RouteRecordRaw } from "vue-router";
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
import Templates from "@/views/Templates.vue";
|
|
12
|
+
import { getTemplateRoutes } from "@26lights/orcha";
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
const baseRoute = {
|
|
15
|
+
component: Templates,
|
|
16
|
+
};
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
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/)
|