mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 04:51:47 +00:00
Merge branch 'master' of https://github.com/boatbomber/rojo into headless-api
This commit is contained in:
commit
c9ca6bed74
5 changed files with 10 additions and 11 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
local HttpService = game:GetService("HttpService")
|
||||||
|
|
||||||
local Rojo = script:FindFirstAncestor("Rojo")
|
local Rojo = script:FindFirstAncestor("Rojo")
|
||||||
local Plugin = Rojo.Plugin
|
local Plugin = Rojo.Plugin
|
||||||
local Packages = Rojo.Packages
|
local Packages = Rojo.Packages
|
||||||
|
|
@ -36,7 +38,7 @@ function StudioPluginGui:init()
|
||||||
minimumSize.Y
|
minimumSize.Y
|
||||||
)
|
)
|
||||||
|
|
||||||
local pluginGui = self.props.plugin:CreateDockWidgetPluginGui(self.props.id, dockWidgetPluginGuiInfo)
|
local pluginGui = self.props.plugin:CreateDockWidgetPluginGui(if self.props.isEphemeral then HttpService:GenerateGUID(false) else self.props.id, dockWidgetPluginGuiInfo)
|
||||||
|
|
||||||
pluginGui.Name = self.props.id
|
pluginGui.Name = self.props.id
|
||||||
pluginGui.Title = self.props.title
|
pluginGui.Title = self.props.title
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ function ConfirmingPage:render()
|
||||||
id = "Rojo_ConfirmingSourceDiff",
|
id = "Rojo_ConfirmingSourceDiff",
|
||||||
title = "Source diff",
|
title = "Source diff",
|
||||||
active = self.state.showingSourceDiff,
|
active = self.state.showingSourceDiff,
|
||||||
|
isEphemeral = true,
|
||||||
|
|
||||||
initDockState = Enum.InitialDockState.Float,
|
initDockState = Enum.InitialDockState.Float,
|
||||||
overridePreviousState = true,
|
overridePreviousState = true,
|
||||||
|
|
@ -182,6 +183,7 @@ function ConfirmingPage:render()
|
||||||
self.props.confirmData.serverInfo.projectName or "UNKNOWN"
|
self.props.confirmData.serverInfo.projectName or "UNKNOWN"
|
||||||
),
|
),
|
||||||
active = true,
|
active = true,
|
||||||
|
isEphemeral = true,
|
||||||
|
|
||||||
initDockState = Enum.InitialDockState.Float,
|
initDockState = Enum.InitialDockState.Float,
|
||||||
overridePreviousState = false,
|
overridePreviousState = false,
|
||||||
|
|
|
||||||
|
|
@ -398,6 +398,7 @@ function ConnectedPage:render()
|
||||||
id = "Rojo_ConnectedSourceDiff",
|
id = "Rojo_ConnectedSourceDiff",
|
||||||
title = "Source diff",
|
title = "Source diff",
|
||||||
active = self.state.showingSourceDiff,
|
active = self.state.showingSourceDiff,
|
||||||
|
isEphemeral = true,
|
||||||
|
|
||||||
initDockState = Enum.InitialDockState.Float,
|
initDockState = Enum.InitialDockState.Float,
|
||||||
overridePreviousState = false,
|
overridePreviousState = false,
|
||||||
|
|
|
||||||
|
|
@ -749,6 +749,7 @@ function App:render()
|
||||||
id = pluginName,
|
id = pluginName,
|
||||||
title = pluginName,
|
title = pluginName,
|
||||||
active = self.state.guiEnabled,
|
active = self.state.guiEnabled,
|
||||||
|
isEphemeral = false,
|
||||||
|
|
||||||
initDockState = Enum.InitialDockState.Right,
|
initDockState = Enum.InitialDockState.Right,
|
||||||
overridePreviousState = false,
|
overridePreviousState = false,
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,13 @@ pub struct BuildCommand {
|
||||||
/// Where to output the result.
|
/// Where to output the result.
|
||||||
///
|
///
|
||||||
/// Should end in .rbxm, .rbxl, .rbxmx, or .rbxlx.
|
/// Should end in .rbxm, .rbxl, .rbxmx, or .rbxlx.
|
||||||
#[clap(long, short)]
|
#[clap(long, short, conflicts_with = "plugin")]
|
||||||
pub output: Option<PathBuf>,
|
pub output: Option<PathBuf>,
|
||||||
|
|
||||||
/// Alternative to the output flag that outputs the result in the local plugins folder.
|
/// Alternative to the output flag that outputs the result in the local plugins folder.
|
||||||
///
|
///
|
||||||
/// Should end in .rbxm or .rbxl.
|
/// Should end in .rbxm or .rbxl.
|
||||||
#[clap(long, short)]
|
#[clap(long, short, conflicts_with = "output")]
|
||||||
pub plugin: Option<PathBuf>,
|
pub plugin: Option<PathBuf>,
|
||||||
|
|
||||||
/// Whether to automatically rebuild when any input files change.
|
/// Whether to automatically rebuild when any input files change.
|
||||||
|
|
@ -47,14 +47,6 @@ pub struct BuildCommand {
|
||||||
impl BuildCommand {
|
impl BuildCommand {
|
||||||
pub fn run(self) -> anyhow::Result<()> {
|
pub fn run(self) -> anyhow::Result<()> {
|
||||||
let (output_path, output_kind) = match (self.output, self.plugin) {
|
let (output_path, output_kind) = match (self.output, self.plugin) {
|
||||||
(Some(_), Some(_)) => {
|
|
||||||
BuildCommand::command()
|
|
||||||
.error(
|
|
||||||
clap::ErrorKind::ArgumentConflict,
|
|
||||||
"the argument '--output <OUTPUT>' cannot be used with '--plugin <PLUGIN>'",
|
|
||||||
)
|
|
||||||
.exit();
|
|
||||||
}
|
|
||||||
(None, None) => {
|
(None, None) => {
|
||||||
BuildCommand::command()
|
BuildCommand::command()
|
||||||
.error(
|
.error(
|
||||||
|
|
@ -80,6 +72,7 @@ impl BuildCommand {
|
||||||
|
|
||||||
(studio.plugins_path().join(&plugin), output_kind)
|
(studio.plugins_path().join(&plugin), output_kind)
|
||||||
}
|
}
|
||||||
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let project_path = resolve_path(&self.project);
|
let project_path = resolve_path(&self.project);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue