Dal Posted January 21, 2016 Share Posted January 21, 2016 Hi guys, As you may or may not know, a little while back, Microsoft released the full source code for Visual Studio Code under the MIT license. The really cool thing about that is, VS Code is built on top of the Monaco code editor... the same editor that drives the Babylon.js playground. That means we can finally start to use that awesome code editor in our own apps and Babylon tools! There's not any documentation available for the editor at the moment, and the VS Code github already has a couple of issues open asking for it, but it's not yet materialized. I decided to have a go at figuring it out myself, using the Typescript Playground and Babylon Playground for pointers. I managed to come up with this:https://www.darrylryan.com/playground/ This does now mostly work - it can syntax highlight the typescript code, the intellisense autocomplete and type checking all works. I've also implemented a way to compile and run the code in the same way that the Typescript playground does it. For now though I have a few problems I haven't solved: - The gulp build task for the editor doesn't seem to build all the parts it needs. The loader tries to load other files too. I therefore had to rip some files from the full build of VS Code. This makes a bit of a mess and it ends up way bigger than it needs to be. I'm hoping there's a better build task for it that I've missed, or that there will be one soon as the VS Code team are working on it. - The browser console lists a lot of warnings about duplicate file requires. I'm not sure how to solve that yet as I haven't figured out where they're coming from. - The BIG problem that I'm hoping @Deltakosh might be able to help with is that I really can't figure out how to load extra TypeScript definition files in such as the BABYLON framework. The method used in the BabylonJS Playground doesn't seem to work for me, the methods don't exist on the objects being called, so I guess the API has changed between the VS Code version and the one on Azure. The full source code (MIT license) is here if you want to dig around and help me out https://cloud.loudened.com/index.php/s/xYeeyYAsVVresJ2/download Dal jerome 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 21, 2016 Share Posted January 21, 2016 This is great!! Unfortunately I did not have time to check how VSCode works comparatively with the PG But my plan is to Open source the playground as soon as I can Dal, Dad72 and NasimiAsl 3 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 21, 2016 Share Posted January 21, 2016 Playground open source, cool Dal 1 Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 21, 2016 Share Posted January 21, 2016 I was wondering today, while sitting in a train, how possible something like that would be. You just cleared my thoughts. Thanks!! May I wonder - is it the full VSCode? is there a kind of a virtual file system to organize your code? Dal 1 Quote Link to comment Share on other sites More sharing options...
Dal Posted January 22, 2016 Author Share Posted January 22, 2016 @RaananW My thing is just the editor ripped out. The full VS Code source is available now but it runs within Electron in order to have access to the file system... that stuff won't be possible from the browser. I'm planning to make a full Babylon IDE using this though, which will support saving to cloud storage and possibly browser local storage. RaananW 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 27, 2016 Share Posted January 27, 2016 On 21/1/2016 at 7:03 PM, Deltakosh said: But my plan is to Open source the playground as soon as I can Just to know, you think when put open source? I am very interested to see how the intellisense system is realize for my editor. that of the playground is really great. Thank you DK, looking forward. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 27, 2016 Share Posted January 27, 2016 Not yet unfortunatey, my ask was rejected Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 27, 2016 Share Posted January 27, 2016 Why rejected ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 28, 2016 Share Posted January 28, 2016 because MS is not ready yet to make it OSS (I mean the code editor) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.