https://github.com/blgm/karma-buble-preprocessor
A Karma preprocessor for the Bublé ES2015+ compiler
https://github.com/blgm/karma-buble-preprocessor
buble es2015 karma-preprocessor
Last synced: 11 months ago
JSON representation
A Karma preprocessor for the Bublé ES2015+ compiler
- Host: GitHub
- URL: https://github.com/blgm/karma-buble-preprocessor
- Owner: blgm
- License: mit
- Created: 2017-07-21T20:09:20.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-02-28T23:38:43.000Z (12 months ago)
- Last Synced: 2025-03-09T15:34:52.767Z (11 months ago)
- Topics: buble, es2015, karma-preprocessor
- Language: JavaScript
- Size: 1.6 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/karma-buble-preprocessor)
[](https://github.com/blgm/karma-buble-preprocessor/actions?query=workflow%3Atest+branch%3Amain)
# karma-buble-preprocessor
A [Karma preprocessor](http://karma-runner.github.io/1.0/config/preprocessors.html) for the [Bublé ES2015+ compiler](http://buble.surge.sh/guide/).
## Maintenance status
As [Bublé](http://buble.surge.sh/guide/) 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](http://karma-runner.github.io/1.0/config/configuration-file.html), for instance:
```javascript
// karma.conf.js
module.exports = function (config) {
config.set({
preprocessors: {
'test/**/*.js': ['buble']
}
})
}
```
## Purpose
This preprocessor uses [Bublé](http://buble.surge.sh/guide/) 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](https://www.npmjs.com/package/karma-rollup-preprocessor) instead.
- The result of the transpilation is not saved, so for implementation code, consider using
[buble-loader](https://www.npmjs.com/package/buble-loader) in
[webpack](https://www.npmjs.com/package/webpack), or
[rollup-plugin-buble](https://www.npmjs.com/package/rollup-plugin-buble) in
[rollup](https://www.npmjs.com/package/rollup), so that the tests are run on what is shipped.
## License
See [LICENSE.md](LICENSE.md)
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
[](https://github.com/standard/standard)