-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README? #1
Comments
Thanks! I usually try to document projects up front, but this one was in flux I'm just putting on the final touches now though, so I'll be doing things properly, The goal of JSMT is to transform JavaScript modules to AMD, so they can be loaded app.use('/js/lib', jsmt.modules(__dirname + '/../../www/js/lib'));
app.use('/js/lib', jsmt.modules(__dirname + '/../../www/js/lib-node/node_modules', { resolve: 'node', flatten: true, transitive: true })); In this case, The The two directories appear (to the client) as a single, "virtual" directory served at The common configuration For example, here's a snippet of my RequireJS config: require.config({
baseUrl: 'js/lib',
packages: [
{ name: 'null', main: 'null' },
{ name: 'util', main: 'util' },
{ name: 'bosh' },
{ name: 'xmpp' }
],
map: {
'*': {
'fs': 'null',
'node-xmpp': 'xmpp',
'pkginfo': 'null'
}
}
}); In client-side JavaScript, I can now use junction as so: require(['junction'],
function(junction) {
var app = junction();
app.connnect({ boshURL: 'http://127.0.0.1:5280/http-bind' });
}); The AMD loader requests Under the covers, JSMT uses esprima to parse and analyze the modules For example, rather than browser-ifying modules that weren't designed for a browser (such as For convenience, the Anchor.js project is providing a set of |
This is like the opposite of de-amdify |
you mentioned the project on twitter but the README doesn't describe what the project does.
some good tips: http://tom.preston-werner.com/2010/08/23/readme-driven-development.html
The text was updated successfully, but these errors were encountered: