A toolkit containing various commands and snippets for using ES6 today in Sublime
Download Details in >> Package Control
IMPORTANT
In order to be able to run the ES6 Compiler, you will need to install the NPM module
babel
globally. Please run the following command to install babel:
npm install -g babel
The ES6-Toolkit comes pre-packages with lots of cool tools. Below is a short list with links to more information in the Wiki Pages:
- ES6 Completions => Wiki Link
- Compile entire JS files to JS compatible code using Babel
- ES6 Inline Compiling
- Compile entire projects to ES5 using Babel
var => function
class Classname extends AnotherClass {
constructor(args) {
// code
}
// methods
}
var generator = {
[Symbol:iterator]: function() {
var pre = 0, cur = 1;
for(;;) {
var temp = pre;
pre = cur;
cur += temp;
yield cur;
}
}
}
let v = {
[Symbol.iterator]() {
let pre = 0, cur = 1;
return {
next() {
[pre, cur] = [cur, pre + cur];
return { done: false, value: cur };
}
}
}
}
let x = 'something';
var map = new Map();
var map = new WeakMap();
import * as mod from 'lib/package';
System.import('my-module').then(function(m) {
// code...
});
export var myvar = value;
var loader = new Loader({
global: fixup(window)
});
System.get('module');
// WARNING: System.set is not finalized yet
System.set('jquery', Module({$: $}));
var obj = {
__proto__: theProtoObj,
handler,
toString() {
return "object";
}
}
Promise((resolve, reject) => {
// code...
});
var p = new Proxy(target, handler);
var set = new Set();
var set = new WeakSet();
${some_var}
for (let value of iterable) {
// do something
}
...and more!!!
To learn more about the features and settings, please visit https://github.com/Stephn-R/ES6-Toolkit-for-Sublime
If you are having trouble, please contact me at steprodriguez10@gmail.com