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

Commit 2191888

Browse files
committed
Add docute
1 parent 5d80350 commit 2191888

File tree

19 files changed

+229
-257
lines changed

19 files changed

+229
-257
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ With rollup you can break your application into reusable modules.
1010
> See [docs](http://rollup-plugin-vue.znck.me/installation) for installing, using and contributing.
1111
1212
<p align="center">
13-
<a href="https://circleci.com/gh/znck/rollup-plugin-vue">
14-
<img src="https://circleci.com/gh/znck/rollup-plugin-vue.svg?style=svg" alt="Build Status" />
13+
<a href="https://circleci.com/gh/vuejs/rollup-plugin-vue">
14+
<img src="https://circleci.com/gh/vuejs/rollup-plugin-vue.svg?style=svg" alt="Build Status" />
1515
</a>
1616
<a href="http://standardjs.com">
1717
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Code Style" />
1818
</a>
19-
<a href="https://coveralls.io/github/znck/rollup-plugin-vue?branch=master">
20-
<img src="https://coveralls.io/repos/github/znck/rollup-plugin-vue/badge.svg?branch=master&style=flat-square" alt="Coverage Status" />
19+
<a href="https://coveralls.io/github/vuejs/rollup-plugin-vue?branch=master">
20+
<img src="https://coveralls.io/repos/github/vuejs/rollup-plugin-vue/badge.svg?branch=master&style=flat-square" alt="Coverage Status" />
2121
</a>
22-
<a href="https://www.codacy.com/app/znck/rollup-plugin-vue">
22+
<a href="https://www.codacy.com/app/vuejs/rollup-plugin-vue">
2323
<img src="https://api.codacy.com/project/badge/grade/e3402df0135240c29a1d25bab93932a0"/>
2424
</a>
2525
<a href="LICENSE">
@@ -28,12 +28,12 @@ With rollup you can break your application into reusable modules.
2828
<a href="https://npmjs.org/package/rollup-plugin-vue">
2929
<img src="https://img.shields.io/npm/v/rollup-plugin-vue.svg?style=flat-square" alt="NPM" />
3030
</a>
31-
<a href="https://github.com/znck/rollup-plugin-vue/releases">
32-
<img src="https://img.shields.io/github/release/znck/rollup-plugin-vue.svg?style=flat-square" alt="Latest Version" />
31+
<a href="https://github.com/vuejs/rollup-plugin-vue/releases">
32+
<img src="https://img.shields.io/github/release/vuejs/rollup-plugin-vue.svg?style=flat-square" alt="Latest Version" />
3333
</a>
3434

35-
<a href="https://github.com/znck/rollup-plugin-vue/issues">
36-
<img src="https://img.shields.io/github/issues/znck/rollup-plugin-vue.svg?style=flat-square" alt="Issues" />
35+
<a href="https://github.com/vuejs/rollup-plugin-vue/issues">
36+
<img src="https://img.shields.io/github/issues/vuejs/rollup-plugin-vue.svg?style=flat-square" alt="Issues" />
3737
</a>
3838
</p>
3939

docs/.nojekyll

Whitespace-only changes.

docs/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
sidebar: false
3+
4+
---
5+
6+
<div class="text-xs-center" align="center" style="margin: 20px">
7+
<img src="/assets/images/logo.png">
8+
</div>
9+
10+
<p align="center">
11+
<a href="https://circleci.com/gh/vuejs/rollup-plugin-vue">
12+
<img src="https://circleci.com/gh/vuejs/rollup-plugin-vue.svg?style=svg" alt="Build Status" />
13+
</a>
14+
<a href="http://standardjs.com">
15+
<img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Code Style" />
16+
</a>
17+
<a href="https://coveralls.io/github/znck/rollup-plugin-vue?branch=master">
18+
<img src="https://coveralls.io/repos/github/znck/rollup-plugin-vue/badge.svg?branch=master&style=flat-square" alt="Coverage Status" />
19+
</a>
20+
<a href="https://www.codacy.com/app/vuejs/rollup-plugin-vue">
21+
<img src="https://api.codacy.com/project/badge/grade/e3402df0135240c29a1d25bab93932a0"/>
22+
</a>
23+
<a href="LICENSE">
24+
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square" alt="Software License" />
25+
</a>
26+
<a href="https://npmjs.org/package/rollup-plugin-vue">
27+
<img src="https://img.shields.io/npm/v/rollup-plugin-vue.svg?style=flat-square" alt="NPM" />
28+
</a>
29+
<a href="https://github.com/vuejs/rollup-plugin-vue/releases">
30+
<img src="https://img.shields.io/github/release/vuejs/rollup-plugin-vue.svg?style=flat-square" alt="Latest Version" />
31+
</a>
32+
33+
<a href="https://github.com/vuejs/rollup-plugin-vue/issues">
34+
<img src="https://img.shields.io/github/issues/vuejs/rollup-plugin-vue.svg?style=flat-square" alt="Issues" />
35+
</a>
36+
</p>
37+
38+
## Introduction
39+
`rollup-plugin-vue` is a plugin for Rollup that can transform Vue components in following format into a plain Javascript module:
40+
41+
<div class="text-xs-center" align="center" style="margin: 0 20px">
42+
<img src="/assets/images/vue-component.png">
43+
</div>
44+
45+
There are many cool features provided by `rollup-plugin-vue`:
46+
- ES2015 enabled by default;
47+
- Builtin support for sass, less and stylus for `<style>`;
48+
- Builtin support for pug for `<template>`
49+
50+
In a nutshell, the combination of Rollup and rollup-plugin-vue gives you a modern, flexible and extremely powerful workflow authoring Vue.js components & plugins.
51+
52+
<p class="tip">
53+
This plugin is best for authoring component modules and plugins. Use webpack and [vue-loader](http://vue-loader.vuejs.org) for authoring Vue.js applications.
54+
</p>

docs/assets/images/logo.png

9.73 KB
Loading
119 KB
Loading

docs/changelog.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/conduct.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const languages = {
2+
title: 'Language',
3+
type: 'dropdown',
4+
exact: true,
5+
items: [
6+
{ title: 'English', path: '/en/' }
7+
]
8+
}
9+
10+
const home = { title: 'Home', path: '/' }
11+
12+
const version_en = {
13+
title: 'Version',
14+
type: 'dropdown',
15+
exact: true,
16+
items: [
17+
{ title: 'Version 2.2', path: '/en/2.2/' },
18+
{ title: 'Version 2.3', path: '/en/2.3/' },
19+
]
20+
}
21+
22+
self.$config = {
23+
repo: 'vuejs/rollup-plugin-vue',
24+
'edit-link': 'https://github.com/vuejs/rollup-plugin-vue/edit/master/docs',
25+
26+
nav: {
27+
default: [home, languages, version_en],
28+
29+
'en2.2': [home, { title: 'Examples', path: '/en/2.2/examples' }, languages, version_en]
30+
}
31+
}

docs/contributing.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/configuration.md renamed to docs/en/2.2/README.md

Lines changed: 54 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,51 @@
1-
# Configuration
1+
---
2+
nav: en2.2
3+
4+
---
5+
6+
## Installation
7+
[Node][node] and [Rollup][rollup] are required to use rollup-plugin-vue. Use [NPM][NPM] or [yarn][yarn] to add `rollup-plugin-vue` as development dependency to your project.
8+
9+
### Using NPM
10+
```
11+
npm install --save-dev rollup-plugin-vue
12+
```
13+
14+
### Using yarn
15+
```
16+
yarn add --dev rollup-plugin-vue
17+
```
18+
19+
### Use plugin
20+
Next add `rollup-plugin-vue` to `rollup` plugins.
21+
22+
``` js
23+
// rollup.config.js
24+
import vue from 'rollup-plugin-vue';
25+
26+
export default {
27+
plugins: [
28+
vue(),
29+
],
30+
};
31+
```
32+
## Configuration
233
For most cases `rollup-plugin-vue` works out of the box. But, you can always configure it to your needs.
334

435
Following configuration are available to be overridden.
536

637
Option | Vue 0.11 | Vue 0.12 | Vue 1.0 | Vue 2.0
738
:-----------------------------------|:--------:|:--------:|:-------:|:-------:
8-
[css](#css) | &check; | &check; | &check; | &check;
9-
[compileTemplate](#compileTemplate) | - | - | - | &check;
10-
[styleToImports](#styleToImports) | &check; | &check; | &check; | &check;
11-
[stripWith](#stripWith) | - | - | - | &check;
12-
[include](#exclude) | &check; | &check; | &check; | &check;
13-
[exclude](#exclude) | &check; | &check; | &check; | &check;
14-
[htmlMinifier](#htmlMinifier) | &check; | &check; | &check; | &check;
15-
[inject](#vue) | &check; | &check; | &check; | &check;
16-
17-
{#css}
18-
### The `css` option
39+
[css](#css-option) | &check; | &check; | &check; | &check;
40+
[compileTemplate](#compileTemplate-option) | - | - | - | &check;
41+
[styleToImports](#styleToImports-option) | &check; | &check; | &check; | &check;
42+
[stripWith](#stripWith-option) | - | - | - | &check;
43+
[include](#exclude-option) | &check; | &check; | &check; | &check;
44+
[exclude](#exclude-option) | &check; | &check; | &check; | &check;
45+
[htmlMinifier](#htmlMinifier-option) | &check; | &check; | &check; | &check;
46+
[inject](#vue-option) | &check; | &check; | &check; | &check;
47+
48+
### `css` option
1949

2050
It accepts a filename, `false`, `null` or a `Function`.
2151

@@ -103,8 +133,7 @@ It accepts a filename, `false`, `null` or a `Function`.
103133
};
104134
```
105135

106-
{#compileTemplate}
107-
### The `compileTemplate` option
136+
### `compileTemplate` option
108137

109138
With Vue 2.0, you can have [two builds](https://vuejs.org/v2/guide/installation.html#Standalone-vs-Runtime-only-Build); Runtime-only and Standalone.
110139
Runtime-only build does not include template compiler. So, it is required compile `template` string to `render` function.
@@ -116,8 +145,7 @@ This option takes `boolean` value.
116145

117146
**NOTE:** If `compileTemplate` is not set and Vue 2.0 is in project dependencies, then it would compile to `template` to `render` function.
118147

119-
{#styleToImports}
120-
### The `styleToImports` option
148+
### `styleToImports` option
121149
Other than `css` option, the plugin allows you to convert your styles to javascript imports.
122150

123151
Following script defers styles handling.
@@ -135,20 +163,16 @@ export default {
135163
};
136164
```
137165
138-
{#stripWith}
139-
### The `stripWith` option
166+
### `stripWith` option
140167
For Vue 2.0 builds, `with(this)` is stripped off by default. You can disable this by setting `{ stripWith: false }`.
141168
142-
{#include}
143-
### The `include` option
169+
### `include` option
144170
A minimatch pattern or an array of minimatch patterns as required for [Rollup](https://github.com/rollup/rollup/wiki/Plugins#creating-plugins) transformer plugins.
145171
146-
{#exclude}
147-
### The `exclude` option
172+
### `exclude` option
148173
A minimatch pattern or an array of minimatch patterns as required for [Rollup](https://github.com/rollup/rollup/wiki/Plugins#creating-plugins) transformer plugins.
149174
150-
{#htmlMinifier}
151-
### The `htmlMinifier` option
175+
### `htmlMinifier` option
152176
The template string is minified using [htmlMinifier](https://github.com/kangax/html-minifier). The default configuration used with htmlMinifier is as follows:
153177
154178
``` js
@@ -177,19 +201,18 @@ export default {
177201
};
178202
```
179203
180-
{#inject}
181-
### The `inject` option
204+
### `inject` option
182205
A custom `inject` function to add `template` or `render` function to component. It would receive 3 parameters:
183206
- script (String) -- Contents of script tag.
184207
- template/render (String) -- Processed template or compiled render function.
185208
- lang (String) -- Language of script. (Inferred from `lang` attribute on `<script>` tag.)
186209
187210
The `inject` function should return processed script string.
188211
189-
For reference, checkout [inject function](https://github.com/znck/rollup-plugin-vue/blob/master/src/vueTransform.js#L43-L61) for `lang=js` or `lang=babel`.
212+
For reference, checkout [inject function](https://github.com/znck/rollup-plugin-vue/blob/2.2/src/vueTransform.js#L43-L61) for `lang=js` or `lang=babel`.
190213
191-
<br><br><br>
192214
193-
-------------------------------
194-
[Edit this page on Github]({{ $docs_edit_url }}/configuration.md)
195-
[Examples]({{ $docs_url }}/examples){.float-xs-right.pl-1}
215+
[node]: http://nodejs.org/
216+
[rollup]: http://rollupjs.org
217+
[NPM]: https://www.npmjs.com/#getting-started
218+
[yarn]: http://yarnpkg.com/

0 commit comments

Comments
 (0)