https://github.com/power-assert-js/karma-espower-preprocessor
Karma preprocessor for power-assert
https://github.com/power-assert-js/karma-espower-preprocessor
Last synced: about 1 year ago
JSON representation
Karma preprocessor for power-assert
- Host: GitHub
- URL: https://github.com/power-assert-js/karma-espower-preprocessor
- Owner: power-assert-js
- Created: 2014-10-27T09:37:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-04-27T13:28:41.000Z (about 8 years ago)
- Last Synced: 2025-03-23T00:24:25.581Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 10
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# karma-espower-preprocessor
Preprocess source code by [espower-source](https://www.npmjs.org/package/espower-source)
[sample](https://github.com/vvakame/karma-espower-preprocessor-sample)
# Installation
```
npm install karma-espower-preprocessor --save-dev
```
I'm recommend to use with [karma-sourcemap-loader](https://www.npmjs.org/package/karma-sourcemap-loader) if you use some altJS.
# Configuration
```
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.js': ['espower']
// '**/*.js': ['sourcemap', 'espower']
},
espowerPreprocessor: {
options: {
// emit espowerified code.
// default: false (in-memory)
emitActualCode: true,
// ignore upstream SourceMap info.
// default: false
ignoreUpstreamSourceMap: false
},
transformPath: function(path) {
// default
return path.replace(/\.js$/, '.espowered.js');
}
}
});
};
```