Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

working with Express(node.js) #24

Closed
mattma opened this issue Jun 28, 2012 · 12 comments
Closed

working with Express(node.js) #24

mattma opened this issue Jun 28, 2012 · 12 comments

Comments

@mattma
Copy link

mattma commented Jun 28, 2012

I am trying to setup with Express Framework. ( http://expressjs.com/ ). I have pre-setup my static assets folder at Root/public/ ...
When I am using jam install, it creates a folder of jam under the Root.

The problem here is my Express server can only serve the static content from Root/public folder, so my html file could not reach require.js located at Root/jam/require.js, because it is located out of the static assets folder.

Is there a way that I could set jam install location instead of default at the Root level? I cannot find it from the doc. Help please,

Thank you very much.

@caolan
Copy link
Owner

caolan commented Jun 28, 2012

There are still a few issues with custom install paths that I'm ironing out. For now, I suggest you just cd public and do jam install ... from there.

@mattma
Copy link
Author

mattma commented Jun 28, 2012

That sounds good.

Is there a package of lodash.js(http://lodash.com/) in Jam Package? I love underscore.js a lot but lodash.js seems getting lots of attentions lately. lots of backbone app developers start switching underscore to lo-dash. Thanks.

@caolan
Copy link
Owner

caolan commented Jun 28, 2012

lodash.js looks cool, I've just published a package for it, so you can now jam install lodash if you like ..unfortunately the backbone package depends on underscore and I haven't provided a way to use alternative dependencies yet (working on it!). One option might be to create a symlink from jam/underscore to jam/lodash until then (this might case problems when you try to jam upgrade though).

@mattma
Copy link
Author

mattma commented Jun 29, 2012

First. cd public folder technique works, we could go ahead to close this issue.
Second, thank you very much for adding the lodash.js support on Jamjs.

For the alternative dependencies, my suggestion would be two different backbone installation, one with default setting underscore.js using jam install backbone, another alternative one could call backbone-lodash since users should know exactly what they are doing by calling jam install backbone-lodash. I guess that you could duplicate the current backbone package.json and swap the dependency value. Well, I am not an Jamjs expert and you are.

By the way, I found a really interesting project from Google chrome team. http://yeoman.io/ http://addyosmani.com/blog/improved-developer-tooling-and-yeoman/ checkout those two links and you should know a little bit about yeoman. It seems like yeoman is doing kind of the same thing like jamjs but with lots of more, I could be wrong on that since they are currently not released yet. I love jam a lot because it works the same like npm. Yeoman could also watch/compile sass/coffeescript, and image optimization, r.js supports. Tell me what do you think about it? Thanks.

@caolan
Copy link
Owner

caolan commented Jun 29, 2012

From what I can tell, yeoman is an opinionated take on web development (and I don't mean that's a bad thing) that tries to collect the best set of tools including an unreleased package manager. Jam will always just be a package manager and won't try to be anything more. I want to make sure people can use it in whatever stack and framework they like.

As for r.js support, jam already uses r.js in the compile command, and the packages are compatible with the RequireJS optimizer (r.js) in general, so it should be easy to use in your tool chain with Jam. As for watch, sass compilation etc. I don't think this would be an area for Jam to get involved, there are already good tools for doing this stuff.

I'm trying my hardest to stick to the unix philosophy of "do one thing and do it well", despite the huge temptation to throw together all my favourite tools from the web like Yeoman is doing ;)

@caolan
Copy link
Owner

caolan commented Jun 29, 2012

Oh, and I'll close this issue in favour of a more general "fix custom install paths" issue ;)

@caolan caolan closed this as completed Jun 29, 2012
@mattma
Copy link
Author

mattma commented Jun 30, 2012

I totally agree with you. I love Jam and tell all of my friends about it. You did an awesome work. Thanks.

@jdalton
Copy link

jdalton commented Jul 19, 2012

Thanks for the Lo-Dash shout-out I will start publishing to Jam too

@caolan
Copy link
Owner

caolan commented Jul 19, 2012

@jdalton if you sign-up on the Jam website I'll switch ownership of the Lo-Dash package to you, just let me know what your username is :)

I'm looking for a way to prompt users whether they'd like to use Lo-Dash when a package asks for Underscore as a dependency. Same for Zepto and jQuery. It's not available yet, but hopefully soon!

@jdalton
Copy link

jdalton commented Jul 19, 2012

@caolan Thanks, all signed up, the username is jdalton :)

@caolan
Copy link
Owner

caolan commented Jul 19, 2012

@jdalton You're now the proud owner of http://jamjs.org/packages/#/details/lodash, feel free to remove me as owner too if you like. :)

@mattma
Copy link
Author

mattma commented Jul 20, 2012

Thanks. jdalton. I just got the latest from Jam. The version is 0.3.2. But the current Lodash version is 0.4.2. Take your time for updating.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants