-
Notifications
You must be signed in to change notification settings - Fork 361
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
Proposal for serve command? #77
Comments
@olstenlarck Hi, I put together a small wrapper on microbundle that will serve your files and give you live reload. You can find the repo here https://github.com/fwilkerson/microenvi. It still needs a few features, but has served me well for prototypes and some browser environment libraries I've been working on. |
Why don't we add a link to Microenvi to the readme? I like the idea of keeping build + serve separate - in my case, I only use Microbundle for libraries, so I don't need the server bit. |
That would be cool, I just put up a new version to go with 0.4.4. Perhaps link to it and other things using microbundle between roadmap and license? |
Yup! That'd be great, if you want to PR :) |
first off, thanks so much for making this useful project! it reduces all the unnecessary boilerplate build-step BS I am not fond of that is so prevalent these days. @developit: do you feel strongly about not including this in the core project? I have used @mattdesl’s https://github.com/mattdesl/budo for a lot of projects. it ships with a local-dev server, but the project is admittedly more aimed for web-app development. in the projects I am working on that use any appetite for including that setup or @fwilkerson's |
I'm not entirely against including a serve command. It would need to be useful for libraries though, not just web apps - maybe allow passing an alternative entry module so that a lib could |
@developit I found this issue looking up how to do exactly that. I'm making a component to publish on npm and I'm planning on using I think one of these might be nice: Default valuesOverriding the default values may become a concern at some point depending on what issues could arise. But defaulting to a tree structure like the following seems logical where
Pass filenames to servemicrobundle serve demo/public/index.html demo/index.js Package.jsonWe could keep the information for serving in the "demo": {
"public": "demo/public/index.html",
"entry": "demo/index.js"
} |
I was looking at the directories.example for "directories": {
"example": "path/to/my/demo-folder"
} |
Something like https://github.com/lukejacksonn/servor seems like it would pair really well with microbundle |
Heya! 🎉
First of all, yea.. it is not for apps (i think?), but it is possible to some extent. So we may include
rollup-plugin-serve
or*-server
, androllup-plugin-livereload
.Currently you can use watch and in another terminal to use some static serving tool, like wrapping
micro(-dev)
or directly usserve
/budo
. Budo is good enough and has livereload, but it bundles one more time unneccesary (cuz the trick is tobudo dist/bundle.cjs.js --live
). Also, you need to handle cleaning ofdist
and creating aindex.html
. So the scripts are something like thatThe text was updated successfully, but these errors were encountered: