-
Notifications
You must be signed in to change notification settings - Fork 106
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
It works without the need of example/index.html
almost
#66
Comments
But yea, budo is awesome! |
Sorry. I'm not sure I'm following. Is your main issue that there is no way to "inject" or add a css file to the generated |
Mm, just digging. But something like that. Just also to have css entry by default as have that in memory bundle, without the need to write custom index.html to the served directory - which works currently and is the workaround and is pretty enough, imo. Just thinking. |
For example. We have
and run
which currently works, but dont have styles, because it not include them to the I think it should be done with same strategy used for "bundle". Because the current served <html>
<head>
<meta charset="utf-8">
<style type="text/css"></style>
</head>
<body crossrider_data_store_temp="{}">
<script type="text/javascript" src="http://localhost:35729/livereload.js?snipver=1"></script>
<script src="foo.js"></script>
</body></html> it seems that it injects some empty <link rel="stylesheet" href="main.css"> |
But, hm. When i rethink it, it's almost nonsense. But yes, it would be the case if everything on the page would be served dynamically through for example var div = document.createElement('div')
div.textContent = 'foo'
div.style.background = 'red'
div.style.width = '100px'
div.style.height = '100px'
document.body.appendChild(div) it can be easier if we have default styles endpoint added to the served in-memory |
I think this issue can be closed since there is #67 for CSS/title options. |
Actually, initially i was surprised why there is needed index.html when it use
simple-html-index
. But yea, almost. Javascript works, but it not sets the style. (lib/server.js#L172)I think that it should also servers default css. I mean... basically I understand what it happens under the hood, without looking the code deeply. For example, if we have
It browserifies
other.js
tofoo.js
(or whatever you defined it),mark it as "bundle"
and keep it in memory and start listening on
index.html
route (if we pass--dir
, im not sure), then that route usesimple-html-index
which use that "bundle" and serves that default index, without writing the bundle andindex.html
to disk. But it also would be useful to have default styles endpoint. And yea, i see that we can change this behaving if we write our index.html file, but ye.Talking about
next
branch.The text was updated successfully, but these errors were encountered: