Commits

Sean Wilkinson committed 05348f5

Removed "jslint.js" from testing workflow because nothing ever distributes with Quanah _alone_

Comments (0)

Files changed (2)

 #
 #   This contains live instructions for development on the Quanah library.
 #
-#                                                       ~~ (c) SRW, 10 Sep 2012
+#                                                       ~~ (c) SRW, 05 Oct 2012
 
 PROJECT_ROOT    :=  $(realpath $(dir $(firstword $(MAKEFILE_LIST))))
 
 endef
 
 .PHONY: all clean clobber distclean reset run
-.INTERMEDIATE: jslint.js json2.js
+.INTERMEDIATE: json2.js
 .SILENT: ;
 
 all: run
 $(HTML): | $(EXEJS)
 	@   $(WEBPAGE) -o $@ $(EXEJS)
 
-$(JSLIBS): jslint.js json2.js
+$(JSLIBS): json2.js
 	@   $(CAT) $^ > $@
 
 $(MINJS): $(EXEJS)
 #   you don't have the same personal settings, though, these directions will
 #   still fall back to our trusty friend 'curl' :-)
 
-jslint.js:
-	@   CROCKHUB="https://raw.github.com/douglascrockford"          ;   \
-            if [ -f $(CODEBANK)/lib/JavaScript/jslint.js ]; then            \
-                $(CP) $(CODEBANK)/lib/JavaScript/jslint.js $@           ;   \
-            else                                                            \
-                $(CURL) -o $@ $${CROCKHUB}/JSLint/master/jslint.js      ;   \
-            fi
-
 json2.js:
 	@   CROCKHUB="https://raw.github.com/douglascrockford"          ;   \
             if [ -f $(CODEBANK)/lib/JavaScript/json2.js ]; then             \
 //  -   remove type-checks in user-unreachable functions where appropriate
 //  -   replace `throw` statements with `evt.fail` statements for robustness
 //  -   rewrite `onready` assignments as `comm` invocations (optional)
-//  -   verify correct getter/setter handling in `shallow_copy`
+//  -   verify correct getter/setter handling in `copy`
 //
 //  Open questions:
 //
 //          prototype definitions use ES5 getters and setters, too. I would
 //          need to abandon most (if not all) use of getters and setters ...
 //
-//                                                      ~~ (c) SRW, 23 Sep 2012
+//                                                      ~~ (c) SRW, 05 Oct 2012
 
 (function (global) {
     'use strict';
 
  // Declarations
 
-    var atob, AVar, avar, btoa, comm, def, deserialize, is_closed, isFunction,
-        isRegExp, local_call, ply, queue, revive, secret, serialize,
-        shallow_copy, sys, uuid, when;
+    var atob, AVar, avar, btoa, comm, copy, def, deserialize, is_closed,
+        isFunction, isRegExp, local_call, ply, queue, revive, secret,
+        serialize, sys, uuid, when;
 
  // Definitions
 
         } else {
             temp = spec;
         }
-        shallow_copy(temp, that);
+        copy(temp, that);
         if (that.hasOwnProperty('key') === false) {
          // NOTE: The `key` property lacks "secure" attributes in this case.
             that.key = uuid();
         return revive();
     };
 
+    copy = function (x, y) {
+     // This function copies the properties of `x` to `y`, specifying `y` as
+     // object literal if it was not provided as an input argument. It does
+     // not perform a "deep copy", which means that properties whose values
+     // are objects will be "copied by reference" rather than by value. Right
+     // now, I see no reason to worry about deep copies or getters / setters.
+        if (y === undefined) {
+         // At one point, I used a test here that `arguments.length === 1`,
+         // but it offended JSLint:
+         //     "Do not mutate parameter 'y' when using 'arguments'."
+            y = {};
+        }
+        var key;
+        for (key in x) {
+            if (x.hasOwnProperty(key)) {
+                y[key] = x[key];
+            }
+        }
+        return y;
+    };
+
     def = function (obj) {
      // This function enables the user to redefine "internal" functions from
      // outside the giant anonymous closure. In particular, this allows users
                      // conditionally, and that way might be clearer, too ...
                         /*jslint evil: true */
                         f = ((new Function('return ' + atob(code)))());
-                        shallow_copy(deserialize(atob(props)), f);
+                        copy(deserialize(atob(props)), f);
                         return;
                     });
                 }
         });
     };
 
-    shallow_copy = function (x, y) {
-     // This function copies the properties of `x` to `y`, specifying `y` as
-     // object literal if it was not provided as an input argument. It does
-     // not perform a "deep copy", which means that properties whose values
-     // are objects will be "copied by reference" rather than by value. Right
-     // now, I see no reason to worry about deep copies or getters / setters.
-        if (y === undefined) {
-         // At one point, I used a test here that `arguments.length === 1`,
-         // but it offended JSLint:
-         //     "Do not mutate parameter 'y' when using 'arguments'."
-            y = {};
-        }
-        var key;
-        for (key in x) {
-            if (x.hasOwnProperty(key)) {
-                y[key] = x[key];
-            }
-        }
-        return y;
-    };
-
     sys = {
      // This object contains stubs for methods and properties that can be
      // defined externally using the `Q.def` method. For more information,
          // Thus, providing this function allows Quanah to use its own format
          // for serialization without making it impossibly hard for users to
          // implement the abstract filesystem routines.
-            return JSON.parse(serialize(shallow_copy(this)));
+            return JSON.parse(serialize(copy(this)));
         }
     });
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.