Comments (8)
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.
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.
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.
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.
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.
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.
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.
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)
- Prefixes not working HOT 1
- Watch @import files HOT 4
- debugger in tests HOT 1
- Support external source maps
- may be the prefix should be add to some css value too? HOT 2
- Add ignore-errors option HOT 1
- Myth Logo? HOT 1
- Passing options, such as paths, to importer HOT 3
- Test suite hangs, then fails HOT 1
- Update rework-import dependency
- What is to be the fate of this project? HOT 8
- Support inline css / Polymer style modules
- Problem with Node 6 HOT 2
- Calc Inaccurate? HOT 2
- Define variables in media queries?
- var not allowed in media (declaration)
- Only for node.js ? HOT 1
- obj.hasOwnProperty is not a function HOT 7
- Is this project still maintained? HOT 2
- myth.io error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myth.