Skip to content

Commit bb6dcff

Browse files
committed
πŸš€ Initial commit
1 parent b4f6d25 commit bb6dcff

19 files changed

+11502
-0
lines changed

β€Ž.editorconfigβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

β€Ž.eslintignoreβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Common
2+
node_modules
3+
dist
4+
.nuxt
5+
coverage
6+
7+
# Plugin
8+
lib/plugin.js

β€Ž.eslintrc.jsβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
parser: 'babel-eslint',
5+
sourceType: 'module'
6+
},
7+
extends: [
8+
'@nuxtjs'
9+
]
10+
}

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
ci:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
node: [10, 12]
19+
20+
steps:
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node }}
24+
25+
- name: checkout
26+
uses: actions/checkout@master
27+
28+
- name: cache node_modules
29+
uses: actions/cache@v1
30+
with:
31+
path: node_modules
32+
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
33+
34+
- name: Install dependencies
35+
if: steps.cache.outputs.cache-hit != 'true'
36+
run: yarn
37+
38+
- name: Lint
39+
run: yarn lint
40+
41+
- name: Test
42+
run: yarn test
43+
44+
- name: Coverage
45+
uses: codecov/codecov-action@v1

β€Ž.gitignoreβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
*.iml
3+
.idea
4+
*.log*
5+
.nuxt
6+
.vscode
7+
.DS_Store
8+
coverage
9+
dist

β€ŽLICENSEβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Tobias Dittmann
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

β€ŽREADME.mdβ€Ž

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# {{ name }}
2+
3+
[![npm version][npm-version-src]][npm-version-href]
4+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
5+
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
6+
[![Codecov][codecov-src]][codecov-href]
7+
[![License][license-src]][license-href]
8+
9+
> {{ description }}
10+
11+
[πŸ“– **Release Notes**](./CHANGELOG.md)
12+
13+
## Setup
14+
15+
1. Add `{{ name }}` dependency to your project
16+
17+
```bash
18+
yarn add {{ name }} # or npm install {{ name }}
19+
```
20+
21+
2. Add `{{ name }}` to the `modules` section of `nuxt.config.js`
22+
23+
```js
24+
{
25+
modules: [
26+
// Simple usage
27+
'{{ name }}',
28+
29+
// With options
30+
['{{ name }}', { /* module options */ }]
31+
]
32+
}
33+
```
34+
35+
## Development
36+
37+
1. Clone this repository
38+
2. Install dependencies using `yarn install` or `npm install`
39+
3. Start development server using `npm run dev`
40+
41+
## License
42+
43+
[MIT License](./LICENSE)
44+
45+
Copyright (c) {{ author }}
46+
47+
<!-- Badges -->
48+
[npm-version-src]: https://img.shields.io/npm/v/{{ name }}/latest.svg
49+
[npm-version-href]: https://npmjs.com/package/{{ name }}
50+
51+
[npm-downloads-src]: https://img.shields.io/npm/dt/{{ name }}.svg
52+
[npm-downloads-href]: https://npmjs.com/package/{{ name }}
53+
54+
[github-actions-ci-src]: https://github.com/{{ github }}/workflows/ci/badge.svg
55+
[github-actions-ci-href]: https://github.com/{{ github }}/actions?query=workflow%3Aci
56+
57+
[codecov-src]: https://img.shields.io/codecov/c/github/{{ github }}.svg
58+
[codecov-href]: https://codecov.io/gh/{{ github }}
59+
60+
[license-src]: https://img.shields.io/npm/l/{{ name }}.svg
61+
[license-href]: https://npmjs.com/package/{{ name }}

β€Žbabel.config.jsβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env', {
5+
targets: {
6+
esmodules: true
7+
}
8+
}
9+
]
10+
]
11+
}

β€Žcommitlint.config.jsβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
extends: [
3+
'@commitlint/config-conventional'
4+
]
5+
}

β€Žexample/nuxt.config.jsβ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { resolve } = require('path')
2+
3+
module.exports = {
4+
rootDir: resolve(__dirname, '..'),
5+
buildDir: resolve(__dirname, '.nuxt'),
6+
srcDir: __dirname,
7+
modules: [
8+
'../lib/module'
9+
],
10+
ghost: {
11+
url: 'https://demo.ghost.io',
12+
key: '22444f78447824223cefc48062'
13+
}
14+
}

0 commit comments

Comments
Β (0)