Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 53c51a5

Browse files
committed
use vueify compiler
1 parent 2b6df88 commit 53c51a5

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {createFilter} from 'rollup-pluginutils';
2+
const {compiler} = require('vueify');
3+
4+
export default vue;
5+
6+
function vue(options = {}) {
7+
let filter = createFilter(options['include'], options['exclude']);
8+
9+
return {
10+
transform(code, id) {
11+
if (!filter(id)) return;
12+
13+
return new Promise(
14+
function (resolve, reject) {
15+
compiler['compile'](code, id, function (error, compiled) {
16+
if (error) reject(compiled);
17+
18+
resolve(compiled);
19+
});
20+
}
21+
);
22+
}
23+
};
24+
}
25+
26+
vue.version = '1.0.0';
27+

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "rollup-plugin-vue",
3+
"version": "1.0.0",
4+
"description": "Roll .vue files",
5+
"main": "index.js",
6+
"scripts": {},
7+
"repository": {
8+
"type": "git",
9+
"url": "git+https://github.com/znck/rollup-plugin-vue.git"
10+
},
11+
"keywords": [
12+
"rollup-plugin",
13+
"vue"
14+
],
15+
"author": "Rahul Kadyan <[email protected]>",
16+
"license": "MIT",
17+
"bugs": {
18+
"url": "https://github.com/znck/rollup-plugin-vue/issues"
19+
},
20+
"homepage": "https://github.com/znck/rollup-plugin-vue#readme",
21+
"dependencies": {
22+
"rollup-pluginutils": "latest",
23+
"vueify": "latest"
24+
}
25+
}

0 commit comments

Comments
 (0)