Skip to content

Commit 4af8313

Browse files
committed
Fixed: decrease bundle size
* Updated: dev deps * Fixed: bundle size is decreased
1 parent 2865059 commit 4af8313

9 files changed

+67
-61
lines changed

.travis.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
language: node_js
22
node_js:
3-
- 10
3+
- 12
44
cache:
55
directories:
6-
- node_modules
7-
script:
8-
- npm run test:unit
9-
- npm run build
10-
after_script:
11-
- cat ./coverage/lcov.info | coveralls
12-
deploy:
13-
provider: pages
14-
skip_cleanup: true
15-
github_token: $GITHUB_TOKEN
16-
local_dir: dist
17-
on:
18-
branch: master
6+
- '$HOME/.npm'
7+
jobs:
8+
include:
9+
- stage: testing
10+
if: branch in (master, dev)
11+
script: # if this is not set, it will run npm run test
12+
- npm ci
13+
- npm run test:unit
14+
- npm run build
15+
- npm run build:lib
16+
after_success: # after test is run
17+
- cat ./coverage/lcov.info | coveralls
18+
- stage: release
19+
# only release on master branch with specific commit message (generated by npm version)
20+
if: branch = master AND commit_message =~ /^[0-9]*\.[0-9]*\.[0-9]*$/
21+
before_deploy:
22+
- npm run build
23+
- npm run build:lib
24+
deploy:
25+
- provider: npm
26+
email: '$NPM_EMAIL'
27+
api_key: '$NPM_TOKEN'
28+
skip_cleanup: true
29+
- provider: pages
30+
skip_cleanup: true
31+
github_token: $GITHUB_TOKEN
32+
local_dir: dist
33+
on:
34+
branch: master

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.7] - 2020-02-22
11+
12+
### Fixed
13+
14+
- Decrease bundle size
15+
1016
## [1.0.6] - 2019-08-29
1117

1218
### Fixed

babel.config.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
const presets = [
2+
[
3+
'@vue/babel-preset-app',
4+
{
5+
useBuiltIns: process.env.NODE_ENV === 'production' ? false : 'usage'
6+
}
7+
]
8+
];
9+
10+
if (process.env.NODE_ENV === 'production')
11+
presets.unshift([
12+
'minify',
13+
{
14+
builtIns: false
15+
}
16+
]);
17+
118
module.exports = {
2-
presets: ["@vue/app"]
19+
presets,
20+
plugins: ['transform-vue-jsx', '@babel/plugin-transform-runtime']
321
};

build/vue-number-input.common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/vue-number-input.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/vue-number-input.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"main": "./build/vue-number-input.common.js",
55
"unpkg": "./build/vue-number-input.umd.min.js",
66
"files": [
7-
"build/*",
8-
"build/*.json",
97
"build/*.js"
108
],
119
"description": "Vue number input component with great accessibility: ARIA, control by keyboard and wheel",
@@ -39,12 +37,14 @@
3937
},
4038
"scripts": {
4139
"serve": "vue-cli-service serve",
42-
"build": "vue-cli-service build",
40+
"build": "cross-env NODE_ENV=build vue-cli-service build",
4341
"lint": "vue-cli-service lint",
4442
"test:unit": "vue-cli-service test:unit --verbose",
45-
"lib": "cross-env NODE_ENV=production vue-cli-service build --mode production -g envify --target lib --name vue-number-input ./src/components/wrapper.js --dest ./build"
43+
"build:lib": "cross-env NODE_ENV=production vue-cli-service build --mode production -g envify --target lib --name vue-number-input ./src/components/wrapper.js --dest ./build"
4644
},
4745
"devDependencies": {
46+
"@babel/plugin-transform-runtime": "^7.8.3",
47+
"@vue/babel-preset-app": "^4.2.2",
4848
"@vue/cli-plugin-babel": "^3.11.0",
4949
"@vue/cli-plugin-eslint": "^3.11.0",
5050
"@vue/cli-plugin-unit-jest": "^3.11.0",
@@ -53,7 +53,12 @@
5353
"@vue/test-utils": "1.0.0-beta.29",
5454
"babel-core": "7.0.0-bridge.0",
5555
"babel-eslint": "^10.0.1",
56+
"babel-helper-vue-jsx-merge-props": "^2.0.3",
5657
"babel-jest": "^23.6.0",
58+
"babel-plugin-syntax-jsx": "^6.18.0",
59+
"babel-plugin-transform-vue-jsx": "^3.7.0",
60+
"babel-preset-env": "^1.7.0",
61+
"babel-preset-minify": "^0.5.1",
5762
"core-js": "^2.6.5",
5863
"coveralls": "^3.0.6",
5964
"cross-env": "^5.2.0",
9.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)