ES6 - Using babel/traceur with jQuery plugins
问题 I want to be able to write ES6 with jQuery plugins and compile the code down to ES5 using Gulp Babel, without having to use Browserify to make them work. For example, I may have a class like this: import $ from 'jquery'; import somePlugin from 'somePlugin'; class myClass { constructor(options) { this.defaults = { $body: $('body') }; this.options = $.extend(this.defaults, options); $body.somePlugin(); } } I can get this to work if I use Babelify but I'd prefer to find a way where I do not have