Skip to content

Commit 5e98b01

Browse files
authored
🔀 Merge pull request #10 from gluons/next
Migrate to Vue Pack & Add Nuxt support
2 parents 877b992 + bbff091 commit 5e98b01

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+14639
-4057
lines changed

.babelrc

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

.browserslistrc

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

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
src/components/icons/
12
dist-example/
23
dist/
4+
nuxt/plugin.js

.eslintrc.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"root": true,
3-
"extends": "gluons/vue",
4-
"parser": "babel-eslint",
3+
"extends": "gluons/vue-babel",
4+
"rules": {
5+
"vue/script-indent": "off"
6+
},
57
"env": {
6-
"jasmine": true
8+
"mocha": true
79
}
810
}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,9 @@ $RECYCLE.BIN/
106106

107107
# Dist
108108
dist/
109+
110+
# Extracted icons
111+
src/components/icons/
112+
113+
# Nuxt built files
114+
.nuxt

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
language: node_js
22
node_js:
3-
- "8"
4-
- "6"
3+
- "lts/*"
4+
- "lts/carbon"
5+
- "lts/boron"
6+
install: yarn --ignore-engines
57
before_script:
68
- export DISPLAY=:99.0
79
- sh -e /etc/init.d/xvfb start

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@
99

1010
:octocat: GitHub buttons component for Vue.
1111

12+
- [Vue GitHub Buttons](#vue-github-buttons)
13+
- [Installation](#installation)
14+
- [Demo](#demo)
15+
- [Usage](#usage)
16+
- [Using with Nuxt](#using-with-nuxt)
17+
- [Module options](#module-options)
18+
- [`css`](#css)
19+
- [`useCache`](#usecache)
20+
- [API](#api)
21+
- [Plugin Option](#plugin-option)
22+
- [`useCache`](#usecache-1)
23+
- [Components](#components)
24+
- [`gh-btns-watch`](#gh-btns-watch)
25+
- [`gh-btns-star`](#gh-btns-star)
26+
- [`gh-btns-fork`](#gh-btns-fork)
27+
- [`gh-btns-follow`](#gh-btns-follow)
28+
1229
## Installation
1330

1431
Via [NPM](https://www.npmjs.com):
@@ -39,6 +56,8 @@ import App from './App.vue';
3956
import 'vue-github-buttons/dist/vue-github-buttons.css';
4057

4158
Vue.use(VueGitHubButtons);
59+
// Or if your don't want to use cache
60+
Vue.use(VueGitHubButtons, { useCache: false });
4261

4362
new Vue({
4463
el: '#app',
@@ -65,6 +84,37 @@ new Vue({
6584
</style>
6685
```
6786

87+
## Using with [Nuxt](https://nuxtjs.org/)
88+
89+
Add `vue-github-buttons/nuxt` to `modules` in **nuxt.config.js**.
90+
91+
```javascript
92+
module.exports = {
93+
modules: [
94+
'vue-github-buttons/nuxt',
95+
// Or with options
96+
['vue-github-buttons/nuxt', {
97+
css: false, // Don't include CSS
98+
useCache: false // Don't use cache
99+
}]
100+
]
101+
};
102+
```
103+
104+
### Module options
105+
106+
#### `css`
107+
Type: `Boolean`
108+
Default: `true`
109+
110+
Include **Vue GitHub Buttons**'s CSS.
111+
112+
#### `useCache`
113+
Type: `Boolean`
114+
Default: `true`
115+
116+
Enable caching. (See below)
117+
68118
## API
69119

70120
### Plugin Option
@@ -97,7 +147,7 @@ Vue.use(VueGitHubButtons, { useCache: false }); // Disable cache
97147
- `slug` - GitHub slug (username/repo).
98148
- `show-count` - Enable displaying the count number.
99149

100-
### `gh-btns-follow`
150+
#### `gh-btns-follow`
101151
👤 A follow button.
102152
- `user` - GitHub username.
103153
- `show-count` - Enable displaying the count number.

alias.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const { resolve } = require('path');
2+
3+
module.exports = {
4+
'@': resolve(__dirname, './src'),
5+
'@lib': resolve(__dirname, './lib')
6+
};

build/banner.js

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

build/createStyleLoaders.js

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

0 commit comments

Comments
 (0)