DavesCodeMusings / mpremote-vscode

Visual Studio Code extension for mpremote Python module
BSD 2-Clause "Simplified" License
11 stars 1 forks source link

Enhancement: Able to use on files other than .py #30

Open ma261065 opened 4 months ago

ma261065 commented 4 months ago

I have a project which has some HTML assets (.htm, .css, .svg, .jpg, .css, .ico, .png) , and I can't use this extension to upload them to the device as it only shows in the context menu for .py files.

Could please you add an option to add a list of file types to the settings that will then show the mpremote context menu when selected?

DavesCodeMusings commented 4 months ago

I can certainly look at what it would take to do this. Until then, a workaround would be to do a sync of the project's entire directory structure. I've used that trick to upload my HTML content (along with everything else.)

ma261065 commented 3 months ago

Thanks for taking a look. BTW, the sync option doesn't seem to work if there is a subfolder containing the HTML assets:

py.exe -m mpremote connect COM9 fs cp -r 'assets' ':/assets'
mpremote: 'cp -r' destination must be ':'
DavesCodeMusings commented 3 months ago

Thanks for including the output. I recently changed some things to support using a parent dir besides /. I wonder if I've broken something in the process. If you downgrade your extension version to 1.21.10, that may solve it.

somervda commented 2 months ago

Dropping back to 1.21.10 worked for me, I can sync my whole project again. Also an option to upload non py files would be a useful enhancement for me (I have a settings.json file). Thanks for a great VSCode extension but it may be worth withdrawing the 1.21.11 version.

DavesCodeMusings commented 2 months ago

@somervda thanks for testing with the previous version. I tend to agree about rolling back the changes in 1.21.11. As well as introducing bugs, I don't think it's doing what was intended to do with the enhancement.

DavesCodeMusings commented 2 months ago

1.21.12 is available now. It reverts the changes that caused the bugs.

somervda commented 2 months ago

Thanks -I updated to 1.21.12 and is all going well. Thanks for the work on this extension.