You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get a minimal setup to work in the browser for a couple of hours now, to no avail. I think it would be useful to explain how the require pattern can be used. It might help javascript noobs like myself on their way.
Thanks, browserify seems to do the trick! I'll see if I can get a working example and send a pull request with added documentation about build instructions. Do you have any thoughts about rewriting from common-js to AMD?
I'm glad it helped. No, I'm not going to rewrite in AMD. I may rewrite in
ES6 modules once the tool ecosystem is more mature for them though.
On Wed, Sep 10, 2014 at 2:50 AM, Jouke Waleson [email protected]
wrote:
Thanks, browserify seems to do the trick! I'll see if I can get a working
example and send a pull request with added documentation about build
instructions. Do you have any thoughts about rewriting from common-js to
AMD?
—
Reply to this email directly or view it on GitHub #105 (comment).
Activity
creationix commentedon Sep 9, 2014
js-git is packaged as common-js. You'll need to use some sort of build system to pre-process the files for use in the browser. I usually either do it server-side in wheaty https://github.com/creationix/wheaty-cjs-bundler or client side. https://github.com/creationix/tedit/blob/master/build/ui/loader.js
You could probably use browersify too, but I haven't tried in a while. http://browserify.org/
creationix commentedon Sep 9, 2014
Here is a example of using wheaty-cjs-bundler. https://github.com/creationix/conquest/blob/svg/conquest.js
This repo is served with wheaty https://github.com/creationix/wheaty. Since the file is marked as executable in git and starts with
#!jsit will be run server-side in wheaty and serve the result to the browser.jtwaleson commentedon Sep 10, 2014
Thanks, browserify seems to do the trick! I'll see if I can get a working example and send a pull request with added documentation about build instructions. Do you have any thoughts about rewriting from common-js to AMD?
creationix commentedon Sep 10, 2014
I'm glad it helped. No, I'm not going to rewrite in AMD. I may rewrite in
ES6 modules once the tool ecosystem is more mature for them though.
On Wed, Sep 10, 2014 at 2:50 AM, Jouke Waleson [email protected]
wrote:
kumavis commentedon Sep 17, 2014
@jtwaleson would like to see your work, as I plan to use this with browserify
rksm commentedon Jun 22, 2016
A browserified version of js-git (that uses promises instead of generators) can be found here: https://github.com/LivelyKernel/js-git-browser.
Thx @creationix for this great project!