-
-
Save davglass/3881751 to your computer and use it in GitHub Desktop.
This file contains 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
node_modules |
This file contains 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
YUI.add('mojito', function(Y, NAME) { | |
Y.namespace('mojito'); | |
}, '0.1.0', {requires: []}); |
This file contains 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
{ | |
"name": "mojito", | |
"version": "0.5.0pr1", | |
"description": "Mojito provides an architecture, components and tools for developers to build complex web applications faster.", | |
"preferGlobal": true, | |
"author": "Drew Folta <[email protected]>", | |
"contributors": [ | |
"Ric Allinson <[email protected]>", | |
"Matt Taylor <[email protected]>", | |
"Chris Klaiber <[email protected]>", | |
"Drew Folta <[email protected]>", | |
"Martin Cooper <[email protected]>", | |
"Isao Yagi <[email protected]>", | |
"Michael Ridgway <[email protected]>", | |
"Caridy Patino <[email protected]>" | |
], | |
"dependencies": { | |
"yui": "~3.7.2", | |
"request": "2.9.202" | |
}, | |
"keywords": [ | |
"framework", | |
"webapp" | |
], | |
"main": "lib/mojito", | |
"directories": [ | |
"bin", | |
"docs", | |
"lib" | |
], | |
"bin": { | |
"mojito": "bin/mojito" | |
}, | |
"engines": { | |
"node": ">0.4", | |
"npm": ">1.0" | |
}, | |
"homepage": "http://developer.yahoo.com/cocktails/mojito/", | |
"repository": { | |
"type": "git", | |
"url": "git://github.com/yahoo/mojito.git" | |
}, | |
"bugs": "https://github.com/yahoo/mojito/issues", | |
"scripts": { | |
"test": "./tests/run.js test -u --group server --driver nodejs && ./tests/run.js test -u --group client --driver selenium" | |
}, | |
"yahoo": { | |
"mojito": { | |
"type": "bundle", | |
"location": "lib/app" | |
} | |
} | |
} |
This file contains 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
YUI.add('mojito-resource-store', function(Y, NAME) { | |
Y.mojito.ResourceStore = 'You have a winner!'; | |
}, '0.0.1', { requires: [ | |
'base', | |
'oop', | |
'mojito-util' | |
]}); |
This file contains 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 libpath = require('path'), | |
YUIFactory = require('./yui-sandbox.js'), | |
YUI = YUIFactory.getYUI(); | |
var Z = require('yui').YUI({ | |
useSync: true, | |
modules: { | |
'mojito': { | |
fullpath: libpath.join(__dirname, 'm.js') | |
}, | |
'mojito-util': { | |
fullpath: libpath.join(__dirname, 'u.js') | |
}, | |
'mojito-resource-store': { | |
fullpath: libpath.join(__dirname, 's.js') | |
} | |
} | |
}); | |
Z.use('mojito-resource-store'); | |
console.log('yui: ', Z.mojito.ResourceStore); | |
var Y = YUI({ | |
useSync: true, | |
modules: { | |
'mojito': { | |
fullpath: libpath.join(__dirname, 'm.js') | |
}, | |
'mojito-util': { | |
fullpath: libpath.join(__dirname, 'u.js') | |
}, | |
'mojito-resource-store': { | |
fullpath: libpath.join(__dirname, 's.js') | |
} | |
} | |
}); | |
Y.use('mojito-resource-store'); | |
console.log('sandbox: ', Y.mojito && Y.mojito.ResourceStore); |
This file contains 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
YUI.add('mojito-util', function(Y) { | |
Y.mojito.util = {}; | |
}, '0.1.0', {requires: [ | |
'array-extras', | |
'json-stringify', | |
'mojito' | |
]}); |
This file contains 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
/*jslint nomen:true, sloppy: true, stupid: true, node: true*/ | |
var fs = require('fs'), | |
path = require('path'), | |
vm = require('vm'), | |
file = path.join(__dirname, '..', 'node_modules', 'yui', 'yui-nodejs', 'yui-nodejs.js'), | |
code = fs.readFileSync(file, 'utf8'); | |
exports.getYUI = function () { | |
var sandbox = { | |
console: console, | |
process: process, | |
require: require, | |
module: module, | |
setTimeout: setTimeout, | |
setInterval: setInterval, | |
__filename: __filename, | |
__dirname: path.join(__dirname, '..', 'node_modules', 'yui', 'yui-nodejs'), | |
exports: {} | |
}; | |
vm.runInNewContext(code, sandbox, 'build/yui-new/yui-new.js'); | |
return sandbox.exports.YUI; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment