import babel from 'rollup-plugin-babel';
import { readFileSync } from 'fs';

const babelConfig = JSON.parse(readFileSync('.babelrc', { encoding: 'utf8' }));
babelConfig.presets = babelConfig.presets.map(preset => preset === 'es2015' ? 'es2015-rollup' : preset);
babelConfig.babelrc = false;

export default {
  plugins: [babel(babelConfig)],
  external: ['coffee-script']
};

import babel from 'rollup-plugin-babel';
import { readFileSync } from 'fs';

var babelConfig = JSON.parse(readFileSync('.babelrc', { encoding: 'utf8' }));
babelConfig.presets = babelConfig.presets.map(function(preset) {
  return preset === 'es2015' ? 'es2015-rollup' : preset;
});
babelConfig.babelrc = false;

export default {
  plugins: [babel(babelConfig)],
  external: ['coffee-script']
};

Use node v0.12-compatible features to allow building with that version.
Use node v0.12-compatible features to allow building with that version.
