This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ /* globals process */
2+
3+ import { createFilter } from 'rollup-pluginutils' ;
4+ const { compiler} = require ( 'vueify' ) ;
5+
6+ export default vue ;
7+
8+ function vue ( options = { } ) {
9+ let filter = createFilter ( options [ 'include' ] , options [ 'exclude' ] ) ;
10+
11+ return {
12+ transform ( code , id ) {
13+ if ( ! filter ( id ) ) return ;
14+
15+ const promise = new Promise (
16+ function ( resolve , reject ) {
17+ compiler . compile ( code , id , function ( error , compiled ) {
18+ if ( error ) reject ( compiled ) ;
19+
20+ resolve ( compiled ) ;
21+ } ) ;
22+ }
23+ ) ;
24+
25+ return promise ;
26+ }
27+ } ;
28+ }
Original file line number Diff line number Diff line change 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 <hi@znck.me>" ,
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" : " ^1.3.1" ,
23+ "vueify" : " ^8.3.2"
24+ }
25+ }
You can’t perform that action at this time.
0 commit comments