Skip to content

Add basic CLI#44

Merged
devongovett merged 7 commits intoparcel-bundler:masterfrom
schultyy:add-cli
Jan 15, 2022
Merged

Add basic CLI#44
devongovett merged 7 commits intoparcel-bundler:masterfrom
schultyy:add-cli

Conversation

@schultyy
Copy link

This PR ships with a basic implementation of a CLI for parcel-css using clap-rs.

Resolves #36

@height
Copy link

height bot commented Jan 14, 2022

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@devongovett
Copy link
Member

Hey, thanks for starting this! I'll try it out tomorrow. 😄

@joelmoss
Copy link
Contributor

Would be awesome if the CLI could (optionally) return the output to stdout instead of writing to a file :)

@schultyy
Copy link
Author

Done!

Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Nice work. Looks like it will be pretty easy to add more features on top of it too!

@devongovett devongovett merged commit eaff765 into parcel-bundler:master Jan 15, 2022
@schultyy
Copy link
Author

Yay! Thanks! Happy I could contribute!

@joelmoss
Copy link
Contributor

Apologies for my lack of Rust knowledge, but how would I actually use this CLI?

@devongovett
Copy link
Member

devongovett commented Jan 17, 2022

We still need to figure out a nicer distribution method once we have a few more features (#52), but for now you can install with cargo:

cargo install parcel_css --version 1.0.0-alpha.12

And that gives you a global parcel_css binary.

@joelmoss
Copy link
Contributor

Is the resulting binary platform dependent? As in, it is compiled for the platform/OS you run that command on?

@rrcobb
Copy link
Contributor

rrcobb commented Jan 17, 2022

Is the resulting binary platform dependent? As in, it is compiled for the platform/OS you run that command on?

It should be platform independent, so long as you have the appropriate local rust setup, via rustup! If you cargo install something, it should always be fit to your platform. See more on the install command's page in the The Cargo Book.

@mischnic
Copy link
Member

As in, it is compiled for the platform/OS you run that command on?

It is compiled on the machine you run the command on. So in that sense:

Is the resulting binary platform dependent

no. But it will run on your machine

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

Successfully merging this pull request may close these issues.

Add a basic CLI

5 participants