Tailwindcss: Tailwind CLI Build โ€“ Output in Shell not file

Created on 1 Nov 2017  ยท  11Comments  ยท  Source: tailwindlabs/tailwindcss

Tailwind is such a good concept! I love to use it in the future :)
Thanks for your hard work!!

Using Tailwind CLI for simple projects or just giving Tailwind a spin is a great idea too, but it don't work for me. The build command makes the output to the shell, not in a file. The command and file structure is the same like in the documentation.

Is it only on my computer or is it a bug?

Most helpful comment

Hey @patrikkernke! By default it outputs to the shell (in case for whatever absurd reason you wanted to pipe it into something else), but if you provide an output file using the -o flag, it will write the output there.

That said, there was a bug with this command in the 0.1.0 release that caused it to not write the file no matter what. That's been fixed but we haven't published the patch yet. I'll do it now :)

All 11 comments

Hey @patrikkernke! By default it outputs to the shell (in case for whatever absurd reason you wanted to pipe it into something else), but if you provide an output file using the -o flag, it will write the output there.

That said, there was a bug with this command in the 0.1.0 release that caused it to not write the file no matter what. That's been fixed but we haven't published the patch yet. I'll do it now :)

Okay super :) Thank you for the quick reply.

oh men, I was wandering around in this for a while, thanks for commenting, to confirm the -o flag didnt work for me either, waiting for the update.

thanks and awesome work

@adamwathan I was hitting my head on this issue!! the output css was always going to console, instead of a file even after giving the -o flag.. Waiting for the update..

I thought it is my npm version or some custom configuration on my computer :)
I am glad that @adamwathan is so quick ;)

Sorry for the drama folks! ๐Ÿ˜„

v0.1.1 is now on npm and should fix this issue ๐Ÿ‘

@adamwathan updated my package and was able to create the output file... but CLI still show version 0.1.0 when running tailwind --version.

The output is now correct, for me that is the quickest bugfix in a github repo. From posting it to fix on my computer only 25min :)

Keep on your the amazing work!

as the issue is still open, looks like the config file path is not "configurable" or not working on cli
https://github.com/tailwindcss/tailwindcss/blob/8e752f8e3ab8c54e42579764007480a3809ab6d5/src/cli.js#L78

I am not an expert just digging around with some console.log() debugging found that the config wildcard could be accessed using program.args[1].config

can anyone confirm? or am I doing something wrong??

@eduarguzher You're right, I am an idiot and should have updated that option at the same time as the output file option ๐Ÿ˜ฉ Fixing!

This is all fixed up in v0.1.2 ๐Ÿ‘

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chasegiunta picture chasegiunta  ยท  3Comments

nternetinspired picture nternetinspired  ยท  3Comments

ghost picture ghost  ยท  3Comments

spyric picture spyric  ยท  3Comments

benface picture benface  ยท  3Comments