ES 6 transpiler
I read many information in phpstrom about ES6 , so i try to understand more on ES6 .
it seem no browser support the ES6 specification ( all browsers support ES5) so transpiler can be use ( 6to5) .
in CSS compass implement today some css feature
in JAVASCRIPT 6to5 implement today some javascript feature
I am not an javascript developper ( more a css "designer" )
Does 6t5 is IDE agnostic and can be use with phpstorm ?
Does phpstorm have some tool to manage 6to5 ?
Does 6to5 create issues and ca nbe debug easely ( sourcemap ) ?
Should 6to5 could be use for all AS6 library Framework ( angularjs) ?
if i have a project
project/index.js
project/directory/library.js
how can i configure phpstorm for make the browser understand the content of index.js
var library=require('directory').library
regard's
请先登录再写评论。
I wanto t use ES6 syntax in my javascript file but my browser understand only ES5 !! ( in january 2015 )
https://docs.google.com/document/d/1cUTD8oVzfpwFqX5tMxHTifKO8uJm5VddwmB0aVQMxpI/edit?pli=1#heading=h.hwe9he7t0utg
I'm not sure I understand what you are talking about... Yes, browsers can't execute EcmaScript 6 code directly, you need to transpile it to make it runnable. The most popular ES6 transpiler is traceur compiler (https://github.com/google/traceur-compiler). It can be easily installed using 'npm -g install traceur'
It's not IDE agnistic, but still can be used in PHPStorm - you can configure it as a file watcher. See http://www.youtube.com/watch?v=jbfkcmxLLKY&feature=youtu.be
see above
traceur compiler does support sourcemaps - you need passing '--sourcemap' option to it to get them created
some frameworks have their own built-in support for transpiling ES6. Not sure about Angular... Are you talking about Angular 2.0? As current Angular version doesn't seem to use ES6
sorry, haven't got what you are talking about. First, you can't configure PHPStorm to make a browser understand this or that thing - it is not about the IDE. To make browser understand something, you need to configure a browser:) Next, you seem to ne using CommonJS syntax, which is normally used by server-side Node.js applications... See http://blog.brianbeck.com/post/10667967423/node-js-require-in-the-browser - you may find it helpful
a