GithubHelp home page GithubHelp logo

Comments (8)

mstade avatar mstade commented on May 29, 2024

This sounds like it's out of scope of what Myth is trying to do. Myth takes the CSS syntax of tomorrow and compiles it into the syntax of today. Optimizing that code is probably best handled by a separate, focused tool to do just that.

from myth.

ianstormtaylor avatar ianstormtaylor commented on May 29, 2024

hmm yeah, it seems out of scope for the node api itself. but since lots of the preprocessors (all?) include a way to minify to ease the workflow i could see that putting it in scope for the CLI

ah but then its in Rework already, so maybe just easier to make it in scope everywhere :)

from myth.

mstade avatar mstade commented on May 29, 2024

I think you should do whatever lets you focus on the mission statement: providing future CSS syntax capabilities today. Maybe I'm being too much of a puritan here, but I reckon code optimization doesn't fall in to that bucket and is probably best handled by whatever tool fits that bill.

from myth.

martinkr avatar martinkr commented on May 29, 2024

I agree: myth should focus on the mission statement. I personally prefer a "one app - one task approach", this enables me to use whatever css optimizer / linter / tool in my build process and switch them easily.

from myth.

SamHasler avatar SamHasler commented on May 29, 2024

If you also add sourcemap support with the minification that would allow someone to see and edit the input.css in their browser's dev tools, instead of seeing just the output.css.

from myth.

michaelrhodes avatar michaelrhodes commented on May 29, 2024

I also think minification should be left to a separate program. clean-css (for example) already plugs in quite nicely: cat input.css | myth | cleancss > output.css

from myth.

ianstormtaylor avatar ianstormtaylor commented on May 29, 2024

k yup, agreed. out of scope for myth, better to stay small and good at one thing. either use sqwish or clean-css

or minify if you want an easy-to-remember api for all of em :)

from myth.

tomsugden avatar tomsugden commented on May 29, 2024

The curious thing here is that Myth is basically a packaging up of Rework with a fixed set of plug-ins, and as @ianstormtaylor mentioned, Rework supports compression, but this is obscured by the Myth CLI.

https://github.com/reworkcss/rework#reworktostringoptions

If you did want to use the Rework compression instead of cleancss or an alternative, you could use Myth indirectly as a Rework plugin instead of the CLI:

https://github.com/segmentio/myth#nodejs

from myth.

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.