Permalink
Browse files

Change build script to use local files rather than a fresh git checkout

  • Loading branch information...
timdown committed Aug 16, 2015
1 parent 7c0f517 commit 1e55169d2e4d1d9458c2a87119addf47a8265276
Showing with 23 additions and 14 deletions.
  1. +3 −2 .idea/jsLibraryMappings.xml
  2. +1 −3 .idea/rangy.iml
  3. +13 −2 builder/build.js
  4. +3 −1 roadmap.txt
  5. +1 −1 src/core/core.js
  6. +1 −4 src/core/domrange.js
  7. +1 −1 src/modules/rangy-textrange.js
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
+ <file url="file://$PROJECT_DIR$/builder" libraries="{Node.js Globals, Node.js v0.10.31 Core Modules}" />
+ <file url="file://$PROJECT_DIR$/builder/build.js" libraries="{Node.js Globals, Node.js v0.10.31 Core Modules}" />
<file url="file://$PROJECT_DIR$/demos" libraries="{HTML5 / EcmaScript 5}" />
<file url="PROJECT" libraries="{Node.js v0.10.31 Core Modules}" />
</component>
-</project>
-
+</project>
View
@@ -7,8 +7,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Node.js v0.10.24 Core Modules" level="application" />
<orderEntry type="library" name="Node.js v0.10.31 Core Modules" level="application" />
</component>
-</module>
-
+</module>
View
@@ -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");
@@ -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,
@@ -396,7 +408,6 @@ var actions = [
copyToRelease
];
-
function callback() {
if (actions.length) {
actions.shift()();
View
@@ -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
----------------------------------
View
@@ -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")) {
View
@@ -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;
@@ -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);
}
}
@@ -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
}
@@ -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) {

0 comments on commit 1e55169

Please sign in to comment.