Skip to content

Commit 44acf66

Browse files
author
Hannah
authored
Merge pull request #8796 from fredj/rm_sortRequires
Remove sortRequires from package.json and doc
2 parents de8e094 + deb0f2c commit 44acf66

File tree

4 files changed

+25
-53
lines changed

4 files changed

+25
-53
lines changed

Documentation/Contributors/BuildGuide/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ Here's the full set of scripts and what they do.
109109
- `eslint-watch` - A never-ending task that watches your file system for changes to Cesium and runs ESLint on any changed source files.
110110
- `clean` - Removes all generated build artifacts.
111111
- `cloc` - Runs [CLOC](https://github.com/AlDanial/cloc) to count the lines of code on the Source and Specs directories. This requires [Perl](http://www.perl.org/) to execute.
112-
- `sortRequires` - Alphabetically sorts the list of required modules in every `js` file. It also makes sure that the top of every source file uses the same formatting.
113112
- **Testing scripts** -- build and run the unit tests
114113
- `test` - Runs all tests with [Karma](http://karma-runner.github.io/0.13/index.html) using the default browser specified in the Karma config file.
115114
- `test-all` - Runs all tests with Karma using all browsers installed on the current system.

Documentation/Contributors/CodingGuide/README.md

-20
Original file line numberDiff line numberDiff line change
@@ -887,26 +887,6 @@ It is usually obvious what directory a file belongs in. When it isn't, the decis
887887

888888
Modules (files) should only reference modules in the same level or a lower level of the stack. For example, a module in `Scene` can use modules in `Scene`, `Renderer`, and `Core`, but not in `DataSources` or `Widgets`.
889889

890-
- Modules in `define` statements should be in alphabetical order. This can be done automatically with `npm run sortRequires`, see the [Build Guide](../BuildGuide/README.md). For example, the modules required by `Scene/ModelAnimation.js` are:
891-
892-
```javascript
893-
define([
894-
"../Core/defaultValue",
895-
"../Core/Event",
896-
"../Core/JulianDate",
897-
"./ModelAnimationLoop",
898-
"./ModelAnimationState",
899-
], function (
900-
defaultValue,
901-
Event,
902-
JulianDate,
903-
ModelAnimationLoop,
904-
ModelAnimationState
905-
) {
906-
/* ... */
907-
});
908-
```
909-
910890
- WebGL resources need to be explicitly deleted so classes that contain them (and classes that contain these classes, and so on) have `destroy` and `isDestroyed` functions, e.g.,
911891

912892
```javascript

Documentation/Contributors/TestingGuide/README.md

+25-31
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,14 @@ Tests are written in JavaScript using Jasmine. It is important to realize that t
236236
Here is a stripped down version of the tests:
237237

238238
```javascript
239-
define(["Core/Cartesian3"], function (Cartesian3) {
240-
"use strict";
241-
242-
describe("Cartesian3", function () {
243-
it("construct with default values", function () {
244-
var cartesian = new Cartesian3();
245-
expect(cartesian.x).toEqual(0.0);
246-
expect(cartesian.y).toEqual(0.0);
247-
expect(cartesian.z).toEqual(0.0);
248-
});
239+
import { Cartesian3 } from "../../Source/Cesium.js";
240+
241+
describe("Cartesian3", function () {
242+
it("construct with default values", function () {
243+
var cartesian = new Cartesian3();
244+
expect(cartesian.x).toEqual(0.0);
245+
expect(cartesian.y).toEqual(0.0);
246+
expect(cartesian.z).toEqual(0.0);
249247
});
250248
});
251249
```
@@ -724,30 +722,26 @@ This test is more cohesive and easier to debug than if it were written using a _
724722
As mentioned above, some tests are in the `'WebGL'` category. To assign a category to a suite, pass the category to `describe`.
725723

726724
```javascript
727-
define(["Scene/DebugModelMatrixPrimitive", "Specs/createScene"], function (
728-
DebugModelMatrixPrimitive,
729-
createScene
730-
) {
731-
"use strict";
732-
733-
describe(
734-
"Scene/DebugModelMatrixPrimitive",
735-
function () {
736-
var scene;
725+
import { DebugModelMatrixPrimitive } from "../../Source/Cesium.js";
726+
import createScene from "../createScene.js";
737727

738-
beforeAll(function () {
739-
scene = createScene();
740-
});
728+
describe(
729+
"Scene/DebugModelMatrixPrimitive",
730+
function () {
731+
var scene;
741732

742-
afterAll(function () {
743-
scene.destroyForSpecs();
744-
});
733+
beforeAll(function () {
734+
scene = createScene();
735+
});
745736

746-
// ...
747-
},
748-
"WebGL"
749-
);
750-
});
737+
afterAll(function () {
738+
scene.destroyForSpecs();
739+
});
740+
741+
// ...
742+
},
743+
"WebGL"
744+
);
751745
```
752746

753747
CesiumJS uses a customized `describe` function that wraps Jasmine describe calls and provides the category capability.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
"test-webgl-validation": "gulp test --webglValidation",
118118
"test-webgl-stub": "gulp test --webglStub",
119119
"test-release": "gulp test --release",
120-
"sortRequires": "gulp sortRequires",
121120
"deploy-s3": "gulp deploy-s3",
122121
"deploy-status": "gulp deploy-status",
123122
"deploy-set-version": "gulp deploy-set-version",

0 commit comments

Comments
 (0)