This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require.define({ | |
"promise":function(require, exports, module) { | |
// Kris Zyp | |
// this is based on the CommonJS spec for promises: | |
// http://wiki.commonjs.org/wiki/Promises | |
// Includes convenience functions for promises, much of this is taken from Tyler Close's ref_send | |
// and Kris Kowal's work on promises. | |
// // MIT License |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash-3.2# npm publish /projects/nodules | |
npm configfile /Users/kriszyp/.npmrc | |
npm sudo true | |
npm cli [ 'publish', '/projects/nodules' ] | |
npm publish [ '/projects/nodules' ] | |
npm readJson /projects/nodules/package.json | |
npm testEngine required: node ">=0.1.90" | |
npm packTar /projects/nodules /usr/local/lib/node/.npm/.cache/nodules/0.1.0/package.tgz | |
npm exec tar "czf" "/usr/local/lib/node/.npm/.cache/nodules/0.1.0/package.tgz" "--exclude" ".git" "nodules" | |
npm exec tar "xzf" "/usr/local/lib/node/.npm/.cache/nodules/0.1.0/package.tgz" "--strip" "1" "-C" "/usr/local/lib/node/.npm/.cache/nodules/0.1.0/package" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash-3.2# npm config ls | |
npm configfile /Users/kriszyp/.npmrc | |
npm sudo true | |
npm cli [ 'config', 'ls' ] | |
npm config root "/usr/local/lib/node" | |
npm config auto-activate true | |
npm config binroot "/usr/local/bin" | |
npm config registry "https://registry.npmjs.org/" | |
npm ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash-3.2# make install | |
./cli.js --auto-activate always install . | |
npm configfile /Users/kriszyp/.npmrc | |
npm sudo true | |
npm cli [ '--auto-activate', 'always', 'install', '.' ] | |
npm install pkg . | |
npm install local . | |
npm readJson package.json | |
npm testEngine required: node ">=0.1.91" | |
npm packTar . /usr/local/lib/node/.npm/.cache/npm/0.1.8/package.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This module provides querying functionality | |
*/ | |
exports.jsonQueryCompatible = true; | |
var operatorMap = { | |
"=": "eq", | |
"==": "eq", | |
">": "gt", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This module provides querying functionality | |
*/ | |
exports.jsonQueryCompatible = true; | |
var operatorMap = { | |
"": "eq", | |
"!": "ne", | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"a!=aaa" is sugar for (identical to) "a.ne(aaa)" parses to: | |
[{ | |
property:"a", | |
operator:"ne", | |
values: ["aaa"] | |
}] | |
"a=aaa" is sugar for (identical to) "a.eq(aaa)" parses to: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require.paths.push(".", "folder1"); | |
require("folder1/c"); | |
require("c"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void addListener(PropertyChangeSetListener listener) { | |
Map<ObjectId, Set<String>> readSet = readSets.get(); | |
Map<ObjectId, Set<String>> watchSet = watchSets.get(listener); | |
if (watchSet == null){ | |
synchronized(watchSets){ | |
watchSets.put(listener,watchSet = new HashMap<ObjectId, Set<String>>()); | |
} | |
} | |
for (Map.Entry<ObjectId, Set<String>> entry : readSet.entrySet()) { | |
ObjectId key = entry.getKey(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple repl test | |
var test = require("model").Model("test", require("store/js-file").JSFile(), | |
{ | |
properties: { | |
foo: {type: "string"}, | |
bar: {type: "integer", optional: true} | |
}, | |
prototype: {} | |
} |