1.0.0 • Published 8 years ago

gulp-casperjs-local v1.0.0

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

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)