A lot of sources explain that for this you need to
- create a "File Watcher"-Job in the WebStorm-Settings (Tools)
- define a "Scope" in WebStorm for the files you want to process
- define a .babelrc file for configuration. Babel will use this automatically so you save some params in the call
{
"presets": ["es2015", "react"],
"plugins": ["transform-es2015-arrow-functions"]
}
npm install --save-dev
the corresponding packages together with the babel-cli package.
BUT... how can I run the babel-Command on Windows when babel-cli module just delivers a "babel.js" file in its bin-folder? However Windows can only execute .exe, .bat or .cmd-files.
I tried to wrap the call in a cmd-script containing babel %*
as I found a solution in one web article, but this did not work for me.