Skip to content

Commit

Permalink
Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mwieser committed May 11, 2018
0 parents commit 566dddf
Show file tree
Hide file tree
Showing 17 changed files with 10,596 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
["env", { "modules": false }],
"stage-3"
]
}
9 changes: 9 additions & 0 deletions .editorconfig
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/
/dist/
50 changes: 50 additions & 0 deletions .eslintrc.js
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'
}
}
11 changes: 11 additions & 0 deletions .gitignore
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
8 changes: 8 additions & 0 deletions LICENSE
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.
46 changes: 46 additions & 0 deletions README.md
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>
51 changes: 51 additions & 0 deletions build/webpack.base.conf.js
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'],
},
};
28 changes: 28 additions & 0 deletions build/webpack.dev.conf.js
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,
},
});
37 changes: 37 additions & 0 deletions build/webpack.prod.conf.js
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,
},
});
11 changes: 11 additions & 0 deletions index.html
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>
Loading

0 comments on commit 566dddf

Please sign in to comment.