Skip to content

Commit d26ccfe

Browse files
author
Omar Shehata
authored
Merge pull request #8192 from AnalyticalGraphicsInc/es6-staging
Update Cesium to ES6 modules
2 parents de92ad6 + aabd27a commit d26ccfe

File tree

1,535 files changed

+19127
-36317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,535 files changed

+19127
-36317
lines changed

.appveyor.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ install:
1313
- npm install
1414

1515
test_script:
16-
- npm --silent run build
17-
- npm --silent run test -- --browsers IE --webgl-stub --suppressPassed
16+
- npm --silent run minifyRelease
17+
- npm --silent run build-specs
18+
- npm --silent run test -- --browsers IE --webgl-stub --release --suppressPassed
1819

1920
# Don't actually build.
2021
build: off

.eslintignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ Build/**
44
Documentation/**
55
Source/Shaders/**
66
Source/ThirdParty/**
7-
Source/Workers/cesiumWorkerBootstrapper.js
7+
Source/Workers/**
8+
!Source/Workers/transferTypedArrayTest.js
89
ThirdParty/**
910
Tools/**
1011
Apps/Sandcastle/jsHintOptions.js
1112
Apps/Sandcastle/gallery/gallery-index.js
13+
Source/Core/buildModuleUrl.js
14+
Specs/spec-main.js

.eslintrc.json

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,18 @@
55
],
66
"rules": {
77
"no-unused-vars": ["error", {"vars": "all", "args": "none"}]
8-
}
8+
},
9+
"overrides": [
10+
{
11+
"files": [
12+
"index.js",
13+
"server.js",
14+
"gulpfile.js",
15+
"Source/Workers/transferTypedArrayTest.js"
16+
],
17+
"parserOptions": {
18+
"sourceType": "script"
19+
}
20+
}
21+
]
922
}

.gitignore

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Thumbs.db
1414

1515
/Source/Cesium.js
1616

17-
/Source/Shaders/*.js
18-
/Source/Shaders/*/*.js
19-
/Source/Shaders/*/*/*.js
20-
/Source/ThirdParty/Shaders/*.js
21-
2217
/Specs/SpecList.js
18+
/Source/Shaders/**/*.js
19+
/Source/ThirdParty/Shaders/**/*.js
20+
/Source/Workers/**
21+
!/Source/Workers/cesiumWorkerBootstrapper.js
22+
!/Source/Workers/transferTypedArrayTest.js
2323

2424
/node_modules
2525
npm-debug.log

.npmignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
/.travis.yml
1212
/.vscode
1313
/Apps
14+
/Build/Apps
1415
/Build/Coverage
1516
/Build/minifyShaders.state
16-
/Build/Stubs
1717
/Build/Documentation
18+
/Build/Specs
1819
/Cesium-*.zip
1920
/Documentation
2021
/favicon.ico
@@ -24,7 +25,6 @@
2425
/launches
2526
/server.js
2627
/Source/copyrightHeader.js
27-
/Source/main.js
2828
/Specs
2929
/ThirdParty
3030
/Tools

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ script:
2626
- npm --silent run deploy-s3 -- -b cesium-dev -d cesium/$TRAVIS_BRANCH --confirm -c 'no-cache'
2727
- npm --silent run deploy-status -- --status success --message Deployed
2828

29+
- npm --silent run build-specs
2930
- npm --silent run test -- --browsers ChromeCI --failTaskOnError --webgl-stub --release --suppressPassed
3031

3132
# Various Node.js smoke-screen tests

Apps/CesiumViewer/CesiumViewer.js

+21-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
1-
define([
2-
'Cesium/Core/Cartesian3',
3-
'Cesium/Core/createWorldTerrain',
4-
'Cesium/Core/defined',
5-
'Cesium/Core/formatError',
6-
'Cesium/Core/Math',
7-
'Cesium/Core/objectToQuery',
8-
'Cesium/Core/queryToObject',
9-
'Cesium/DataSources/CzmlDataSource',
10-
'Cesium/DataSources/GeoJsonDataSource',
11-
'Cesium/DataSources/KmlDataSource',
12-
'Cesium/Scene/TileMapServiceImageryProvider',
13-
'Cesium/Widgets/Viewer/Viewer',
14-
'Cesium/Widgets/Viewer/viewerCesiumInspectorMixin',
15-
'Cesium/Widgets/Viewer/viewerDragDropMixin',
16-
'domReady!'
17-
], function(
18-
Cartesian3,
19-
createWorldTerrain,
20-
defined,
21-
formatError,
22-
CesiumMath,
23-
objectToQuery,
24-
queryToObject,
25-
CzmlDataSource,
26-
GeoJsonDataSource,
27-
KmlDataSource,
28-
TileMapServiceImageryProvider,
29-
Viewer,
30-
viewerCesiumInspectorMixin,
31-
viewerDragDropMixin) {
32-
'use strict';
33-
1+
import {
2+
Cartesian3,
3+
createWorldTerrain,
4+
defined,
5+
formatError,
6+
Math as CesiumMath,
7+
objectToQuery,
8+
queryToObject,
9+
CzmlDataSource,
10+
GeoJsonDataSource,
11+
KmlDataSource,
12+
TileMapServiceImageryProvider,
13+
Viewer,
14+
viewerCesiumInspectorMixin,
15+
viewerDragDropMixin
16+
} from '../../Source/Cesium.js';
17+
18+
function main() {
3419
/*
3520
Options parsed from query string:
3621
source=url The URL of a CZML/GeoJSON/KML data source to load at startup.
@@ -218,4 +203,6 @@ define([
218203
}
219204

220205
loadingIndicator.style.display = 'none';
221-
});
206+
}
207+
208+
main();

Apps/CesiumViewer/CesiumViewerStartup.js

-11
This file was deleted.

Apps/CesiumViewer/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<title>Cesium Viewer</title>
1111
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
1212
<link rel="stylesheet" href="CesiumViewer.css" media="screen">
13-
<script data-main="CesiumViewerStartup" src="../../ThirdParty/requirejs-2.1.20/require.js"></script>
1413
</head>
1514
<body style="background: #000;">
1615
<div id="cesiumContainer" class="fullWindow"></div>
1716
<div id="loadingIndicator" class="loadingIndicator"></div>
17+
<script src="CesiumViewer.js" type="module"></script>
1818
</body>
1919
</html>

Apps/Sandcastle/.eslintrc.json

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
11
{
22
"extends": "../../.eslintrc.json",
3+
"env": {
4+
"amd": true
5+
},
36
"globals": {
47
"JSON": true,
58
"require": true,
69
"console": true,
710
"Sandcastle": true,
811
"Cesium": true
912
},
13+
"parserOptions": {
14+
"ecmaVersion": 5,
15+
"sourceType": "script"
16+
},
1017
"rules": {
1118
"no-alert": ["off"],
1219
"no-implicit-globals": "off",
1320
"no-unused-vars": ["off"],
1421
"quotes": "off"
15-
}
22+
},
23+
"overrides": [
24+
{
25+
"files": [
26+
"load-cesium-es6.js"
27+
],
28+
"parserOptions": {
29+
"ecmaVersion": 2015,
30+
"sourceType": "module"
31+
}
32+
}
33+
]
1634
}

0 commit comments

Comments
 (0)