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

Modifing index.html only for production #2244

Closed
spruce opened this issue Oct 7, 2014 · 4 comments
Closed

Modifing index.html only for production #2244

spruce opened this issue Oct 7, 2014 · 4 comments

Comments

@spruce
Copy link

spruce commented Oct 7, 2014

Hello,
I'm trying to come up with a solution to insert a script tag into the production index.html. Currently I do this manually. I looked into creating a addon but find it a little to bloated just for adding one tag.

Is there a better/cleaner solution and if not can you point me to a resource where I can differenciate between the environments in an addon?
Thanks.
And BTW: Nice work with ember-cli and 0.1 in particualar. soooo fast :)

@spruce
Copy link
Author

spruce commented Oct 7, 2014

Well actually that is an external script, which adds complexity.
For own scripts this: https://github.com/gdub22/ember-cli-inline-content
nearly does what I need (only thing left is to diff. between dev or prod)

@jakecraige
Copy link
Member

An addon could definitely do this fairly easily. That plugin does look pretty cool though, I'd open an issue in their repo to add environment support.

Until then, one way to handle this is that you could do an if in your Brocfile before initializing the ember app on process.env.EMBER_ENV and only included your script if it === 'production'

@gpoitch
Copy link

gpoitch commented Oct 7, 2014

@spruce im working on supporting this in the add-on if you want to close this and open an issue over there.

@spruce spruce closed this as completed Oct 7, 2014
@spruce
Copy link
Author

spruce commented Oct 7, 2014

@gdub22 I just cloned your addon and trying to get it to work :)

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

3 participants