Visual studio code has become my new favorite text editor; I can run ES6 compliant code and have it converted to all browsers using Babel. Today, we’re going to setup Babel in VSCode for plugin creation in RMMV.
What Is Babel?
Now, let’s setup Babel in VSCode for our RMMV project.
NodeJS (Install this on your computer)
Click view raw, then right click ‘save as’ and don’t change the name.
- Open your RMMV Project in Visual Studio Code
- Click on workspace settings (File -> Preferences -> Workspace Settings)
This will create a new .vscode folder.
- Place the task file in your .vscode folder.
- Place the .babelrc file in your project root directory.
- Create a folder inside of your js folder named “plugins_dev“.
- Open the integrated terminal (View -> Integrated Terminal)
- Run the node package manager (npm) command : npm install –save-dev babel-cli
This command will install babel in your project folder.
- Install the ‘env’ babel preset; the command is: npm install babel-preset-env –save-dev
- Start the task designated in the tasks.json file with the ‘Run Build Task’ command.