0

I have recently started using ES6 coding style for AngularJs1.x. Codebase contains both ES6 style coding as well as ES5 style coding. Would like to use ES6 style coding for test specs also. Need help in understanding what config changes needs to done in Karma,protractor Grunt/Gulp files to support ES6 style coding as well as continue supporting existing old style spec code.

abhinav singh
  • 856
  • 6
  • 23
  • 45

1 Answers1

0

After some research and try out , below config worked for me.. Used browserify with bebelify transform.

frameworks: ['browserify']

preprocessors: {
      'app/es6/**/*.js':['browserify'],
      'test/unit/es6/**/*.js':['browserify'],
}

browserify: {
      debug: true,
      transform: [["babelify", { "presets": ["es2015"] }]]
    }
abhinav singh
  • 856
  • 6
  • 23
  • 45