1
1
# Vue CWL
2
2
Vue CWL provides a Vue component for the visualization of CWL (Common Workflow Language) workflows.
3
3
4
- ## Installation
5
- Install from ` npm ` :
4
+ ## Motivation
5
+
6
+ Vue CWL uses the fantastic [ cwl-svg] ( https://github.com/rabix/cwl-svg ) library behind the scenes, which you can also use directly.
7
+ However, you might want to use Vue CWL because:
8
+
9
+ * You can use it directly in your HTML application, without setting up a compiler. You don't even need to use npm!
10
+ * If you're using Vue elsewhere in your application, Vue CWL will be much easier to integrate.
11
+
12
+ ## Installation (if using npm )
13
+ Install from npm:
6
14
7
15
``` bash
8
16
npm install vue-cwl --save-dev
@@ -14,11 +22,11 @@ Or, if you want the latest development version, install from github:
14
22
npm install git+https://
[email protected] /TMiguelT/vue-cwl.git --save-dev
15
23
```
16
24
17
- ## Adding to Vue
25
+ ## Integration
18
26
Vue CWL is exported as a UMD module, which means that you can either import it with a module loader,
19
27
or import it directly in the browser.
20
28
21
- If using webpack:
29
+ If using webpack and npm :
22
30
23
31
``` javascript
24
32
import Vue from ' vue' ;
@@ -32,20 +40,30 @@ new Vue({
32
40
})
33
41
```
34
42
35
- If using no bundler:
43
+ You can now use the ` <cwl> ` tag in your template:
44
+ ``` html
45
+ <cwl
46
+ cwl-url =
" https://unpkg.com/[email protected] /cwl-samples/fastqc.json"
47
+ ></cwl >
48
+ ```
49
+
50
+ If using no bundler, you can include Vue and Vue CWL using something like ` unpkg ` :
36
51
37
52
``` html
38
- <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/vue.js" ></
script >
39
- <script src =" node_modules/vue-cwl/dist/index.js" ></script >
53
+ <div id =" vue" style =" width : 800px ; height : 800px " >
54
+ <cwl
55
+ cwl-url =
" https://unpkg.com/[email protected] /cwl-samples/fastqc.json"
56
+ ></cwl >
57
+ </div >
58
+ <script src =" https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js" ></script >
59
+ <script src =" https://unpkg.com/vue-cwl/dist/index.js" ></script >
40
60
<script >
41
- Vue .config .devtools = true ;
42
- Vue .config .debug = true ;
43
61
new Vue ({
44
62
el: ' #vue' ,
45
63
components: {
46
64
cwl: vueCwl .default
47
65
}
48
- })
66
+ });
49
67
</script >
50
68
```
51
69
@@ -76,5 +94,5 @@ An online demo of Vue CWL is available at <https://tmiguelt.github.io/vue-cwl/in
76
94
If you wish to build the demo yourself:
77
95
* Clone the repo
78
96
* Run ` npm run demo `
79
- * Then browse to < http://localhost:8080/docs/ > in your web browser (or whatever URL the command
97
+ * Then browse to < http://localhost:8080/ > in your web browser (or whatever URL the command
80
98
prints out)
0 commit comments