This plugin has been created to work around this bug. This bug has been fixed with version 6.16.1. Then, this Grunt plugin becomes obsolete: consider using the official grunt-babel plugin instead.
Grunt plugin to transpile UI5 sources with Babel
WARNING: This is an EXPERIMENTAL Grunt plugin. Use at your own risks!
Special thanks to:
- Ryan Murphy for his work on babel-plugin-transform-modules-ui5
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-openui5-babel --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-openui5-babel');
In your project's Gruntfile, add a section named openui5_babel
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
openui5_babel: {
options: {
// babel-plugin-transform-modules-ui5 options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
See https://github.com/r-murphy/babel-plugin-transform-modules-ui5#options for supported options
grunt.initConfig({
openui5_babel: {
options: {
namespacePrefix: 'my.ui5.component'
},
files: [{
expand : true,
cwd : 'src',
src : ['**/*.js'],
dest : 'dist'
}],
},
});
NOTE
Put your Babel configuration into your
.babelrc
file.
(nothing yet)