Skip to content

Commit aaf6bd8

Browse files
author
Sanjeet Suhag
committed
Adds engine and widgets workspaces
1 parent e7987bb commit aaf6bd8

File tree

2,141 files changed

+5018
-2412
lines changed

Some content is hidden

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

2,141 files changed

+5018
-2412
lines changed

.eslintignore

+15-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@ Apps/HelloWorld.html
22
Apps/Sandcastle/ThirdParty/**
33
Build/**
44
Documentation/**
5-
Source/Scene/GltfPipeline/**
6-
Source/Shaders/**
7-
Source/ThirdParty/**
8-
Source/Workers/**
9-
!Source/Workers/transferTypedArrayTest.js
5+
Source/**
106
Specs/jasmine/**
117
ThirdParty/**
128
Tools/**
139
Apps/Sandcastle/jsHintOptions.js
1410
Apps/Sandcastle/gallery/gallery-index.js
1511
index.html
16-
index.release.html
12+
index.release.html
13+
14+
15+
# packages/engine
16+
packages/engine/Build/**
17+
packages/engine/Source/Scene/GltfPipeline/**
18+
packages/engine/Source/Shaders/**
19+
packages/engine/Source/ThirdParty/**
20+
packages/engine/Source/Workers/**
21+
!packages/engine/Source/Workers/transferTypedArrayTest.js
22+
23+
# packages/widgets
24+
packages/widgets/Build/**
25+
packages/widgets/Source/ThirdParty/**

.gitignore

+4-14
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,14 @@ Thumbs.db
1313
/Apps/Sandcastle/gallery/gallery-index.js
1414
/Apps/Sandcastle/templates/bucket.css
1515

16-
/Source/Cesium.js
16+
/Source/Assets/
17+
/Source/ThirdParty/
18+
/Source/Widgets/
1719
/Source/Cesium.d.ts
20+
/Source/Cesium.js
1821

1922
/Specs/SpecList.js
2023
/Specs/jasmine/**
21-
/Source/Shaders/**/*.js
22-
/Source/ThirdParty/Shaders/**/*.js
23-
/Source/Workers/**
24-
!/Source/Workers/cesiumWorkerBootstrapper.js
25-
!/Source/Workers/transferTypedArrayTest.js
26-
!/Source/Workers/package.json
27-
28-
Source/ThirdParty/_commonjsHelpers*
29-
Source/ThirdParty/draco_decoder.wasm
30-
Source/ThirdParty/Workers/draco_decoder_nodejs.js
31-
Source/ThirdParty/Workers/pako_inflate.min.js
32-
Source/ThirdParty/Workers/pako_deflate.min.js
33-
Source/ThirdParty/Workers/z-worker-pako.js
3424

3525
/Tools/jsdoc/cesium_template/static/javascript/prism.js
3626
/Tools/jsdoc/cesium_template/static/styles/prism.css

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@
1919
/Build/Sandcastle
2020
/Build/Specs
2121
/Cesium-*.zip
22+
/cesium-engine-*.tgz
23+
/cesium-widgets-*.tgz
2224
/Documentation
2325
/build.js
2426
/favicon.ico
2527
/gulpfile.js
2628
/index.html
2729
/index.release.html
2830
/launches
31+
/packages/
2932
/server.js
3033
/Source/copyrightHeader.js
3134
/Specs

.prettierignore

+17-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
!.vscode/**/
99
!Apps/**/
1010
!Documentation/**/
11-
!Source/**/
11+
!packages/**/
1212
!Specs/**/
1313
!Tools/**/
1414

