Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli for extracting css from a module #29

Closed
threepointone opened this issue Aug 26, 2016 · 7 comments
Closed

cli for extracting css from a module #29

threepointone opened this issue Aug 26, 2016 · 7 comments

Comments

@threepointone
Copy link
Owner

threepointone commented Aug 26, 2016

the goal is to make these work -
glamor ./src/app.js -cc ./src/app.css #css only
glamor -./src/app.js -d lib #html/css/ids
cat src/*.js | glamor | jq #pipe in and out

@vutran
Copy link
Contributor

vutran commented Aug 27, 2016

Hi @threepointone, first I'd like to thank you for creating a great framework. I began using this in my most recent app and am loving so far. I'm interested in helping contributing to this project and want to see if this feature is available for the taking and if you currently have a preference for which CLI toolkit you want to use?

@threepointone
Copy link
Owner Author

threepointone commented Aug 27, 2016

Hi, thanks!

  • I like minimist
  • I have some preliminary work in src/extract.js
  • I also want to support streaming in source/streaming out css, and also outputting a json dump of html/css/ids
  • A complicated part is that src/app.js might be written in babel/jsx/flow/etc, so unsure on a clean way of dealing with that

@threepointone
Copy link
Owner Author

Can you give me more feedback on your usage? Do you use the css prop shim? What is your usecase? Anything I can make better? Please, and thank you!

@vutran
Copy link
Contributor

vutran commented Aug 28, 2016

Maybe we can do without minimist or a 3rd party package since you have no dependencies right now which is awesome. Perhaps a standalone glamor-cli module would make sense as to keep the size of this repo down and just expose an extract API.

For my usage, I'm currently only using it primarily to compose styles on this app to allow composing with theme modules. Not using the css prop shim though. Haven't really taken a full look at the spec yet since I'm still reading through your code.

@threepointone
Copy link
Owner Author

minimist is small enough that I think it'll be worth the cost.
dext looks neat! you wouldn't need the cli there though, unless you want to pregenerate styles/ids for fast startup?

@thetrompf
Copy link

I agree with @vutran it is cool that you don't have any dependencies right now, and I think for now it would be okay to pull in minimist as dependency until glamor gains more maturity and then later on, when the project is more stable, it could be nice to split the cli part in an independant package, but I believe right now it would be a pain to maintain.

@threepointone
Copy link
Owner Author

closing this for now, will open if anyone has anything to show and tell :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants