kibana/tasks/build/babelOptions.js
spalger 8aa0287dd7 [build] expose build specific babel config
During build we transpile the server source to prevent runtime transpilation with babel/register. In order to support untranspiled plugin code, we still use babel/register with special ignore options, which used to be included in cli/index.js and now is moved to src/optimize/babelOptions.js so other code that wants to initialize a server (without the cli) can also configure babel/register.
2015-09-07 17:22:42 -07:00

13 lines
371 B
JavaScript

module.exports = function (grunt) {
var srcFile = 'build/kibana/src/optimize/babelOptions.js';
var buildFile = 'build/kibana/src/optimize/babelOptions.build.js';
var rename = require('fs').renameSync;
var unlink = require('fs').unlinkSync;
grunt.registerTask('_build:babelOptions', function () {
unlink(srcFile);
rename(buildFile, srcFile);
});
};