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
| Joose.Class('Class1', { | |
| use : [ 'Class2' ], | |
| has : { | |
| myAttr : { | |
| is : 'rw', | |
| lazy : function () { return new Class2({ passed : this.getPassThis() }) } | |
| }, | |
| passThis : { | |
| is : 'rw', | |
| init : null |
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
| var sys = require('sys'), | |
| fs = require('fs'), | |
| exec = require('child_process').exec | |
| require('Task/Joose/NodeJS') | |
| Joose.Module('StringerHasher', function (m) { | |
| body : { |
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
| Joose.Class('Samples_MD5', { | |
| my : { | |
| has : { | |
| stringsANDhashes_ASCII : { | |
| is : 'ro', | |
| init : [ |
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
| var sys = require('sys') | |
| require('joose') | |
| require('hash') | |
| sys.puts(Hash.md5('testesttest')) |
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
| var Jolt | |
| use('Jolt', function () { | |
| Jolt = Jolt() | |
| console.log(Jolt.TSD.type) | |
| }) |
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
| #!/bin/bash | |
| export npm_config_root=$(npm root -g 2>/dev/null) | |
| cd $npm_config_root | |
| find . -name postactivate.sh -exec chmod +x '{}' \; | |
| scripts=$(find . -name __script -type d) |
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
| var vm = require('vm') | |
| require('task-joose-nodejs') | |
| var Script = vm.createScript('console.log(typeof Joose.A.each)') | |
| Script.runInThisContext() // -> 'function' is printed to the console |
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
| // NEW LOADING STYLE | |
| var Joose = require('joose')() // NOTE the trailing `()` | |
| /* ------- in main Joose ------- */ | |
| var Joose = function Joose(jsan) { // NOTE the leading `var` | |
| Joose.top = this | |
| Joose.jsan = jsan | |
| Joose.Namespace.Manager.my = new Joose.Namespace.Manager() |
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
| /* ------------ START BOILERPLATE ------------ */ | |
| ;(function () { | |
| function runner(getExpectedNS /* [NS1], [NS2], [...] */) { | |
| expectedNS = ['Joose', 'MyNS'] | |
| if (getExpectedNS) { return expectedNS } | |
| /* ------------ START YOUR COMPONENT SCRIPT ------------ */ | |
| // populate expectedNS above with top-level namespaces ref'd in your code | |
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
| #!/bin/bash | |
| #PODNAME: postinstall.sh | |
| CURRENT_PKG_DIR=$(pwd) | |
| NPM_ROOT=$(npm root 2>/dev/null) | |
| ONE_UP_NPM_ROOT="$NPM_ROOT/../.." |
OlderNewer