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

Move init code from dist/index.html into a separate file? #952

Closed
bebraw opened this issue Feb 23, 2015 · 2 comments
Closed

Move init code from dist/index.html into a separate file? #952

bebraw opened this issue Feb 23, 2015 · 2 comments

Comments

@bebraw
Copy link

bebraw commented Feb 23, 2015

Currently consuming the project as a NPM dependency is a little bit problematic. You'll have to set up a build to copy /dist somewhere and then overwrite index.html with a custom one. The problem with this is that index.html might have received changes beyond just JavaScript (ie. deps change or something).

To make it easier to consume swagger-ui this way it would be beneficial to push the init bit (ie. $(function () { ...) into a separate file (say init.js) and point at that from index.html. In this case you would effectively avoid the problem I described above as long as the file name remains the same.

Related to apigee-127/swagger-tools#163 .

@webron
Copy link
Contributor

webron commented Feb 23, 2015

I believe this is a duplicate of #804.

@bebraw
Copy link
Author

bebraw commented Feb 23, 2015

Yeah. Excellent point!

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