grunt-es6-transpiler-expand
raw JSON → 1.0.1 verified Fri May 01 auth: no javascript maintenance
Grunt plugin for transpiling ES6 to ES5 using es6-transpiler. Version 1.0.1 is the only published version, dated circa 2015, and appears to be in maintenance mode with no updates since. It provides a basic Grunt task to transpile JavaScript files from ES6 to ES5. Compared to alternative tools like Babel, es6-transpiler has limited support and is largely obsolete. The plugin has a single grunt task `es6transpiler` that accepts source files and options.
Common errors
error Warning: Task "es6transpiler" not found. ↓
cause Grunt plugin not loaded or es6transpiler task not registered.
fix
Add grunt.loadNpmTasks('grunt-es6-transpiler-expand'); to Gruntfile.
error Error: Cannot find module 'es6-transpiler' ↓
cause Peer dependency es6-transpiler not installed.
fix
Run: npm install es6-transpiler --save-dev
error Warning: Used --force, continuing. ↓
cause Transpilation failed due to syntax errors or unsupported ES6 features.
fix
Check source files for valid ES6 syntax; es6-transpiler does not support all ES6 features. Consider using Babel.
Warnings
deprecated es6-transpiler is deprecated and no longer maintained. Use Babel or another modern transpiler instead. ↓
fix Switch to @babel/core and @babel/preset-env with grunt-babel.
gotcha The package name includes '-expand' but there is no other version; it is a fork or variant of the original grunt-es6-transpiler. ↓
fix Verify you intend to use this specific fork; consider using the original or a maintained alternative.
breaking The plugin only supports Node.js >=0.10.0 and may not work on newer Node versions due to V8 API changes. ↓
fix Upgrade to a modern transpiler like Babel.
gotcha es6-transpiler must be installed separately; it is listed as a peer dependency but not automatically installed. ↓
fix Run: npm install es6-transpiler --save-dev
deprecated The underlying es6-transpiler package is unmaintained and does not support full ES6 features (e.g., generators, symbols). ↓
fix Use Babel for complete ES6+ support.
Install
npm install grunt-es6-transpiler-expand yarn add grunt-es6-transpiler-expand pnpm add grunt-es6-transpiler-expand Imports
- grunt-es6-transpiler-expand wrong
require('grunt-es6-transpiler-expand')correctgrunt.loadNpmTasks('grunt-es6-transpiler-expand') - es6transpiler wrong
grunt.initConfig({ 'grunt-es6-transpiler-expand': { /* ... */ } })correctgrunt.initConfig({ es6transpiler: { /* ... */ } }) - options wrong
es6transpiler: { module: 'commonjs', files: ... }correctes6transpiler: { options: { /* ... */ }, files: { 'dest.js': 'src.js' } }
Quickstart
module.exports = function(grunt) {
grunt.initConfig({
es6transpiler: {
options: {
// Options for es6-transpiler (e.g., modules: 'commonjs')
},
files: {
'dist/output.js': 'src/input.js'
}
}
});
grunt.loadNpmTasks('grunt-es6-transpiler-expand');
grunt.registerTask('default', ['es6transpiler']);
};