Skip to content

Commit 1e55169

Browse files
author
Tim
committed
Change build script to use local files rather than a fresh git checkout
1 parent 7c0f517 commit 1e55169

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

.idea/jsLibraryMappings.xml

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/rangy.iml

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builder/build.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ function cloneGitRepository() {
114114
});
115115
}
116116

117+
function copyLocalSourceFiles() {
118+
console.log("Copying local source files");
119+
copyFilesRecursive("src", srcDir);
120+
callback();
121+
}
122+
117123
function getVersion() {
118124
buildVersion = JSON.parse( fs.readFileSync("package.json")).version;
119125
console.log("Got version " + buildVersion + " from package.json");
@@ -376,12 +382,18 @@ function copyToRelease() {
376382

377383
/*--------------------------------------------------------------------------------------------------------------------*/
378384

385+
// Get command line arguments
386+
var sourceFilesGetter = (process.argv.length >= 3 && process.argv[2] == "freshCheckout") ?
387+
cloneGitRepository : copyLocalSourceFiles;
388+
389+
/*--------------------------------------------------------------------------------------------------------------------*/
390+
379391
// Start the build
380392

381393
var actions = [
382394
deleteBuildDir,
383395
createBuildDir,
384-
cloneGitRepository,
396+
sourceFilesGetter,
385397
getVersion,
386398
assembleCoreScript,
387399
copyModuleScripts,
@@ -396,7 +408,6 @@ var actions = [
396408
copyToRelease
397409
];
398410

399-
400411
function callback() {
401412
if (actions.length) {
402413
actions.shift()();

roadmap.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@
2929
- [ ] Add withinRange and withinNode options to move(), moveStart() and moveEnd() methods
3030
- [?] Positions module
3131
(http://stackoverflow.com/questions/4122315/how-to-find-xy-position-in-javascript-with-offset/4123495#4123495)
32-
- [ ] Config module or something so that config can work with AMD. See PR 285
32+
- [ ] Config module or something so that config can work with AMD. See PR #285
3333
(https://github.com/timdown/rangy/pull/285)
3434
- [ ] Move to one of the common testing libraries
35+
- [ ] Update build not to use a fresh Git checkout
36+
- [ ] Investigate shadow DOM (issue #307)
3537

3638
Possible features for some version
3739
----------------------------------

src/core/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
})();
224224

225225
// Very simple event handler wrapper function that doesn't attempt to solve issues such as "this" handling or
226-
// normalization of event properties
226+
// normalization of event properties because we don't need this.
227227
var addListener;
228228
if (isBrowser) {
229229
if (isHostMethod(document, "addEventListener")) {

src/core/domrange.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
var it, n;
100100
iteratorState = iteratorState || { stop: false };
101101
for (var node, subRangeIterator; node = rangeIterator.next(); ) {
102-
//log.debug("iterateSubtree, partially selected: " + rangeIterator.isPartiallySelectedSubtree(), nodeToString(node));
103102
if (rangeIterator.isPartiallySelectedSubtree()) {
104103
if (func(node) === false) {
105104
iteratorState.stop = true;
@@ -255,11 +254,9 @@
255254
// Check for partially selected text nodes
256255
if (isCharacterDataNode(current) && this.clonePartiallySelectedTextNodes) {
257256
if (current === this.ec) {
258-
//log.info("*** CLONING END");
259257
(current = current.cloneNode(true)).deleteData(this.eo, current.length - this.eo);
260258
}
261259
if (this._current === this.sc) {
262-
//log.info("*** CLONING START");
263260
(current = current.cloneNode(true)).deleteData(0, this.so);
264261
}
265262
}
@@ -409,7 +406,7 @@
409406
var htmlParsingConforms = false;
410407
try {
411408
styleEl.innerHTML = "<b>x</b>";
412-
htmlParsingConforms = (styleEl.firstChild.nodeType == 3); // Opera incorrectly creates an element node
409+
htmlParsingConforms = (styleEl.firstChild.nodeType == 3); // Pre-Blink Opera incorrectly creates an element node
413410
} catch (e) {
414411
// IE 6 and 7 throw
415412
}

src/modules/rangy-textrange.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ rangy.createModule("TextRange", ["WrappedSelection"], function(api, module) {
13131313
while ( (pos = it.next()) ) {
13141314
textChar = pos.character;
13151315

1316-
log.debug("Testing char '" + textChar + "'")
1316+
log.debug("Testing char '" + textChar + "'");
13171317

13181318
if (allWhiteSpaceRegex.test(textChar)) {
13191319
if (insideWord) {

0 commit comments

Comments
 (0)