Skip to content

Commit 11f6824

Browse files
committed
ALLOW_CACHED_SCHEDULER Flag default to true
1 parent a3da605 commit 11f6824

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"license": "Apache 2.0",
66
"main": "exports/spaniel.js",
77
"scripts": {
8-
"test": "tsc && yarn run build && testem ci && node test/headless/run",
9-
"serve": "yarn run build && node test/headless/server/app",
8+
"test": "tsc && yarn build && testem ci && node test/headless/run",
9+
"serve": "yarn build && node test/headless/server/app",
1010
"test:headless": "mocha --require @babel/register test/headless/specs/**/*.js --exit",
1111
"watch": "broccoli-timepiece exports",
1212
"build": "./scripts/build.sh",
1313
"stats": "node scripts/size-calc",
1414
"prettier": "prettier --write 'src/**/*.ts'",
15-
"prepublish": "yarn run build",
15+
"prepublish": "yarn build",
1616
"docs:build": "./scripts/build-docs.sh",
1717
"docs:publish": "./scripts/publish-docs.sh"
1818
},
@@ -91,4 +91,4 @@
9191
"git add"
9292
]
9393
}
94-
}
94+
}

scripts/build-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44

55
typedoc --out docs src/index.ts --module es2015 --mode file --theme minimal --readme USAGE.md
6-
npm run stats
6+
yarn stats
77
mv size.txt docs/

scripts/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
rm -rf exports
66
./node_modules/tslint/bin/tslint src/**/*.ts &&
77
broccoli build exports &&
8-
npm run stats
8+
yarn stats

src/metal/scheduler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class ElementScheduler extends BaseScheduler implements ElementSchedulerI
204204
protected lastVersion: number = W.version;
205205
protected ALLOW_CACHED_SCHEDULER: boolean;
206206

207-
constructor(customEngine?: EngineInterface, root?: Element | Window, ALLOW_CACHED_SCHEDULER: boolean = false) {
207+
constructor(customEngine?: EngineInterface, root?: Element | Window, ALLOW_CACHED_SCHEDULER: boolean = true) {
208208
super(customEngine, root);
209209
this.queue = new DOMQueue();
210210
this.ALLOW_CACHED_SCHEDULER = ALLOW_CACHED_SCHEDULER;

test/app/index.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
/*
2-
Copyright 2017 LinkedIn Corp. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
2+
Copyright 2017 LinkedIn Corp. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
3+
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
34
4-
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5+
Unless required by applicable law or agreed to in writing, software
6+
distributed under the License is distributed on an "AS IS" BASIS,
7+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
58
*/
69

710
// BEGIN SpanielContext Harness
@@ -57,8 +60,7 @@ let observer = new spaniel.SpanielObserver(
5760
ratio: 0.5,
5861
time: 1000
5962
}
60-
],
61-
ALLOW_CACHED_SCHEDULER: true
63+
]
6264
}
6365
);
6466
observer.observe(target);
@@ -89,8 +91,7 @@ var rootObserver = new spaniel.SpanielObserver(
8991
ratio: 0.5,
9092
time: 1000
9193
}
92-
],
93-
ALLOW_CACHED_SCHEDULER: true
94+
]
9495
}
9596
);
9697

0 commit comments

Comments
 (0)