Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f8a894

Browse files
committed
update ci
1 parent b42f3a6 commit 1f8a894

4 files changed

Lines changed: 31 additions & 4 deletions

File tree

‎.travis.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ deploy:
2626
skip_cleanup: true
2727
github_token: ${GH_TOKEN} # Set in travis-ci.org dashboard
2828
local_dir: public
29+
branch: master
2930
repo: $GH_REF
3031

3132
env:

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "dist/core/index.js",
77
"scripts": {
88
"client": "gojs src/client -i index.js -p 9999",
9-
"client:build": "cd src/client && gojs -b index.js && mv .dist/ ../../public",
9+
"client:build": "cd src/client && gojs -b index.js && rimraf ../../public && mv .dist ../../public",
1010
"test": "jest",
1111
"test:cover": "jest --coverage",
1212
"babel": "rimraf dist && babel src -d dist -D --ignore=**/*.test.js",

‎src/client/gojs.jsloader.js‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,33 @@ module.exports = [
1515
],
1616
exclude: [/([\/\\])node_modules\1(core-js|babel-runtime)\1/],
1717
query: {
18-
cacheDirectory: true
18+
"presets": [
19+
[
20+
"env",
21+
{
22+
"targets": {
23+
"node": "6",
24+
"browsers": ["ie>=9"]
25+
},
26+
"loose": true,
27+
"useBuiltIns": true
28+
}
29+
],
30+
"react"
31+
],
32+
"plugins": [
33+
"lodash",
34+
"transform-decorators-legacy",
35+
"transform-class-properties",
36+
"transform-object-rest-spread",
37+
[
38+
"transform-runtime",
39+
{
40+
"polyfill": false,
41+
"regenerator": true
42+
}
43+
]
44+
]
1945
},
2046
happy: { id: 'js' }
2147
}, {

‎src/core/utils/helper.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @date 2018/2/26
55
* @description
66
*/
7-
import _ from 'lodash'
7+
import each from 'lodash/each'
88

99
export function eachIterator(it, action) {
1010
let next, i = 0
@@ -27,7 +27,7 @@ export function isPrimitive(arg) {
2727
}
2828

2929
export function deepEach(obj, action) {
30-
_.each(obj, function (val) {
30+
each(obj, function (val) {
3131
action.apply(this, [...arguments].concat(obj))
3232
if (!isPrimitive(val)) {
3333
deepEach(val, action)

0 commit comments

Comments
 (0)