If you are asking a question, please follow this template:
- My goal is: [Modify the setting in “Build locally”]
- My actions are: [change to : mos build --verbose --local --platform esp8266 --deps-dir deps --binary-libs-dir libs --no-libs-update]
- The result I see is: [default build option is : mos build --verbose --local --platform esp8266]
- My expectation & question is: [Is there a method to modify ??]
@dilbert168 It is possible to modify arguments of the Build locally command, but you have manually modify the VS Code extension. I recommend to read this article: Writing VS Code extensions.
So, what you have to do:
- Uninstall original extension Mongoose OS IDE from your VS Code;
- Download the extension source files from repository:
https://github.com/cesanta/mongoose-os-ide
;
- Open source files folder in VS Code;
- Modify arguments for
Build locally
command in extension.js
(the block of code you need to modify starts from the line no. 300). You have to modify something like this:
vscode.commands.registerCommand('mos.buildLocally', () => {
//return runMosCommand(['build', "--local", "--verbose"], cmdOut)
return runMosCommand(['build', "--local", "--verbose", "--deps-dir deps", "--binary-libs-dir libs", "--no-libs-update"], cmdOut)
.then(() => vscode.window.showInformationMessage('MGOS: Build succeeded!'))
.catch(err => {
cmdOut.show(true)
vscode.window.showErrorMessage(err)
});
});
- Test and debug your updated extension (F5);
- Generate
.vsix
package, details here: Packaging VS Code extensions;
- Manually install the extension, details here: Manually installing a VS Code extension.