Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Support multiple config files #57

Closed
eskimoblood opened this issue Jul 18, 2012 · 1 comment
Closed

Support multiple config files #57

eskimoblood opened this issue Jul 18, 2012 · 1 comment

Comments

@eskimoblood
Copy link

I've a project where I wanna build 4 different versions of my app, one for iPhone / iPad and german/english. All should use the same boot.js:

requirejs(['app', [i18n]], function(app, i18n) {
 app.start(i18n);
});

For every version I've set the path to app and i18n to the specific iphone/ipad german/english version.

So, as requirejs' optimizer don't support multiple modules with the same name I've build a small node task that creates the config files dynamically. As we switch to requirejs-rails, we have the same problem as before.

So is there a way to have multiple config files for requirejs-rails?

@jwhitley
Copy link
Owner

jwhitley commented Jan 5, 2013

The gem doesn't currently support multiple config files, but it does pre-process config/requirejs.yml with ERB. So depending on your needs, you could provide a setting (even if just an environment variable) that chooses the particular build behavior you need. That kind of usage might integrate well with a Jenkins or other CI tool, which could do several build runs with the appropriate parameters. You could probably also just setup a single rake task to produce all the variant builds.

@jwhitley jwhitley closed this as completed Jan 5, 2013
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

2 participants