Visualizer of CWL (Common Workflow Language) workflows for Vue
Vue CWL provides a Vue component for the visualization of CWL (Common Workflow Language) workflows.
Vue CWL uses the fantastic cwl-svg library behind the scenes, which you can also use directly.
However, you might want to use Vue CWL because:
Install from npm:
npm install vue-cwl --save-dev
Or, if you want the latest development version, install from github:
npm install git+https://git@github.com/TMiguelT/vue-cwl.git --save-dev
Vue CWL is exported as a UMD module, which means that you can either import it with a module loader,
or import it directly in the browser.
If using webpack and npm:
import Vue from 'vue';
import Cwl from 'cwl-svg';
new Vue({
el: '#vue',
components: {
cwl: Cwl
}
})
You can now use the <cwl>
tag in your template:
<cwl
cwl-url="https://unpkg.com/cwl-svg@2.1.5/cwl-samples/fastqc.json"
></cwl>
If using no bundler, you can include Vue and Vue CWL using something like unpkg
:
<div id="vue" style="width: 800px; height: 800px">
<cwl
cwl-url="https://unpkg.com/cwl-svg@2.1.5/cwl-samples/fastqc.json"
></cwl>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="https://unpkg.com/vue-cwl/dist/index.js"></script>
<script>
new Vue({
el: '#vue',
components: {
cwl: vueCwl.default
}
});
</script>
Vue CWL components currently accept 4 props:
cwl
:cwlUrl
:editingEnabled
:plugins
:An online demo of Vue CWL is available at https://multimeric.github.io/vue-cwl
If you wish to build the demo yourself:
npm run demo