-
Notifications
You must be signed in to change notification settings - Fork 686
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
Provide global namespace version (no require.js) #27
Comments
Have you tried using https://github.com/jaredhanson/deamdify? |
Oops, closing and reopen are my faults. I tried dirs
And exec main.js is here.
It works but need many procedures. (and need to merge manually after that) Anyway, if this way are refined, common.js users can use famo.us easily but only common.js users. Almost develpper can't choose their own building system under constructuring. My point of view is current using way is only for requirejs. I think providing all included file are easy to use if famous can. |
I'd also be interested in seeing a version that doesn't use require.js. |
For what it is worth you can change the name space in the requirejs config I personally have not played with either but I know @andredeandarade has.
|
browserify-ftw worked wonders for me; you only need a minimal config to get it working. Make sure there's nothing else in your working directory besides the famous folder before you do this, or browserify-ftw might mess with them too! Create these three files in the directory containing the main famous folder: require.js Then run It'll transform all the files in place (and create a few extra files outside of the famous folder). You can delete all the extra files when you're done. While this works, it sure as hell is clunky so I might start working on forking a brunch skeleton for Famous that uses the CommonJS format. |
@jdiaz5513 Let me know how browserify-ftw could be modified (beyond your instructions above) to get it working out of the box with no modifications. If it is reasonable, I can submit another pull request to browserify-ftw since I'm already familiar with that repo (since I made most of the changes that allow it to work nicely with famous code). I'm particularly interested in knowing the reason why those changes you made were necessary. i.e. what side effects did you observe without them that were undesirable? (FWIW I used browserify-ftw as a library and not as a CLI tool, so I'm not familiar with its CLI behavior). To make things easier for others and to make this repeatable in other repos, add the following script to
|
The indent behavior for me was odd. I was expecting {indent: 2} to refactor all the code to an indent spacing of two, but instead what it (appears) to do is leave the require statements at indent level 0, and then everything below it got an indent of 2. I don't really see how that is useful at all? The browserify-ftw command-line would be super useful if it had an option to just target a specific folder in "library mode", with the above config implied. No main entrypoint, do not generate browserify bundle build files, and add a flag to disable dryrun so you don't need a refactor config file either. It should be as simple as this: I'll have to look into using browserify-ftw as a library, maybe that'll be illuminating (I was assuming it was just a CLI tool). |
@mizchi @jdiaz5513 I put together a port of Famo.us to CommonJS here: https://github.com/aelr/famous-commonjs |
@aelr Great! And I created global namespace version by use your modules. What I want is this repository's |
👍 |
I'm closing this for right now. Please feel free to reopen if you do not feel like you found the necessary answers in here |
I want to integrate famo.us to my apps but my environment hevily depends on common.js(browserify). So it's difficult to use by conflicting
require
function. Maybe I can do with some hacks, but not comfortable at least.I need all concated files or custom building kitchean if files are huge like jquery.
For example,
will be
It's no problems to use.
I'm not going to deny
require.js
but now difficult to say it is de facto standard. (of cource current way will be left anyway)I tried
r.js
to concat files but it can't resolve require.js dependencies.(Sorry, I'm not well atrequire.js
ecosystems)https://gist.github.com/anonymous/10731828
The text was updated successfully, but these errors were encountered: