Velocity template that output multiple files - vuejs2

Is there any way to write a velocity template that outputs multiple files in different paths.
I am making a velocity template that generates a Vue.js component file which has its html in a separate file.
For example.. creating Vue component with the name Sidebar will generate:
./components/Sidebar.vue
./components/templates/sidebar.template.html

No. You would typically use two different templates, but you would merge them with the same context.
Documentations are usually generated using specific tools that extract objects/methods formatted comments to produce html. Such a tool would typically run on the generated component.

Related

Adding custom style in Ckeditor 5

I am trying to find an answer several days but not able to.
How can I add custom styles just like in Ckeditor 4 (For example, using CKEDITOR.stylesSet.add) ?
Thanks
Edit the CkEditor css file in its entirety, that can be found at This guide
From the page:
By default, content styles are loaded by the editor JavaScript which makes them only present
when users edit their content and this, in turn, usually takes place in the back–end of an application. If you want to use the same styles in the front–end, you may find yourself in a situation that requires you to load CKEditor just for that purpose, which is (performance–wise) not the best idea.
To avoid unnecessary dependencies in your front–end, use a stylesheet with a complete list of CKEditor 5 content styles used by all editor features. There are two ways to obtain it:
By taking it directly from this guide and saving it as a static resource in your application (e.g. content-styles.css) (recommended).
By generating it using a dedicated script. Learn more in the Development environment guide.
Load the content-styles.css file in your application by adding the following code to the template:

Can I have additional root elements in a vue.js single file component?

I'd like to use the technique described here to have web workers in a component without having to handle additional files.
However, adding another <script> element seems not to work:
it I add it before the component's script part it doesn't get recognized/found by document.querySelector
if I add it after the component's script part, the component doesn't compile
The only solutions I've found are:
source in a multiline string: ugly, messes up the editor
script inside the template: even uglier, exposes innards
Any better solution out there?

SVG intellisense in .vue files for vscode

I'm currently wanting to create Vue components with SVG elements as part of the template with the Vue components being created within .vue files. I am trying to work out how to get both IntelliSense for Vue from vetur as well as getting suggestions for SVG.
I have tried setting the file associations in the VsCode settings.json file, but it doesn't look like you can associate a file type to more than one language mode at a time.
Is it possible to use two different plugins for IntelliType on one file type or does that functionality not exist yet?

How to generate headings from within Vue Components in Vuepress

Is there a way to generate the same heading and link in sidevar, from within a vue component as you would if using normal markdown headings?
I have a Vue component inside Vuepress, that generates a list of links, but I want it to generate linked headings as well, so I can link to it easily when answering someone's question.
I know the link in the Heading uses a router-link, but I cant want to have name collision detection as well.

How to use vue2.0 attribute with Data-attribute

I am new to vue2, I am trying to learn and implement it inside our EPUB format. But the problem is that EPUB parser does to allow custom tags / custom components.
e.g. I cant use <li v-for="friend in friends"> in my HTML file as the parser will give error for v-for.
So I want to know if there is any way so that I can write whole vue2 code + tempalte inside .js and later append it to DOM?
Sure, with ES6's ` you can write templates including line breaks in a single string, and then assign the string to the template option.
However, you can use babel to transpile your code before the EPUB parser runs (so there won't be any v-for), check out the guide. And sure setting up the took chain require some effort, you can use the pure js option if your app is not too complicated.