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

Install plugin from CLI #304

Merged
merged 18 commits into from
Mar 29, 2020
Merged

Conversation

jeparlefrancais
Copy link
Contributor

Closes #200

I added a new subcommand to manage rojo's plugin.

rojo plugin install
rojo plugin uninstall

It uses roblox_install to locate the plugins folder, and inserts a rojo-$CARGO_PKG_VERSION.rbxmx file.

When packing the plugin files, I filter files ending with .spec.lua to reduce the size of the plugin (and the cli itself too since it's included inside of it)

Let me know what you think of that!

Copy link
Contributor

@LPGhatguy LPGhatguy left a comment

Choose a reason for hiding this comment

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

Finally had time to go through this change. It looks very good, most of my comments are about minor Rust things!

src/cli/plugin.rs Outdated Show resolved Hide resolved
src/cli/plugin.rs Outdated Show resolved Hide resolved
src/cli/plugin.rs Outdated Show resolved Hide resolved
src/cli/plugin.rs Outdated Show resolved Hide resolved
src/cli/plugin.rs Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
build.rs Show resolved Hide resolved
src/cli/plugin.rs Outdated Show resolved Hide resolved
src/cli/plugin.rs Outdated Show resolved Hide resolved
jeparlefrancais and others added 11 commits March 20, 2020 17:03
Co-Authored-By: Lucien Greathouse <me@lpghatguy.com>
Co-Authored-By: Lucien Greathouse <me@lpghatguy.com>
* Print `rerun-if-changed` even for directories, in order to run the
  build.rs script when files are added.

* Switch `filter_map` loop to a regular for loop. I like the FP-style
  iterator stuff in Rust, but I think Result handling is easier in a
  normal loop. Also, I don't believe the result of read_dir implements
  `ExactSizedIterator`, so some of the wins of map+collect aren't there.
@LPGhatguy LPGhatguy dismissed their stale review March 29, 2020 20:06

Helping make changes!

@LPGhatguy LPGhatguy merged commit 3cf82e1 into rojo-rbx:master Mar 29, 2020
Dekkonot pushed a commit to UpliftGames/rojo that referenced this pull request Jan 11, 2024
* add install command

* cargo fmt

* filter spec files

* Update src/cli/plugin.rs

Co-Authored-By: Lucien Greathouse <me@lpghatguy.com>

* Update src/cli/plugin.rs

Co-Authored-By: Lucien Greathouse <me@lpghatguy.com>

* fix comments

* encode plugin with rbx_binary

* update build script

* refactor pathbuf error into io error

* fix rojo typo

* remove snafu

* Update `snapshot_from_fs_path`

* Print `rerun-if-changed` even for directories, in order to run the
  build.rs script when files are added.

* Switch `filter_map` loop to a regular for loop. I like the FP-style
  iterator stuff in Rust, but I think Result handling is easier in a
  normal loop. Also, I don't believe the result of read_dir implements
  `ExactSizedIterator`, so some of the wins of map+collect aren't there.

* Replace Result::unwrap with ? in build.rs

* Simplify error handling code in runtime

* Checkout with submodules

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
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.

Install plugin from CLI
2 participants