Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed May 4, 2017
1 parent 6f47a5d commit 7349d37
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ All postcards are published [on our website](https://spatie.be/opensource/postca
You can install the package via yarn:

```bash
$ yarn add vue-tabs
$ yarn add @spatie/vue-tabs
```

## Usage
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"jsnext:main": "src/index.js",
"scripts": {
"build": "jest babel src -d dist",
"build": "rm -rf dist && NODE_ENV=production webpack --config webpack.dist.js",
"lint": "eslint --fix src __tests__; exit 0",
"prepublish": "npm run test; npm run build",
"test": "jest"
Expand All @@ -30,6 +30,7 @@
"babel-cli": "^6.9.0",
"babel-plugin-transform-object-rest-spread": "^6.16.0",
"babel-preset-es2015": "^6.9.0",
"babel-loader": "^7.0.0",
"eslint": "^3.7.1",
"eslint-config-spatie": "^1.1.0",
"jest": "^19.0.0",
Expand All @@ -49,8 +50,5 @@
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/jest-vue-preprocessor"
}
},
"dependencies": {
"avoriaz": "^1.11.2"
}
}
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Tabs from './components/Tabs';
import Tab from './components/Tab';

export { Tabs, Tab };
18 changes: 18 additions & 0 deletions webpack.base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
module: {
loaders: [
{
test: /\.vue$/,
loaders: ['vue'],
},
{
test: /\.js/,
loaders: ['babel-loader'],
exclude: ['node_modules'],
},
],
},
resolve: {
extensions: ['.js', '.vue'],
},
};
22 changes: 22 additions & 0 deletions webpack.dist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const path = require('path');
const config = Object.assign({}, require('./webpack.base'));

config.context = __dirname;

config.entry = './src/index.js';

config.output = {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
library: 'vue-tabs',
libraryTarget: 'umd',
};

config.externals = {
'vue': 'vue',
'lodash': 'lodash',
'spatie-dom': 'spatie-dom',
'@spatie/blender-media': '@spatie/blender-media',
};

module.exports = config;

0 comments on commit 7349d37

Please sign in to comment.