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

list blocks to stdout #6

Closed
joh-klein opened this issue Mar 27, 2017 · 7 comments
Closed

list blocks to stdout #6

joh-klein opened this issue Mar 27, 2017 · 7 comments

Comments

@joh-klein
Copy link

What do you think of an option like this, so just output to stdout a json with the files so that they can be used elsewhere?

@nelsyeung
Copy link
Owner

The API version of this already has this function: nelsyeung/usemin, where it can return the relevant objects. I guess you just want me to incorporate it into this CLI tool where it writes it into a JSON file? Although I would recommend maybe just using the API if you want more manipulation.

@joh-klein
Copy link
Author

Yeah, I saw that usemin api returns these things. And I was actually thinking about using it. But the cli would be enough. And maybe others (that have to support legacy projects and can't use webpack just yet) appreciate this as an option as well.

@nelsyeung
Copy link
Owner

So currently I'm thinking of adding a --listblocks argument with the options stdout and filename.json which will write to stdout and a json file, respectively, from what the getBlocks function returns. Is this what you are thinking?

@joh-klein
Copy link
Author

Sounds perfect!

nelsyeung pushed a commit that referenced this issue Mar 28, 2017
@nelsyeung
Copy link
Owner

Before I publish, do you mind playing around with the update I've added.
You can install from GitHub using:

git clone https://github.com/nelsyeung/usemin-cli.git
cd usemin-cli
npm link

@joh-klein
Copy link
Author

Nice. I just tried it. Works pretty much as expected. Thanks a lot! I would have thought that --listblocks without an argument would print to stdout, but its fine either way.

@nelsyeung
Copy link
Owner

nelsyeung commented Mar 28, 2017

I've made it default to stdout and the new version is now published. :)

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

No branches or pull requests

2 participants