ECMAScript 6 - Sublime Text editor build system

// gulpfile.js
var gulp = require('gulp');
var babel = require('gulp-babel');
var shell = require('gulp-shell');

gulp.task('run', function(){
	return gulp.src('app.js')
			.pipe(babel())
			.pipe(gulp.dest('result'))
			.pipe(shell(['node result\\app.js']));
			
});
{
  "cmd": ["gulp.cmd", "run"]
}

This setup is only recommended if you just want to play with ES6 like me. The grunt task uses hard coded files names and you need to use the same file name to get it working.

comments powered by Disqus