Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Split up Node API and CLI #34

Closed
necolas opened this issue Sep 25, 2014 · 4 comments
Closed

Split up Node API and CLI #34

necolas opened this issue Sep 25, 2014 · 4 comments
Assignees

Comments

@necolas
Copy link

necolas commented Sep 25, 2014

As is done with autoprefixer and autoprefixer-core. It's nice be able to install just the Node API because any module that wants to use this – or a complicated build process – is unlikely to use this tool's CLI.

@MoOx
Copy link
Owner

MoOx commented Sep 25, 2014

I've think about that too.
But I don't like the idea of a cssnext-core name.
What about a cssnext-cli than get the cli bin ?

@necolas
Copy link
Author

necolas commented Sep 25, 2014

yeah that was my first thought too - example of that approach would the karma and grunt projects

@MoOx MoOx self-assigned this Sep 25, 2014
@MoOx
Copy link
Owner

MoOx commented Sep 26, 2014

Ok I've prepared something, but after thinking about it I'm unsure if it's nice to do that, mainly for maintenance. For example to test cli, I've to duplicate some fixtures in the cssnext-cli repo.
From what I remember when I checked grunt-cli (I've already made something similar in the past for another project), the "thing"-cli doesn't contains the cli logic, it's just a wrapper to the cli.
Confirmed by this
https://github.com/gruntjs/grunt-cli/blob/6b9c34abbb08bd945fb52e9ae98c999377a44fd2/bin/grunt#L44-L45
And this
https://github.com/gruntjs/grunt/blob/master/lib/grunt/cli.js

So I'm unsure if it worth it. Grunt did that because it's mainly a cli tool & it helps to use different versions, but for example cssnext will mainly be used via nodejs directly & only occasionally run using cli or for testing purpose like you do it with suit preprocessor https://github.com/suitcss/components-grid/blob/master/package.json#L18-L19 & like I do with my poor cssrecipes.

We only have a simple bin, not a big deal don't you think ?

ps: autoprefixer did that because I were asking for a postcss-autoprefixer plugin only, & after a weird discussion, autoprefixer-core came out 💃
fyi

@necolas
Copy link
Author

necolas commented Sep 26, 2014

sgtm

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

No branches or pull requests

2 participants