Skip to content
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

Configurable path to ios and android main.cljs #34

Closed
petterik opened this issue Apr 1, 2016 · 4 comments
Closed

Configurable path to ios and android main.cljs #34

petterik opened this issue Apr 1, 2016 · 4 comments

Comments

@petterik
Copy link

petterik commented Apr 1, 2016

Problem

The path to android and ios main.cljs is currently hardcoded to env/{dev|prod}/env/{ios|android}/main.cljs
The command re-natal use-figwheel cannot be configured to match my project structure (see My use case).

Suggestion

It would be nice to have the path to {dev|prod}/env/{ios|android}/main.cljs configurable, i.e. having dir env configurable. To put something in .re-natal like:

{
...
  "envRoot": "env",
...
}

My use case

I have a lot of platforms and mains - server, web and mobile - and I'd like to have the same structure for all my mains. Here's part of my current structure:

env/client/dev/web/main.cljs
env/client/prod/web/main.cljs
env/client/dev/ios/main.cljs
env/client/prod/ios/main.cljs
env/client/dev/android/main.cljs
...
env/common/dev/utils.cljc
...
env/server/dev/server/main.clj
env/server/dev/server/repl.clj
...

In my case, I'd configure .re-natal: "envRoot": "env/client"

@drapanjanas
Copy link
Owner

I think it makes sense to have such configuration possible.
Currently hardcoded path is like this env/dev/env/ios/main.cljs.
So it would become #{envRoot}/dev/env/ios/main.cljs. In your use case the paths would be a bit different that you currently have:

env/client/env/prod/ios/main.cljs
env/client/env/dev/android/main.cljs

It would still work for you I guess.
Feel free to submit PR if you have it working alreadt. I also can do it myslef some time.

@petterik
Copy link
Author

petterik commented Apr 2, 2016

Yes, exactly.

I don't have it working. I tried to create a PR real quick, but I got stuck when I had to create dirs recursively. Never having done node or coffeescript programming, I googled for while and ended up reading reading a mkdir-p lib, then called it quits ✌️

@drapanjanas
Copy link
Owner

No problem, I'll also give it a shot.

@drapanjanas
Copy link
Owner

Done, will be part of next release.

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

No branches or pull requests

2 participants