Im having a few es6 files with .es6 extension and es5 files with .js extension. I use grunt for build. I use babel6 as transpiler. I get errors with experimental & extensions option for babel. Can someone please let me know how to get this working?
This is my instrument task.
{
files: ['index.js','con/*/.js', 'con/*/_.es6', 'lib/_/.js', 'models//.js'],
options: {
lazy: true,
basePath: 'coverage/instrument/',
babel: {ignore: false, experimental: true, extensions: ['.es6']},
instrumenter: isparta.Instrumenter
}
Exception stack:
Running "instrument" task
Fatal error: An error occurred in an async call.
cause stack is ...
ReferenceError: [BABEL] con/account.es6: Unknown option: base.experimental
at Logger.error (/../node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18)
at OptionManager.init (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/../node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (/../node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (/../node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at Instrumenter.instrumentSync (/../node_modules/isparta/lib/instrumenter.js:64:55)
at Instrumenter.instrument (/../node_modules/isparta/node_modules/istanbul/lib/instrumenter.js:594:37)
at StepContext.instrumentFile (/../node_modules/grunt-istanbul/tasks/helpers.js:76:24)
at runStep (/../node_modules/grunt-istanbul/node_modules/nue/lib/nue.js:113:14)
async call history is ...
[ { function: 'instrumentFile',
location: '/../node_modules/grunt-istanbul/tasks/helpers.js:76:71',
mapping: { name: 'controllers/account.es6', code: [Object] } } ]
Running "instrument" task
Fatal error: An error occurred in an async call.
cause stack is ...
ReferenceError: [BABEL] con/account.es6: Unknown option: base.extensions
at Logger.error (/../node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18)
at OptionManager.init (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/../node_modules/babel-core/lib/transformation/file/index.js:191:75)
at new File (/../node_modules/babel-core/lib/transformation/file/index.js:122:22)
at Pipeline.transform (/../node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at Instrumenter.instrumentSync (/../node_modules/isparta/lib/instrumenter.js:64:55)
at Instrumenter.instrument (/../node_modules/isparta/node_modules/istanbul/lib/instrumenter.js:594:37)
at StepContext.instrumentFile (/../node_modules/grunt-istanbul/tasks/helpers.js:76:24)
at runStep (/../node_modules/grunt-istanbul/node_modules/nue/lib/nue.js:113:14)
async call history is ...
[ { function: 'instrumentFile',
location: '/../node_modules/grunt-istanbul/tasks/helpers.js:76:71',
mapping: { name: 'controllers/account.es6', code: [Object] } } ]
Im having a few es6 files with .es6 extension and es5 files with .js extension. I use grunt for build. I use babel6 as transpiler. I get errors with experimental & extensions option for babel. Can someone please let me know how to get this working?
This is my instrument task. { files: ['index.js','con/*/.js', 'con/*/_.es6', 'lib/_/.js', 'models//.js'], options: { lazy: true, basePath: 'coverage/instrument/', babel: {ignore: false, experimental: true, extensions: ['.es6']}, instrumenter: isparta.Instrumenter }
Exception stack:
Running "instrument" task Fatal error: An error occurred in an async call. cause stack is ... ReferenceError: [BABEL] con/account.es6: Unknown option: base.experimental at Logger.error (/../node_modules/babel-core/lib/transformation/file/logger.js:41:11) at OptionManager.mergeOptions (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18) at OptionManager.init (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10) at File.initOptions (/../node_modules/babel-core/lib/transformation/file/index.js:191:75) at new File (/../node_modules/babel-core/lib/transformation/file/index.js:122:22) at Pipeline.transform (/../node_modules/babel-core/lib/transformation/pipeline.js:42:16) at Instrumenter.instrumentSync (/../node_modules/isparta/lib/instrumenter.js:64:55) at Instrumenter.instrument (/../node_modules/isparta/node_modules/istanbul/lib/instrumenter.js:594:37) at StepContext.instrumentFile (/../node_modules/grunt-istanbul/tasks/helpers.js:76:24) at runStep (/../node_modules/grunt-istanbul/node_modules/nue/lib/nue.js:113:14) async call history is ... [ { function: 'instrumentFile', location: '/../node_modules/grunt-istanbul/tasks/helpers.js:76:71', mapping: { name: 'controllers/account.es6', code: [Object] } } ]
Running "instrument" task Fatal error: An error occurred in an async call. cause stack is ... ReferenceError: [BABEL] con/account.es6: Unknown option: base.extensions at Logger.error (/../node_modules/babel-core/lib/transformation/file/logger.js:41:11) at OptionManager.mergeOptions (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18) at OptionManager.init (/../node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10) at File.initOptions (/../node_modules/babel-core/lib/transformation/file/index.js:191:75) at new File (/../node_modules/babel-core/lib/transformation/file/index.js:122:22) at Pipeline.transform (/../node_modules/babel-core/lib/transformation/pipeline.js:42:16) at Instrumenter.instrumentSync (/../node_modules/isparta/lib/instrumenter.js:64:55) at Instrumenter.instrument (/../node_modules/isparta/node_modules/istanbul/lib/instrumenter.js:594:37) at StepContext.instrumentFile (/../node_modules/grunt-istanbul/tasks/helpers.js:76:24) at runStep (/../node_modules/grunt-istanbul/node_modules/nue/lib/nue.js:113:14) async call history is ... [ { function: 'instrumentFile', location: '/../node_modules/grunt-istanbul/tasks/helpers.js:76:71', mapping: { name: 'controllers/account.es6', code: [Object] } } ]