Coder Social home page Coder Social logo

Comments (9)

fwilkerson avatar fwilkerson commented on May 20, 2024 2

@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.

from microbundle.

fwilkerson avatar fwilkerson commented on May 20, 2024 1

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?

from microbundle.

benadam11 avatar benadam11 commented on May 20, 2024 1

Something like https://github.com/lukejacksonn/servor seems like it would pair really well with microbundle

from microbundle.

developit avatar developit commented on May 20, 2024

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.

from microbundle.

developit avatar developit commented on May 20, 2024

Yup! That'd be great, if you want to PR :)

from microbundle.

cvan avatar cvan commented on May 20, 2024

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 microbundle, I also have an npm-run-all -p command to also run live-server with live-server-https. it works well!

any appetite for including that setup or @fwilkerson's microenvi out of the box?

from microbundle.

developit avatar developit commented on May 20, 2024

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 microbundle serve its demos?

from microbundle.

andria-dev avatar andria-dev commented on May 20, 2024

@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 microbundle and a microbundle serve command would definitely make that easier.

I think one of these might be nice:

Default values

Overriding 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 demo/index.js is injected into demo/public/index.html.

.
└── demo
    ├── index.js
    └── public
        └── index.html

Pass filenames to serve

microbundle serve demo/public/index.html demo/index.js

Package.json

We could keep the information for serving in the package.json file under something like demo:

"demo": {
  "public": "demo/public/index.html",
  "entry": "demo/index.js"
}

from microbundle.

andria-dev avatar andria-dev commented on May 20, 2024

I was looking at the directories.example for package.json and was thinking that if we defaulted to a specific folder structure one could change the folder that is used for serving via this property.

"directories": {
  "example": "path/to/my/demo-folder"
}

from microbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.