-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mwieser
committed
May 11, 2018
0 parents
commit 566dddf
Showing
17 changed files
with
10,596 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
["env", { "modules": false }], | ||
"stage-3" | ||
] | ||
} |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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,2 @@ | ||
/build/ | ||
/dist/ |
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,50 @@ | ||
// https://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention | ||
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. | ||
extends: ['plugin:vue/essential', 'airbnb-base'], | ||
// required to lint *.vue files | ||
plugins: [ | ||
'vue' | ||
], | ||
// check if imports actually resolve | ||
settings: { | ||
'import/resolver': { | ||
webpack: { | ||
config: 'build/webpack.base.conf.js' | ||
} | ||
} | ||
}, | ||
// add your custom rules here | ||
rules: { | ||
// don't require .vue extension when importing | ||
'import/extensions': ['error', 'always', { | ||
js: 'never', | ||
vue: 'never' | ||
}], | ||
// disallow reassignment of function parameters | ||
// disallow parameter object manipulation except for specific exclusions | ||
'no-param-reassign': ['error', { | ||
props: true, | ||
ignorePropertyModificationsFor: [ | ||
'state', // for vuex state | ||
'acc', // for reduce accumulators | ||
'e' // for e.returnvalue | ||
] | ||
}], | ||
// allow optionalDependencies | ||
'import/no-extraneous-dependencies': ['error', { | ||
optionalDependencies: ['test/unit/index.js'] | ||
}], | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
} | ||
} |
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 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
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,8 @@ | ||
The MIT License (MIT) | ||
Copyright © 2018 Manuel Wieser | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# vue-dictaphone | ||
|
||
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.me/manuninja) | ||
|
||
🎙️ Vue.js dictaphone component to record audio from the user | ||
|
||
--- | ||
|
||
## Installation | ||
|
||
``` | ||
npm install --save vue-dictaphone | ||
``` | ||
|
||
``` | ||
yarn add vue-dictaphone | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
import VueDictaphone from "vue-dictaphone"; | ||
Vue.use(VueDictaphone); | ||
``` | ||
|
||
```js | ||
import { VueDictaphone } from "vue-dictaphone"; | ||
export default { | ||
// ... | ||
components: { | ||
VueDictaphone | ||
} | ||
// ... | ||
}; | ||
``` | ||
|
||
```html | ||
<vue-dictaphone/> | ||
``` | ||
|
||
## Author | ||
|
||
Manuel Wieser | ||
<https://manu.ninja/> | ||
<https://twitter.com/manuelwieser> | ||
<https://www.paypal.me/manuninja> |
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,51 @@ | ||
const path = require('path'); | ||
const formatter = require('eslint-friendly-formatter'); | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|vue)$/, | ||
exclude: /node_modules/, | ||
loader: 'eslint-loader', | ||
enforce: 'pre', | ||
options: { | ||
formatter, | ||
}, | ||
}, | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: { | ||
loaders: { | ||
scss: [ | ||
'vue-style-loader', | ||
'css-loader', | ||
'sass-loader', | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
exclude: /node_modules/, | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|svg)$/, | ||
loader: 'file-loader', | ||
options: { | ||
name: '[name].[ext]?[hash]', | ||
}, | ||
}, | ||
], | ||
}, | ||
|
||
resolve: { | ||
alias: { | ||
vue$: 'vue/dist/vue.esm.js', | ||
'@': path.resolve(__dirname, '../src'), | ||
}, | ||
extensions: ['.js', '.vue'], | ||
}, | ||
}; |
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,28 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const merge = require('webpack-merge'); | ||
|
||
module.exports = merge(require('./webpack.base.conf'), { | ||
context: __dirname, | ||
entry: '../src/example/main.js', | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
publicPath: '/dist/', | ||
filename: 'build.js', | ||
}, | ||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NamedModulesPlugin(), | ||
], | ||
devServer: { | ||
historyApiFallback: true, | ||
hot: true, | ||
noInfo: true, | ||
open: true, | ||
overlay: true, | ||
}, | ||
devtool: '#eval-source-map', | ||
performance: { | ||
hints: false, | ||
}, | ||
}); |
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,37 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const merge = require('webpack-merge'); | ||
|
||
module.exports = merge(require('./webpack.base.conf'), { | ||
entry: { | ||
index: path.resolve(__dirname, '../src/index.js'), | ||
'index.min': path.resolve(__dirname, '../src/index.js'), | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
filename: '[name].js', | ||
library: 'VueDictaphone', | ||
libraryTarget: 'umd', | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"', | ||
}, | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
sourceMap: true, | ||
compress: { | ||
warnings: false, | ||
}, | ||
}), | ||
new webpack.LoaderOptionsPlugin({ | ||
minimize: true, | ||
}), | ||
], | ||
devtool: '#source-map', | ||
externals: ['vue'], | ||
stats: { | ||
modules: false, | ||
}, | ||
}); |
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>vue-dictaphone</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="/dist/build.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.