karma-buble-preprocessor
v1.2.11
Published
A Karma preprocessor for the Buble ES2015+ compiler
Downloads
164
Readme
karma-buble-preprocessor
A Karma preprocessor for the Bublé ES2015+ compiler.
Maintenance status
As Bublé is no longer under active development, there is no plan to add new features to this module. However critical security issues may be fixed.
Installation
To install as a devDependency
:
npm install --save-dev karma-buble-preprocessor
Configuration
Just add it to the preprocessors
section of your Karma configuration file, for instance:
// karma.conf.js
module.exports = function (config) {
config.set({
preprocessors: {
'test/**/*.js': ['buble']
}
})
}
Purpose
This preprocessor uses Bublé to transpile JavaScript ES2015+ into ES5 suitable for older runtimes.
- Bublé will not handle
import
statements in the code, so consider using a packager such as karma-rollup-preprocessor instead. - The result of the transpilation is not saved, so for implementation code, consider using buble-loader in webpack, or rollup-plugin-buble in rollup, so that the tests are run on what is shipped.
License
See LICENSE.md
Contributing
See CONTRIBUTING.md