Tailwindcss: Angular (2-6+) `ng serve` support

Created on 2 Jun 2018  路  2Comments  路  Source: tailwindlabs/tailwindcss

Hi Adam et al., I would like to propose adding angular-cli support to the tailwind build process, so Angular developers can benefit from tailwind without disrupting their regular development flow using angular-cli.

I'm not sure yet what changes are necessary in the actual tailwind project, and it is possible that this might be better off living in a separate node_module.

I have jimmy-rigged a chokidar script that watches tailwind files and rebuilds tailwind when changes are saved. (Check it out) Rebuilding tailwind to the global style sheet (src/styles.css) then prompts ng serve to re-run, which is the desired behavior, in my opinion.

Initially, I planned on simply packaging my script up with npm, so anyone could just install it and include the appropriate command in their prestart script or something. But, maybe there is a more convenient way to ship it along with the tailwindcss package. I will continue poking around on this topic, and I look forward to any feedback.

Most helpful comment

Cool glad to hear you were able to put something together! I don't think there's really anything we could really do to make this better on our end; Angular just needs to start properly supporting PostCSS plugins :\

All 2 comments

So, it turns out that turning my jimmy-rigged scripts into an npm module wasn't so bad! There is now a cli tool available for your tailwind + angular needs!
https://www.npmjs.com/package/ng-tailwindcss

Cool glad to hear you were able to put something together! I don't think there's really anything we could really do to make this better on our end; Angular just needs to start properly supporting PostCSS plugins :\

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexVipond picture AlexVipond  路  3Comments

dbpolito picture dbpolito  路  3Comments

Tjoosten picture Tjoosten  路  3Comments

jbardnz picture jbardnz  路  3Comments

chasegiunta picture chasegiunta  路  3Comments