Skip to content

Commit 98ef214

Browse files
Update plugin, update building logic, implement tests, implement storybook, implement types, configure github workflow
1 parent 806faf5 commit 98ef214

Some content is hidden

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

45 files changed

+16459
-10269
lines changed

.babelrc

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
{
2-
"comments": false,
3-
"env": {
4-
"main": {
5-
"presets": [
6-
[
7-
"env",
8-
{
9-
"modules": false,
10-
"targets": {
11-
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"],
12-
"node": 7
13-
},
14-
"useBuiltIns": true
15-
}
16-
],
17-
"stage-3"
18-
],
19-
"plugins": [
20-
"transform-runtime"
21-
]
22-
}
23-
}
24-
}
25-
2+
"presets": ["@babel/preset-env"],
3+
"plugins": ["@babel/plugin-transform-runtime", "@babel/plugin-proposal-class-properties"],
4+
"comments": false
5+
}

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Linux:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node-version: [10.x, 12.x]
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Use Node.js ${{ matrix.node-version }}
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ matrix.node-version }}
17+
- name: Install Dependencies
18+
run: npm install
19+
- name: Build
20+
run: npm run build
21+
- name: Test
22+
run: npm run test
23+
Windows:
24+
runs-on: windows-latest
25+
strategy:
26+
matrix:
27+
node-version: [10.x, 12.x]
28+
steps:
29+
- uses: actions/checkout@v1
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v1
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
- name: Install Dependencies
35+
run: npm install
36+
- name: Build
37+
run: npm run build
38+
- name: Test
39+
run: npm run test
40+
MacOS:
41+
runs-on: macOS-latest
42+
strategy:
43+
matrix:
44+
node-version: [10.x, 12.x]
45+
steps:
46+
- uses: actions/checkout@v1
47+
- name: Use Node.js ${{ matrix.node-version }}
48+
uses: actions/setup-node@v1
49+
with:
50+
node-version: ${{ matrix.node-version }}
51+
- name: Install Dependencies
52+
run: npm install
53+
- name: Build
54+
run: npm run build
55+
- name: Test
56+
run: npm run test

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Modules
12
node_modules
3+
4+
# Logs
5+
npm-debug.log
6+
7+
# Tests
8+
cypress/screenshots
9+
cypress/videos
10+
11+
# Editors / IDEs
212
.idea/*
3-
*.lock
13+
.vscode
14+
15+
# Others
16+
*.lock
17+
*.bak

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true
4+
}

.storybook/addons.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@storybook/addon-notes/register-panel';

.storybook/config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { addParameters, configure } from '@storybook/vue';
2+
3+
addParameters({
4+
options: {
5+
panelPosition: 'right',
6+
}
7+
});
8+
9+
function loadStories() {
10+
require('./stories.js');
11+
}
12+
13+
configure(loadStories, module);

.storybook/stories.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import Vue from 'vue';
2+
import { storiesOf } from '@storybook/vue';
3+
import VueIzitoast from '../src/vue-izitoast';
4+
import App from '../examples/App.vue';
5+
import notes from '../examples/README.md';
6+
7+
Vue.use(VueIzitoast);
8+
Vue.component('App', App);
9+
10+
const withSettings = component => ({
11+
...component
12+
});
13+
14+
const stories = storiesOf('VuePlugin', module);
15+
16+
stories
17+
.add(
18+
'Options',
19+
() => withSettings({
20+
template: `
21+
<div>
22+
<App />
23+
</div>
24+
`
25+
}),
26+
{ notes }
27+
);

build/build.js

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

build/check-versions.js

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

build/webpack.base.conf.js

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

0 commit comments

Comments
 (0)