A tool for Compile .vue
file to .js
file.
The .vue
means use .vue Spec file.
*.vue
file consists of three types of top-level language blocks:<template>
,<script>
and<style>
.
$ npm i vue2js -g
You can use it as command line tool or scripting with it.
$ vue2js
Usage: vue2js <filename>
const vue2js = require('vue2js');
var content = fs.readFileSync('*.vue', 'utf8');
console.log(vue2js(content));
The MIT license