@@ -20,16 +20,25 @@
2020
!**/*.ts
2121

2222
# Re-ignore a few things caught above
23+
2324
**/*.min.js
24-
Source/Cesium.js
25-
Source/Scene/GltfPipeline/**
26-
Source/Shaders/**/*.js
27-
Source/ThirdParty/**
28-
Source/Workers/**/*
25+
26+
packages/engine/Build/**
27+
packages/engine/index.js
28+
packages/engine/Source/Scene/GltfPipeline/**
29+
packages/engine/Source/Shaders/**/*.js
30+
packages/engine/Source/ThirdParty/**
31+
packages/engine/Source/Workers/**/*
32+
!packages/engine/Source/Workers/cesiumWorkerBootstrapper.js
33+
!packages/engine/Source/Workers/transferTypedArrayTest.js
34+
35+
packages/widgets/Build/**
36+
packages/widgets/index.js
37+
packages/widgets/Source/ThirdParty/**
38+
2939
Specs/jasmine/**
40+
3041
Apps/Sandcastle/ThirdParty
3142
Tools/jsdoc/cesium_template/static/javascript/prism.js
3243
Tools/jsdoc/cesium_template/static/styles/prism.css
3344

34-
!Source/Workers/cesiumWorkerBootstrapper.js
35-
!Source/Workers/transferTypedArrayTest.js

.travis.yml

+14-10
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ notifications:
99
secure: JKzk2sJSbZ9h2PUVWj6KtOAdFbEEnOtv/VZy05pJ2H41xRgUHiGdtMW/vMSeq6XX3IJN8eW2zd0cJTgkFn0ioAlYvID8zRhcvkFHg60QXquoqtp5y65dxjtVz79hefxSo7FO1NhMZBQWE9Tg6R7XkoyTMth62+T9vqOgu2Hms6M=
1010
if: (branch = main) AND (type = push)
1111
on_success: change # default: always
12-
script:
13-
- ./travis/prepare.sh
14-
- npm --silent run deploy-status -- --status pending --message 'Waiting for build'
12+
jobs:
13+
include:
14+
- stage:
15+
name: "Linting, Coverage, Deployment"
16+
script:
17+
- ./travis/prepare.sh
18+
- npm --silent run deploy-status -- --status pending --message 'Waiting for build'
19+
- npm --silent run eslint
20+
- npm --silent run markdownlint
21+
- npm --silent run prettier-check
22+
- ./travis/release.sh
23+
- ./travis/deploy.sh
24+
- name: "Release Tests"
25+
script: ./travis/test-release.sh
1526

16-
- npm --silent run eslint
17-
- npm --silent run markdownlint
18-
- npm --silent run prettier-check
19-
20-
- ./travis/release.sh
21-
- ./travis/deploy.sh
22-
- ./travis/verify.sh

.vscode/launch.json

+121
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,116 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
{
5+
"name": "start via NPM",
6+
"request": "launch",
7+
"runtimeArgs": [
8+
"run-script",
9+
"test"
10+
],
11+
"runtimeExecutable": "npm",
12+
"skipFiles": [
13+
"<node_internals>/**"
14+
],
15+
"type": "node"
16+
},
17+
{
18+
"name": "Launch build widgets via NPM",
19+
"request": "launch",
20+
"runtimeArgs": [
21+
"run-script",
22+
"build",
23+
"-w",
24+
"@cesium/widgets"
25+
],
26+
"runtimeExecutable": "npm",
27+
"skipFiles": [
28+
"<node_internals>/**"
29+
],
30+
"type": "node"
31+
},
32+
{
33+
"name": "Launch via NPM",
34+
"request": "launch",
35+
"runtimeArgs": [
36+
"run-script",
37+
"test",
38+
"-w",
39+
"@cesium/engine"
40+
],
41+
"runtimeExecutable": "npm",
42+
"skipFiles": [
43+
"<node_internals>/**"
44+
],
45+
"type": "node"
46+
},
47+
{
48+
"name": "Launch build engine via NPM",
49+
"request": "launch",
50+
"runtimeArgs": [
51+
"run-script",
52+
"build",
53+
"-w",
54+
"@cesium/engine"
55+
],
56+
"runtimeExecutable": "npm",
57+
"skipFiles": [
58+
"<node_internals>/**"
59+
],
60+
"type": "node"
61+
},
62+
{
63+
"args": [
64+
"buildEngine"
65+
],
66+
"name": "Gulp task - buildEngine",
67+
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
68+
"request": "launch",
69+
"cwd": "${workspaceFolder}/packages/engine",
70+
"skipFiles": [
71+
"<node_internals>/**"
72+
],
73+
"type": "node"
74+
},
75+
{
76+
"args": [
77+
"build",
78+
"--workspaces"
79+
],
80+
"name": "Gulp task - build - workspaces",
81+
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
82+
"request": "launch",
83+
"skipFiles": [
84+
"<node_internals>/**"
85+
],
86+
"type": "node"
87+
},
88+
{
89+
"args": [
90+
"build"
91+
],
92+
"name": "Gulp task - build",
93+
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
94+
"request": "launch",
95+
"skipFiles": [
96+
"<node_internals>/**"
97+
],
98+
"type": "node"
99+
},
100+
{
101+
"args": [
102+
"build-ts",
103+
"-w",
104+
"@cesium/widgets"
105+
],
106+
"name": "Gulp task - build-ts",
107+
"program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js",
108+
"request": "launch",
109+
"skipFiles": [
110+
"<node_internals>/**"
111+
],
112+
"type": "node"
113+
},
4114
{
5115
"type": "node",
6116
"request": "launch",
@@ -21,6 +131,17 @@
21131
"type": "pwa-chrome",
22132
"url": "http://localhost:8080",
23133
"webRoot": "${workspaceFolder}"
134+
},
135+
{
136+
"type": "chrome",
137+
"request": "attach",
138+
"name": "Attach Karma Chrome",
139+
"address": "localhost",
140+
"port": 9333,
141+
"pathMapping": {
142+
"/": "${workspaceRoot}/",
143+
"/base/": "${workspaceRoot}/"
144+
}
24145
}
25146
]
26147
}

Apps/.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "../Source/.eslintrc.json"
2+
"extends": "../packages/.eslintrc.json"
33
}

Apps/HelloWorld.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
1212
/>
1313
<title>Hello World!</title>
14-
<script src="../Build/CesiumUnminified/Cesium.js"></script>
14+
<script src="../Build/Cesium.js"></script>
1515
<style>
1616
@import url(../Build/CesiumUnminified/Widgets/widgets.css);
1717
html,

Documentation/Contributors/ReleaseGuide/README.md

+29-23
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,43 @@ There is no release manager; instead, our community shares the responsibility. A
2121
3. Make sure you are using the latest drivers for your video card.
2222
4. Pull down the latest `main` branch.
2323
5. Update the Cesium ion demo token in `Ion.js` with a new token from the CesiumJS ion team account with read and geocode permissions. These tokens are named like this: `1.85 Release - Delete on November 1st, 2021`. Delete the token from 2 releases ago.
24-
6. Proofread [CHANGES.md](../../../CHANGES.md) with the date of the release. Adjust the order of changes so that prominent/popular changes come first.
25-
7. Update the version in `package.json` to match, e.g. `1.14.0` -> `1.15.0`.
26-
8. Commit these changes.
27-
9. Make sure the repository is clean `git clean -d -x -f`. **This will delete all files not already in the repository.**
28-
10. Run `npm install`.
29-
11. Make sure `ThirdParty.json` is up to date by running `npm run build-third-party`. If there are any changes, verify and commit them.
30-
12. Create the release zip `npm run make-zip`.
31-
13. Run tests against the release `npm run test -- --failTaskOnError --release`. Test **in all browsers** with the `--browsers` flag (i.e. `--browsers Firefox,Chrome`). Alternatively, test with the browser Spec Runner by starting a local server (`npm start`) and browsing to http://localhost:8080/Specs/SpecRunner.html?built=true&release=true.
32-
14. Unpack the release zip to the directory of your choice and start the server by running `npm install` and then `npm start`
33-
15. Browse to http://localhost:8080 and confirm that the home page loads as expected and all links work.
34-
16. Verify that the [documentation](http://localhost:8080/Build/Documentation/index.html) built correctly
35-
17. Make sure [Hello World](http://localhost:8080/Apps/HelloWorld.html) loads.
36-
18. Make sure [Cesium Viewer](http://localhost:8080/Apps/CesiumViewer/index.html) loads.
37-
19. Run [Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html) on the browser of your choice (or multiple browsers if you are up for it). Switch to the `All` tab and run through every demo to make sure they all work. Actually play with each of the buttons and sliders on each demo to ensure everything works as expected.
38-
20. If any of the above steps fail, post a message to the `#cesiumjs` channel in Slack to figure out what needs to be fixed before we can release. **Do NOT proceed to the next step until issues are resolved.**
39-
21. Push your commits to main
24+
6. Proofread [`CHANGES.md`](../../../CHANGES.md) with the date of the release. Adjust the order of changes so that prominent/popular changes come first. Ensure each change is in the section for the relevant workspace.
25+
7. Based on `CHANGES.md`, update each workspace version following the rules of [semantic versioning](https://semver.org/), e.g.,
26+
- `npm version minor -w @cesium/engine --no-git-tag-version`
27+
- If there are no changes, skip updating the workspace version.
28+
8. Update the version in `package.json` to match, e.g. `1.14.0` -> `1.15.0`.
29+
9. Commit these changes.
30+
10. Make sure the repository is clean `git clean -d -x -f`. **This will delete all files not already in the repository.**
31+
11. Run `npm install`.
32+
12. Make sure `ThirdParty.json` is up to date by running `npm run build-third-party`. If there are any changes, verify and commit them.
33+
13. Create the release zip `npm run make-zip`.
34+
14. Run tests against the release `npm run test -- --failTaskOnError --release`. Test **in all browsers** with the `--browsers` flag (i.e. `--browsers Firefox,Chrome`). Alternatively, test with the browser Spec Runner by starting a local server (`npm start`) and browsing to http://localhost:8080/Specs/SpecRunner.html?built=true&release=true.
35+
15. Unpack the release zip to the directory of your choice and start the server by running `npm install` and then `npm start`
36+
16. Browse to http://localhost:8080 and confirm that the home page loads as expected and all links work.
37+
17. Verify that the [documentation](http://localhost:8080/Build/Documentation/index.html) built correctly
38+
18. Make sure [Hello World](http://localhost:8080/Apps/HelloWorld.html) loads.
39+
19. Make sure [Cesium Viewer](http://localhost:8080/Apps/CesiumViewer/index.html) loads.
40+
20. Run [Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html) on the browser of your choice (or multiple browsers if you are up for it). Switch to the `All` tab and run through every demo to make sure they all work. Actually play with each of the buttons and sliders on each demo to ensure everything works as expected.
41+
21. If any of the above steps fail, post a message to the `#cesiumjs` channel in Slack to figure out what needs to be fixed before we can release. **Do NOT proceed to the next step until issues are resolved.**
42+
22. Push your commits to main
4043
- `git push`
41-
22. Create and push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), e.g.,
44+
23. Create and push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), e.g.,
4245
- `git tag -a 1.1 -m "1.1 release"`
4346
- `git push origin 1.1` (this assumes origin is the primary cesium repository, do not use `git push --tags` as it pushes all tags from all remotes you have on your system.)
44-
23. Publish the release zip file to GitHub
47+
24. Publish the release zip file to GitHub
4548
- https://github.com/CesiumGS/cesium/releases/new
4649
- Select the tag you use pushed
4750
- Enter 'CesiumJS 1.xx' for the title
4851
- Include date, list of highlights and link to CHANGES.md (https://github.com/CesiumGS/cesium/blob/1.xx/CHANGES.md) as the description
4952
- Look at a [previous release](https://github.com/CesiumGS/cesium/releases/tag/1.79) for an example. Don't use emoji, headings, or other formatting
5053
- Attach the `Cesium-1.xx` release zip file
5154
- Publish the release
52-
24. Publish to npm by running `npm publish` in the repository root (not the unzipped file directory) (the first time you do this, you will need to authorize the machine using `npm adduser`)
53-
25. Check out the `cesium.com` branch. Merge the new release tag into the `cesium.com` branch `git merge origin <tag-name>`. CI will deploy the hosted release, Sandcastle, and the updated doc when you push the branch up.
54-
26. After the `cesium.com` branch is live on cesium.com, comment in the `#comms-chat` slack channel to notify comms that the release is done so they can add these highlights and publish the monthly blog post
55+
25. Publish to npm by running `npm publish` in the repository root (not the unzipped file directory) (the first time you do this, you will need to authorize the machine using `npm adduser`)
56+
26. Use `npm publish -w <WORKSPACE>` in the repository root (not the unzipped file directory) to publish the workspace. Repeat this step for each **updated** workspace, in the following order:
57+
- `npm publish -w @cesium/engine`
58+
- `npm publish -w @cesium/widgets`
59+
27. Check out the `cesium.com` branch. Merge the new release tag into the `cesium.com` branch `git merge origin <tag-name>`. CI will deploy the hosted release, Sandcastle, and the updated doc when you push the branch up.
60+
28. After the `cesium.com` branch is live on cesium.com, comment in the `#comms-chat` slack channel to notify comms that the release is done so they can add these highlights and publish the monthly blog post
5561
- Note, it may take a little while for the new version of CesiumJS to be live on cesium.com (~30 minutes after the branch builds). You can check the version of Cesium in [sandcastle](https://sandcastle.cesium.com/) by looking at the tab above the cesium pane.
56-
27. Update the version of CesiumJS used in the Cesium Workshop: https://github.com/CesiumGS/cesium-workshop/blob/main/index.html#L13-L14
57-
28. Continue to the [Cesium Analytics release](https://github.com/CesiumGS/cesium-analytics/blob/main/Documentation/Contributors/AnalyticsReleaseGuide/README.md)
62+
29. Update the version of CesiumJS used in the Cesium Workshop: https://github.com/CesiumGS/cesium-workshop/blob/main/index.html#L13-L14
63+
30. Continue to the [Cesium Analytics release](https://github.com/CesiumGS/cesium-analytics/blob/main/Documentation/Contributors/AnalyticsReleaseGuide/README.md)

Specs/.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../Source/.eslintrc.json",
2+
"extends": "../packages/.eslintrc.json",
33
"env": {
44
"jasmine": true
55
},

Specs/BadGeometry.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { queryToObject, RuntimeError } from "../../Source/Cesium.js";
1+
import { queryToObject, RuntimeError } from "@cesium/engine";
22

33
function BadGeometry() {
44
this._workerName = "../../Specs/TestWorkers/createBadGeometry";

Specs/Cesium3DTilesTester.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
PointCloudShading,
1212
TileBoundingSphere,
1313
RuntimeError,
14-
} from "../../Source/Cesium.js";
14+
} from "@cesium/engine";
1515

1616
import pollToPromise from "./pollToPromise.js";
1717

Specs/DomEventSimulator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defaultValue, FeatureDetection } from "../../Source/Cesium.js";
1+
import { defaultValue, FeatureDetection } from "@cesium/engine";
22

33
function createMouseEvent(type, options) {
44
options = defaultValue(options, defaultValue.EMPTY_OBJECT);

Specs/ImplicitTilingTester.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defined, defaultValue } from "../Source/Cesium.js";
1+
import { defined, defaultValue } from "@cesium/engine";
22
import concatTypedArrays from "./concatTypedArrays.js";
33
import MetadataTester from "./MetadataTester.js";
44

0 commit comments

Comments
 (0)