https://github.com/JacksonTian/vue2js
Compile a .vue file to .js file
https://github.com/JacksonTian/vue2js
Last synced: 9 days ago
JSON representation
Compile a .vue file to .js file
- Host: GitHub
- URL: https://github.com/JacksonTian/vue2js
- Owner: JacksonTian
- License: mit
- Created: 2016-11-20T18:42:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-21T03:05:11.000Z (over 8 years ago)
- Last Synced: 2025-04-12T20:45:38.223Z (24 days ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 26
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - vue2js
README
.vue to .js
=================A tool for Compile `.vue` file to `.js` file.
The `.vue` means use [.vue Spec file](https://vue-loader.vuejs.org/en/start/spec.html).
> `*.vue` file consists of three types of top-level language blocks: ``, `` and `<style>`.
## Install
```sh
$ npm i vue2js -g
```## Usage
You can use it as command line tool or scripting with it.
### Shell
```sh
$ vue2js
Usage: vue2js <filename>
```### Scripting
```
const vue2js = require('vue2js');var content = fs.readFileSync('*.vue', 'utf8');
console.log(vue2js(content));
```## License
The MIT license