-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit with library structure, demo and documentation
- Loading branch information
1 parent
3ea88a9
commit 93a2a80
Showing
20 changed files
with
1,717 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
public | ||
dist/*.gz | ||
dist/*.map | ||
coverage | ||
docs/.vuepress/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
# related test files | ||
/tests/e2e/reports | ||
/tests/e2e/videos | ||
/tests/e2e/screenshots | ||
|
||
# Editor directories and files | ||
# editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
*.sw* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// TODO: release log here ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/app', | ||
[ | ||
'@vue/app', | ||
{ | ||
polyfills: false, | ||
useBuiltIns: false | ||
}, | ||
] | ||
], | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<div class="demo"> | ||
<h1>Plugin Demo</h1> | ||
<p>add: {{ a }} + {{ b }} = {{ $add(a, b) }}</p> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'demo', | ||
data: () => ({ a: 1, b: 1 }) | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Vue Plugin Demo</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Vue from 'vue' | ||
import App from '~entry' | ||
import plugin from '../src/index' | ||
|
||
Vue.use(plugin) | ||
|
||
Vue.config.productionTip = false | ||
|
||
new Vue({ | ||
// NOTE: if you need to inject as option, you can set here! | ||
// plugin, | ||
render: h => h(App) | ||
}).$mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module.exports = { | ||
plugins: [ | ||
require('./plugin.js') | ||
], | ||
locales: { | ||
'/': { | ||
lang: 'en-US', | ||
title: 'VoicenterEventsSdk', | ||
description: 'VoicenterEventsSdk for Vue.js' | ||
} | ||
}, | ||
themeConfig: { | ||
repo: '/voicenter-events-sdk', | ||
docsDir: 'docs', | ||
locales: { | ||
'/': { | ||
label: 'English', | ||
selectText: 'Languages', | ||
editLinkText: 'Edit this page on GitHub', | ||
nav: [{ | ||
text: 'Release Notes', | ||
link: 'https://github.com//voicenter-events-sdk/releases' | ||
}], | ||
sidebar: [ | ||
'/installation.md', | ||
'/started.md', | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { version } = require('../../package.json') | ||
|
||
module.exports = (/*options, ctx*/) => ({ | ||
async enhanceAppFiles () { | ||
const code = `export default ({ Vue }) => { | ||
Vue.mixin({ | ||
computed: { | ||
$version () { | ||
return '${version}' | ||
} | ||
} | ||
}) | ||
}` | ||
return [{ | ||
name: 'vuepress-plugin-vue-cli-plugin-p11n', | ||
content: code | ||
}] | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Introduction | ||
|
||
`VoicenterEventsSdk` | ||
|
||
[Get started](./started/) or play with the [demo](https://github.com//voicenter-events-sdk/tree/dev/demo) (see [`README.md`](https://github.com//voicenter-events-sdk/) to run them). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Installation | ||
|
||
## Direct Download / CDN | ||
|
||
https://unpkg.com/voicenter-events-sdk/dist/voicenter-events-sdk | ||
|
||
[unpkg.com](https://unpkg.com) provides NPM-based CDN links. The above link will always point to the latest release on NPM. You can also use a specific version/tag via URLs like https://unpkg.com/voicenter-events-sdk@{{ $version }}/dist/voicenter-events-sdk.js | ||
|
||
Include voicenter-events-sdk after Vue and it will install itself automatically: | ||
|
||
```html | ||
<script src="https://unpkg.com/voicenter-events-sdk/dist/voicenter-events-sdk.js"></script> | ||
``` | ||
|
||
## NPM | ||
|
||
```sh | ||
$ npm install voicenter-events-sdk | ||
``` | ||
|
||
## Yarn | ||
|
||
```sh | ||
$ yarn add voicenter-events-sdk | ||
``` | ||
|
||
```javascript | ||
import VoicenterEventsSDK from 'voicenter-events-sdk' | ||
``` | ||
|
||
You don't need to do this when using global script tags. | ||
|
||
## Dev Build | ||
|
||
You will have to clone directly from GitHub and build `voicenter-events-sdk` yourself if | ||
you want to use the latest dev build. | ||
|
||
```sh | ||
$ git clone https://github.com//voicenter-events-sdk.git node_modules/voicenter-events-sdk | ||
$ cd node_modules/voicenter-events-sdk | ||
$ npm install | ||
$ npm run build | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Getting Started | ||
|
||
> We will be using [ES2015](https://github.com/lukehoban/es6features) in the code samples in the guide. | ||
|
||
## HTML | ||
|
||
```html | ||
<script src="https://unpkg.com/voicenter-events-sdk/dist/voicenter-events-sdk.js"></script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
{ | ||
"name": "voicenter-sdk", | ||
"name": "voicenter-events-sdk", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
"serve": "vue-cli-service serve ./demo/main.js", | ||
"build": "vue-cli-service build --target lib --name voicenter-events-sdk src/index.js", | ||
"build:demo": "vue-cli-service build ./demo/main.js", | ||
"lint": "vue-cli-service lint", | ||
"docs": "npm run docs:serve", | ||
"docs:build": "vue-cli-service docs --mode build", | ||
"docs:serve": "vue-cli-service docs --mode serve", | ||
"prepublish": "vue-cli-service lint && vue-cli-service docs --mode build && vue-cli-service build", | ||
"start": "vue-cli-service serve" | ||
}, | ||
"dependencies": { | ||
"core-js": "^2.6.5", | ||
"vue": "^2.6.10" | ||
"core-js": "^2.6.5" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "^3.8.0", | ||
"@vue/cli-plugin-eslint": "^3.8.0", | ||
"@vue/cli-service": "^3.8.0", | ||
"@vue/eslint-config-airbnb": "^4.0.0", | ||
"babel-eslint": "^10.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-plugin-vue": "^5.0.0", | ||
"vue-template-compiler": "^2.6.10" | ||
} | ||
"vue-cli-plugin-p11n": "^0.3.0", | ||
"vue-template-compiler": "^2.6.10", | ||
"vue": "^2.6.10" | ||
}, | ||
"files": [ | ||
"dist/voicenter-events-sdk.common.js", | ||
"dist/voicenter-events-sdk.umd.min.js", | ||
"dist/voicenter-events-sdk.umd.js", | ||
"dist/voicenter-events-sdk.esm.js", | ||
"src" | ||
], | ||
"jsdelivr": "dist/voicenter-events-sdk.umd.min.js", | ||
"main": "dist/voicenter-events-sdk.common.js", | ||
"module": "dist/voicenter-events-sdk.esm.js", | ||
"sideeffects": false, | ||
"unpkg": "dist/voicenter-events-sdk.umd.min.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const version = '__VERSION__' | ||
const sdk = { | ||
msg: 'hello' | ||
} | ||
|
||
export default sdk | ||
|
||
if (typeof window !== 'undefined') { | ||
// Make it available on window | ||
window.voicenteEventsSDK = sdk | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.