Skip to content

Commit

Permalink
Change build script to use local files rather than a fresh git checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim committed Aug 16, 2015
1 parent 7c0f517 commit 1e55169
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/rangy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions builder/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ function cloneGitRepository() {
});
}

function copyLocalSourceFiles() {
console.log("Copying local source files");
copyFilesRecursive("src", srcDir);
callback();
}

function getVersion() {
buildVersion = JSON.parse( fs.readFileSync("package.json")).version;
console.log("Got version " + buildVersion + " from package.json");
Expand Down Expand Up @@ -376,12 +382,18 @@ function copyToRelease() {

/*--------------------------------------------------------------------------------------------------------------------*/

// Get command line arguments
var sourceFilesGetter = (process.argv.length >= 3 && process.argv[2] == "freshCheckout") ?
cloneGitRepository : copyLocalSourceFiles;

/*--------------------------------------------------------------------------------------------------------------------*/

// Start the build

var actions = [
deleteBuildDir,
createBuildDir,
cloneGitRepository,
sourceFilesGetter,
getVersion,
assembleCoreScript,
copyModuleScripts,
Expand All @@ -396,7 +408,6 @@ var actions = [
copyToRelease
];


function callback() {
if (actions.length) {
actions.shift()();
Expand Down
4 changes: 3 additions & 1 deletion roadmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
- [ ] Add withinRange and withinNode options to move(), moveStart() and moveEnd() methods
- [?] Positions module
(http://stackoverflow.com/questions/4122315/how-to-find-xy-position-in-javascript-with-offset/4123495#4123495)
- [ ] Config module or something so that config can work with AMD. See PR 285
- [ ] Config module or something so that config can work with AMD. See PR #285
(https://github.com/timdown/rangy/pull/285)
- [ ] Move to one of the common testing libraries
- [ ] Update build not to use a fresh Git checkout
- [ ] Investigate shadow DOM (issue #307)

Possible features for some version
----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
})();

// Very simple event handler wrapper function that doesn't attempt to solve issues such as "this" handling or
// normalization of event properties
// normalization of event properties because we don't need this.
var addListener;
if (isBrowser) {
if (isHostMethod(document, "addEventListener")) {
Expand Down
5 changes: 1 addition & 4 deletions src/core/domrange.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
var it, n;
iteratorState = iteratorState || { stop: false };
for (var node, subRangeIterator; node = rangeIterator.next(); ) {
//log.debug("iterateSubtree, partially selected: " + rangeIterator.isPartiallySelectedSubtree(), nodeToString(node));
if (rangeIterator.isPartiallySelectedSubtree()) {
if (func(node) === false) {
iteratorState.stop = true;
Expand Down Expand Up @@ -255,11 +254,9 @@
// Check for partially selected text nodes
if (isCharacterDataNode(current) && this.clonePartiallySelectedTextNodes) {
if (current === this.ec) {
//log.info("*** CLONING END");
(current = current.cloneNode(true)).deleteData(this.eo, current.length - this.eo);
}
if (this._current === this.sc) {
//log.info("*** CLONING START");
(current = current.cloneNode(true)).deleteData(0, this.so);
}
}
Expand Down Expand Up @@ -409,7 +406,7 @@
var htmlParsingConforms = false;
try {
styleEl.innerHTML = "<b>x</b>";
htmlParsingConforms = (styleEl.firstChild.nodeType == 3); // Opera incorrectly creates an element node
htmlParsingConforms = (styleEl.firstChild.nodeType == 3); // Pre-Blink Opera incorrectly creates an element node
} catch (e) {
// IE 6 and 7 throw
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rangy-textrange.js
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ rangy.createModule("TextRange", ["WrappedSelection"], function(api, module) {
while ( (pos = it.next()) ) {
textChar = pos.character;

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

if (allWhiteSpaceRegex.test(textChar)) {
if (insideWord) {
Expand Down

0 comments on commit 1e55169

Please sign in to comment.