Skip to content

Commit 5038443

Browse files
committed
2.2.0
1 parent a2c31f6 commit 5038443

File tree

6 files changed

+134
-91
lines changed

6 files changed

+134
-91
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Input field component to display a formatted currency value based on [Vue](https
1717

1818
### Install via CDN
1919
```html
20+
<script src="https://unpkg.com/accounting-js"></script>
2021
<script src="https://unpkg.com/vue"></script>
2122
<script src="https://unpkg.com/vue-numeric"></script>
2223

dist/vue-numeric.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ <h1 class="title is-4">
124124
</footer>
125125
</div>
126126

127+
<script src="https://unpkg.com/accounting-js"></script>
127128
<script src="https://unpkg.com/vue"></script>
128129
<script src="https://unpkg.com/vue-numeric"></script>
129130

package.json

+26-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-numeric",
3-
"version": "2.1.2",
3+
"version": "2.2.0",
44
"description": "Input field component to display currency value based on Vue.",
55
"author": "Kevin Ongko",
66
"main": "dist/vue-numeric.min.js",
@@ -28,8 +28,8 @@
2828
"accounting-js": "^1.1.1"
2929
},
3030
"scripts": {
31-
"test": "./node_modules/.bin/karma start test/karma.config.js",
32-
"test:watch": "./node_modules/.bin/karma start test/karma.config.js --single-run=false",
31+
"test": "cross-env BABEL_ENV=test ./node_modules/.bin/karma start test/karma.config.js",
32+
"test:watch": "cross-env BABEL_ENV=test ./node_modules/.bin/karma start test/karma.config.js --single-run=false",
3333
"lint": "./node_modules/.bin/eslint --ext .js,.vue src spec",
3434
"build": "./node_modules/.bin/webpack --hide-modules -p --progress",
3535
"report-coverage": "codecov"
@@ -39,10 +39,11 @@
3939
"babel-core": "^6.26.0",
4040
"babel-loader": "^7.1.2",
4141
"babel-plugin-istanbul": "^4.1.4",
42-
"babel-preset-latest": "^6.24.1",
42+
"babel-preset-env": "^1.6.0",
4343
"chai": "^4.1.2",
4444
"clean-webpack-plugin": "^0.1.16",
4545
"codecov": "^2.3.0",
46+
"cross-env": "^5.0.5",
4647
"css-loader": "^0.28.7",
4748
"eslint": "^4.6.0",
4849
"eslint-plugin-vue": "3.12.0",
@@ -65,11 +66,28 @@
6566
},
6667
"babel": {
6768
"presets": [
68-
"latest"
69+
[
70+
"env",
71+
{
72+
"uglify": true,
73+
"modules": false,
74+
"targets": {
75+
"browsers": [
76+
"> 1%",
77+
"last 2 versions",
78+
"not ie <= 8"
79+
]
80+
}
81+
}
82+
]
6983
],
70-
"plugins": [
71-
"istanbul"
72-
]
84+
"env": {
85+
"test": {
86+
"plugins": [
87+
"istanbul"
88+
]
89+
}
90+
}
7391
},
7492
"eslintConfig": {
7593
"extends": [

webpack.config.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,34 @@ module.exports = {
1616
extensions: ['.js', '.json', '.vue']
1717
},
1818
entry: './src/index.js',
19+
externals: {
20+
'accounting-js': 'accounting'
21+
},
1922
output: {
2023
path: path.resolve(__dirname, 'dist'),
2124
filename: "vue-numeric.min.js",
2225
library: 'VueNumeric',
2326
libraryTarget: 'umd',
24-
umdNamedDefine: true,
27+
umdNamedDefine: true
2528
},
2629
module: {
2730
rules: [
2831
{
2932
test: /\.vue$/,
30-
loader: 'vue-loader',
33+
loader: 'vue-loader'
3134
},
3235
{
3336
test: /\.js$/,
3437
loader: 'babel-loader',
35-
exclude: path.resolve(__dirname, 'node_modules'),
36-
},
38+
exclude: path.resolve(__dirname, 'node_modules')
39+
}
3740
]
3841
},
3942
plugins: [
40-
new CleanWebpackPlugin(['./dist']),
43+
new CleanWebpackPlugin(['./dist'])
4144
],
4245
devtool: false,
4346
performance: {
44-
hints: false,
47+
hints: false
4548
}
4649
}

0 commit comments

Comments
 (0)