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

Allow for multiple targets to be compiled at the same time #31

Closed
dariocravero opened this issue Dec 1, 2017 · 2 comments
Closed

Allow for multiple targets to be compiled at the same time #31

dariocravero opened this issue Dec 1, 2017 · 2 comments

Comments

@dariocravero
Copy link

Today we always compile A.view to A.view.js. However, if you want to run your code simultaneously across web and native, you need to stop the project and re-run the morpher, which isn't ideal.

Also, because of how create react app is designed, we can't leverage the platform specific file extensions .web.js and .native.js because if you import './A.view' it treats it as a static file.

The proposal is to output .A.js when only one target is specified and .A.web.js and .A.native.js when multiple are. The . before the name has the side effect of hiding the file in most file explorers. We can then target them in .gitignore like .*.js I think.

This change would be internal to the morpher and shouldn't affect consumers of it.

@alanmarcell
Copy link

Totally miss that. Waiting anxiously.

@dariocravero
Copy link
Author

Hey @alanmarcell, yeah, it should be a handy feature if you're working in native and web at the same time. Just in case it's not clear from the issue's description, Views already compiles to either native or web but it just does it separately, as in, you can only run the morpher once per target at a time. Have you used Views already? :)

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