Open tunnckoCore opened 9 years ago
hmm.. ooookey, logic. it is .importCSS
but it only expects 1) already expanded css (I mean it should be expended if it is nested) 2) valid css.
Yep, you are right. There is no easy way to support that SCSS-ish syntax. Maybe if there is some SCSS to JSON parser.
if I have
css = {...}
Absurd().add(css).compile();
where do I put `{minify: true}'?
@offthegrass you should pass minify: true
to the compile
method. For example:
.compile(function() {
// ...
}, { minify: true });
Yea, this callback-first is confusing. We should change this api :)
Yep, I wonder why I did it that way. I'll leave this issue open so I can take care.
cool, thanks.
I'm using a package that's written in coffeescript, so I js2.coffee'd - here's how it comes out:
api.compile (->), minify: true
it works, but wtf?! (->)
How to compile from given CSS string?
it seems that there's no such feature and also the api is not so node-way-friendly like here
api.compile(function(){}, {minify: true})
, which should be used to if you want to compile synchronously and give optionsmove all callbacks to the end. it is hard job to promisify the api.