1.0.1 • Published 4 years ago
pug2vue v1.0.1
pug2vue
Converts Pug templating language to Vue template.
Install
Get it on npm:
npm i -g pug2vue
Usage
pug2vue <Vue File>
or if you want to process all vue files recursively under the directory use
pug2vue <Directory>
After the operation is completed, the source .vue file will be replaced with Vue template, and a .bak backup file will be generated for checking
Delete .bak files with one click
pug2vue rm <Vue File>
or if you want to process all vue files recursively under the directory use
pug2vue rm <Directory>
Example
pug2vue App.vue
Turns this :unamused:
App.vue
<template lang="pug">
#app
img(width="25%", src="./assets/logo.png")
hr
</template>
<script>
export default {
name: "App"
};
</script>
<style>
#app {
font-size: "12px";
}
</style>
Into this :tada:
App.vue
<template>
<div id="app">
<img width="25%" src="./assets/logo.png">
<hr/>
</div>
</template>
<script>
export default {
name: "App"
};
</script>
<style>
#app {
font-size: "12px";
}
</style>