rojo-rbx / vscode-rojo

Visual Studio Code plugin for Rojo
https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo
Mozilla Public License 2.0
36 stars 23 forks source link

configurable level file type #24

Closed lukechatton closed 4 years ago

lukechatton commented 4 years ago

This PR adds a "level file type" configuration option. The selection has two fields: rbxl and rbxlx.

This should resolve #23.

Note: I was only able to test this locally by setting preLaunchTask to npm: compile in launch.json. I've switched it back to npm: watch in the PR.

evaera commented 4 years ago

This PR is most of the way there, but we should allow the file type to be customizable for model files as well as place files.

The setting should be renamed to buildFileFormat, and the options should be "XML" and "binary", with the default being "XML".

Then, the file extension should be determined based on if the config root is the data model or not:

For XML: rbxlx or rbxmx For binary: rbxl or rbxm

evaera commented 4 years ago

Hi, do you plan to make these changes or should I plan to work on them myself?

lukechatton commented 4 years ago

I can work on this tonight. I'l try to get a PR submitted then.

lukechatton commented 4 years ago

This PR is most of the way there, but we should allow the file type to be customizable for model files as well as place files.

The setting should be renamed to buildFileFormat, and the options should be "XML" and "binary", with the default being "XML".

Then, the file extension should be determined based on if the config root is the data model or not:

For XML: rbxlx or rbxmx For binary: rbxl or rbxm

Done! Sorry I didn't get around to finishing this before you published an update. Slipped my mind.

lukechatton commented 4 years ago

So this change actually broke my project's setup...

Following @LPGhatguy's example project, the tree classname is set to "DataModel" in default.project.json.

Using this setup, the vscode extension will output as a rbxmx file instead of rbxlx. Not sure if I'm misunderstanding something... Thought I'd report it anyways. I'm forcing the output to be rbxlx in a local version for the time being.