0.0.1 • Published 9 years ago

gulp-casperjs-options v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

gulp-casperjs-options

Forked from original gulp-casperjs with minor updates

A gulp plugin for running CasperJS scripts

Install

npm install --save-dev gulp-casperjs-options

Usages

To add logging output option:

var casperJs = require('gulp-casperjs-options');
gulp.task('logTest', function (){
    gulp.src('test.js')
        .pipe(casperjs({
            xunit: 'log.xml'
        }));
});
var casperJs = require('gulp-casperjs');
gulp.task('test', function () {
  gulp.src('Globs of test files')
    .pipe(casperJs()); //run casperjs test
});

To change the command (default: test) use parameter command:

var casperJs = require('gulp-casperjs');
gulp.task('casperCmd', function () {
  gulp.src('test.js')
    .pipe(casperJs({command:''})); //run capserjs test.js
});

Command can be array or string. If command has value which cast to false, this parameter will be ignored.

To hide output from CasperJS use parameter outputLog:

var casperJs = require('gulp-casperjs');
gulp.task('casperCmd', function () {
  gulp.src('test.js')
    .pipe(casperJs({outputLog: false})); //CasperJS output not show
});

Default value is true

LICENSE

The MIT License (MIT)