Code Monkey home page Code Monkey logo

Comments (7)

fwenzel avatar fwenzel commented on August 15, 2024

docs/index.rst says you'll need a less compiler, but I think you shouldn't need that unless you want to compile/minify CSS for deployment.

Btw, just adding the LESS script to the template does not seem to work, I think that's a bug in jingo-minify, it fails to set rel="stylesheet/less" for less files so the script does not pick up those files. Sounds fixable :)

from bedrock.

jlongster avatar jlongster commented on August 15, 2024

I mentioned the exact same thing to jsocol, and he pointed out that it's actually type="text/less" that need to be set (I think). Regardless, we probably should make this work. I like the fact that it compiles it server-side so that it's not always having to dynamically parse LESS, but it is annoying to have node as a requirement.

We can include the js compiler and spit out the appropriate markup if the node compiler isn't installed. I'll poke around jingo-minify to see if there's a way to get it to spit out the right rel or type, whichever's needed.

from bedrock.

fwenzel avatar fwenzel commented on August 15, 2024

Thanks!

lesscss.org says: <link rel="stylesheet/less" type="text/css" href="styles.less">

from bedrock.

fwenzel avatar fwenzel commented on August 15, 2024

I also agree that precompiling is neat, but I think that's something optional. We could insert the JS compiler iff the PREPROCESS setting is set to False (and TEMPLATE_DEBUG=True, of course), otherwise let node do its thing.

from bedrock.

fwenzel avatar fwenzel commented on August 15, 2024

FWIW, I upstreamed this issue to jingo-minify: jsocol/jingo-minify#20

from bedrock.

jlongster avatar jlongster commented on August 15, 2024

Cool. We had a few more problems doing it server-side, so I would like to see this happen. I can try to get this done next week.

from bedrock.

jlongster avatar jlongster commented on August 15, 2024

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=738406

from bedrock.

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.