Kayıtlar

Haziran 16, 2016 tarihine ait yayınlar gösteriliyor

How to automatize current ES6 Javasript file tranpile into ES5 with Babel and Atom-Script package

Resim
Requirements https://atom.io/ Atom Editor https://atom.io/packages/script  Install Script Package https://nodejs.org/en/ Nodejs (prefer latest one) Once installation completed, open your project with atom and install this packages with npm (selected light-green texts) 1- Create  ECMA6 standart javascript file. You can look at ECMA6 features from this site 2- While javasript file open, press  shift-ctrl-alt-o (windows) /  shift-cmd-i (OSX)   now we will define a new atom-script profile  Command:node Command Arguments: node_modules\babel-cli\bin\babel.js {FILE_ACTIVE} --out-file out\{FILE_ACTIVE_NAME} Before saving a profile, you can try your script with run button. If you want to open this interface again  press  shift-ctrl-alt-o (windows) /  shift-cmd-i (OSX)  3- Click save as profile and enter a profiler name 4- Finally  run the code on your current javascript file. This will create ECMA5 javascript  file    Macos                       Windows