Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lyonlai committed Jun 24, 2015
1 parent d402f60 commit 2fc18e0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# karma-runscript-preprocessor

Runs a script on rebuild. Suitable to use on karma-webpack with a single test-loader file. The script execution can bail the test running if error happens, which is handy to run some checks even before the test run (e.g. jsxhint).

# Installation

`npm install karma-runscript-preprocessor --save-dev`

# Configuration
module.exports = function(config) {
config.set({
files: [
'test-loader.js'
],

preprocessors: {
'test-loader.js': [ 'runscript', 'webpack' ]
},
runscript: {
script: 'run-lint.sh', 'script, baseDir is your pwd'
stopOnError: true, //on false it will not cancel the test run when script failed
messageOnError: "(any message you want, even integration with CI)"
}
};

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karma-runscript-preprocessor",
"version": "0.0.2",
"version": "0.0.3",
"description": "run a script on file changed. it can bail the test running on script failed. it's suitable for using a single test-loader in karma-webpack.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2fc18e0

Please sign in to comment.