gulp-casperjs-local
v1.0.0
Published
Gulp plugin for running CasperJS scripts
Downloads
4
Maintainers
Readme
gulp-casperjs-local
Fork of gulp-casperjs, but uses the local installation of casper (i.e. the one in your node_modules).
npm install --save-dev gulp-casperjs-local casperjs phantomjs
Original Docs (Modified)
A gulp plugin for running CasperJS scripts
Usages
import casperJs from 'gulp-casperjs-local';
// or
const casperJs = require('gulp-casperjs-local').default;
gulp.task('test', function () {
gulp.src('Globs of test files')
.pipe(casperJs()); // run casperjs test
});
To change the command (default: test
) use parameter command
:
import casperJs from 'gulp-casperjs-local';
gulp.task('casperCmd', function () {
gulp.src('test.js')
.pipe(casperJs({ command: '', envArgs { TZ: 'UTC' } })); // run casperjs test.js
});
Command can be array
or string
.
If command has value which cast to false
, this parameter will be ignored.
envArgs is an object of environment variables that will be passed to casper.
LICENSE
The MIT License (MIT)