Skip to content

Commit 8d9f944

Browse files
PessimistressXiaoji Chen
authored andcommitted
Switch dev setup to use ocular-dev-tools (aurora-opensource#312)
1 parent 52b8e2c commit 8d9f944

33 files changed

+2331
-3098
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ steps:
1818
queue: private-default
1919

2020
- name: ":node:"
21-
command: "node test/start"
21+
command: "yarn test cover && cat coverage/lcov.info | coveralls"
2222
plugins:
2323
docker-compose#v1.5.2:
2424
run: streetscape
2525
agents:
2626
queue: private-default
2727

2828
- name: ":chrome:"
29-
command: "sh /etc/init.d/xvfb && yarn test-browser"
29+
command: "sh /etc/init.d/xvfb && yarn test browser"
3030
plugins:
3131
docker-compose#v1.5.2:
3232
run: streetscape

.nycrc

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
{
2-
"all": true,
3-
"sourceMap": false,
4-
"instrument": false,
5-
"include": [
6-
"modules/core/src/index.js",
7-
"modules/core/src/**/*.js"
8-
],
9-
"exclude": [
10-
"test/**/*.js"
11-
]
12-
}
2+
"extends": "node_modules/ocular-dev-tools/templates/.nycrc"
3+
}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ All notable changes to XVIZ will be documented in this file. This project adhere
1717

1818
- Upgrade to deck.gl 6.4.10 (#300)
1919
- Add URL passing to the XVIZ Loaders (#285)
20-
- Add backing missing error handler _onWSError (#295)
20+
- Add backing missing error handler \_onWSError (#295)
2121
- flip signs (#290)
2222

2323
## [1.0.0-beta.5]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV PATH /streetscape/node_modules/.bin:$PATH
1212
ENV DISPLAY :99
1313

1414
RUN apt-get update
15-
RUN apt-get -y install libxi-dev libgl1-mesa-dev xvfb
15+
RUN apt-get -y install libxi-dev libgl1-mesa-dev xvfb jq
1616

1717
ADD .buildkite/xvfb /etc/init.d/xvfb
1818
RUN chmod a+x /etc/init.d/xvfb

babel.config.js

Lines changed: 15 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,26 @@
11
// Copyright (c) 2019 Uber Technologies, Inc.
22
//
3-
// Permission is hereby granted, free of charge, to any person obtaining a copy
4-
// of this software and associated documentation files (the "Software"), to deal
5-
// in the Software without restriction, including without limitation the rights
6-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7-
// copies of the Software, and to permit persons to whom the Software is
8-
// furnished to do so, subject to the following conditions:
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
96
//
10-
// The above copyright notice and this permission notice shall be included in
11-
// all copies or substantial portions of the Software.
7+
// http://www.apache.org/licenses/LICENSE-2.0
128
//
13-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
// THE SOFTWARE.
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
const getBabelConfig = require('ocular-dev-tools/config/babel.config');
2015

21-
const TARGETS = {
22-
"chrome": "60",
23-
"edge": "15",
24-
"firefox": "53",
25-
"ios": "10.3",
26-
"safari": "10.1",
27-
"node": "8"
28-
};
29-
30-
const CONFIG = {
31-
default: {
32-
"presets": [
33-
[ "@babel/env", {
34-
"targets": TARGETS
35-
}],
36-
"@babel/react"
37-
],
38-
"plugins": [
39-
"version-inline",
40-
"@babel/proposal-class-properties"
41-
],
42-
}
43-
};
44-
45-
CONFIG.es6 = Object.assign({}, CONFIG.default, {
46-
"presets": [
47-
[ "@babel/env", {
48-
"targets": TARGETS,
49-
"modules": false
50-
}],
51-
"@babel/react"
52-
]
53-
});
16+
module.exports = api => {
17+
const config = getBabelConfig(api);
5418

55-
CONFIG.esm = Object.assign({}, CONFIG.default, {
56-
"presets": [
57-
[ "@babel/env", {
58-
"modules": false
59-
}],
60-
"@babel/react"
61-
]
62-
});
19+
config.presets.push('@babel/react');
6320

64-
CONFIG.es5 = Object.assign({}, CONFIG.default, {
65-
"presets": [
66-
[ "@babel/env", {
67-
"modules": "commonjs"
68-
}],
69-
"@babel/react"
70-
],
71-
});
21+
config.plugins = config.plugins || [];
7222

73-
CONFIG.cover = Object.assign({}, CONFIG.default);
74-
CONFIG.cover.plugins = CONFIG.cover.plugins.concat(['istanbul']);
23+
config.plugins.push('version-inline', '@babel/proposal-class-properties');
7524

76-
module.exports = function getConfig(api) {
77-
78-
// eslint-disable-next-line
79-
var env = api.cache(() => process.env.BABEL_ENV || process.env.NODE_ENV);
80-
81-
const config = CONFIG[env] || CONFIG.default;
82-
// Uncomment to debug
83-
console.error(env, config.plugins);
8425
return config;
8526
};
86-
87-
module.exports.config = CONFIG.es6;

docs/api-reference/log-viewer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ Callback when the canvas is right clicked on. Will receive the following argumen
179179

180180
Callback when deck.gl is initialized. Will receive the following arguments:
181181

182-
- `deck` (Object) - a deck.gl [Deck](http://deck.gl/#/documentation/deckgl-api-reference/deck) instance.
182+
- `deck` (Object) - a deck.gl [Deck](http://deck.gl/#/documentation/deckgl-api-reference/deck)
183+
instance.
183184

184185
##### onMapLoad (Function, optional)
185186

modules/core/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# @streetscape.gl/core
22

3-
The loaders and core rendering components of streetscape.gl, a visualizaton toolkit for 3D maps and autonomous XVIZ protocol data.
3+
The loaders and core rendering components of streetscape.gl, a visualizaton toolkit for 3D maps and
4+
autonomous XVIZ protocol data.
45

56
[Home](https://avs.auto)

modules/core/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
"README.md"
1616
],
1717
"scripts": {
18-
"clean": "rm -fr dist && mkdir -p dist",
19-
"build-es6": "BABEL_ENV=es6 babel src --config-file ../../babel.config.js --out-dir dist/es6 --source-maps --ignore 'node_modules/'",
20-
"build-esm": "BABEL_ENV=esm babel src --config-file ../../babel.config.js --out-dir dist/esm --source-maps --ignore 'node_modules/'",
21-
"build-es5": "BABEL_ENV=es5 babel src --config-file ../../babel.config.js --out-dir dist/es5 --source-maps --ignore 'node_modules/'",
22-
"build": "npm run clean && npm run build-es6 && npm run build-esm && npm run build-es5"
2318
},
2419
"dependencies": {
2520
"@deck.gl/core": "^7.0.4",

modules/core/src/loaders/xviz-websocket-loader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,4 @@ export default class XVIZWebsocketLoader extends XVIZLoaderInterface {
167167
_onWSError = event => {
168168
this._debug('socket_error', event);
169169
};
170-
171170
}

modules/layers/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# @streetscape.gl/layers
22

3-
Additional [deck.gl](http://deck.gl) map layers for streetscape.gl, a visualizaton toolkit for 3D maps and autonomous XVIZ protocol data.
3+
Additional [deck.gl](http://deck.gl) map layers for streetscape.gl, a visualizaton toolkit for 3D
4+
maps and autonomous XVIZ protocol data.
45

56
[Home](https://avs.auto)

0 commit comments

Comments
 (0)