Giter Club home page Giter Club logo

Comments (6)

tunnckoCore avatar tunnckoCore commented on July 23, 2024

But yea, budo is awesome!

from budo.

mikkoh avatar mikkoh commented on July 23, 2024

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 index.html file?

from budo.

tunnckoCore avatar tunnckoCore commented on July 23, 2024

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.

from budo.

tunnckoCore avatar tunnckoCore commented on July 23, 2024

For example. We have app.js and also want to have something like main.css. With this structure

public/main.css
app.js

and run

budo app.js:foo.js --live --dir public | garnish

which currently works, but dont have styles, because it not include them to the simple-html-index which is in-memory and isn't written to disk.

I think it should be done with same strategy used for "bundle".

Because the current served simpe-html-index is

<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 style tag. I think it would more useful if it is link tag

<link rel="stylesheet" href="main.css">

from budo.

tunnckoCore avatar tunnckoCore commented on July 23, 2024

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 bundle.js and also will need to style this dynamic content.

for example app.js can be

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 simple-html-index.

from budo.

mattdesl avatar mattdesl commented on July 23, 2024

I think this issue can be closed since there is #67 for CSS/title options.

from budo.

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.