Permalink
Browse files

Browser Env without vow

  • Loading branch information...
maZahaca committed Oct 9, 2017
1 parent 48f3fdd commit 2fa5e0938695bfe78c59901a76521d92f5e271f8
Showing with 12 additions and 253 deletions.
  1. +1 −1 .eslintrc
  2. +0 −1 build.js
  3. +4 −3 lib/BrowserEnvironment.js
  4. +2 −3 package.json
  5. +0 −229 vendor/sizzle.min.js
  6. +0 −11 vendor/xhr.sniffer.js
  7. +5 −5 yarn.lock
View
@@ -2,7 +2,7 @@
"parser": "babel-eslint",
"extends": "airbnb-base",
"env": {
"browser": false,
"browser": true,
"node": true,
"es6": true
},
View
@@ -14,4 +14,3 @@ delete pkg['lint-staged'];
fs.writeFileSync('build/package.json', JSON.stringify(pkg, null, ' '), 'utf-8');
fs.writeFileSync('build/LICENSE', fs.readFileSync('LICENSE', 'utf-8'), 'utf-8');
fs.writeFileSync('build/README.md', fs.readFileSync('README.md', 'utf-8'), 'utf-8');
cp.spawnSync('cp', ['-R', 'vendor', 'build/vendor']);
@@ -1,6 +1,7 @@
const AbstractEnvironment = require('goose-abstract-environment');
const debug = require('debug')('BrowserEnvironment');
const vow = require('vow');
/* eslint-disable class-methods-use-this,prefer-rest-params */
class BrowserEnvironment extends AbstractEnvironment {
constructor(options) {
@@ -13,11 +14,11 @@ class BrowserEnvironment extends AbstractEnvironment {
const evalFunc = args.pop();
if (typeof evalFunc !== 'function') {
throw new Error('You must pass function as last argument to PhantomEnvironment.evaluateJs');
throw new Error('You must pass function as last argument to BrowserEnvironment.evaluateJs');
}
const result = evalFunc(...args);
return vow.resolve(result);
return Promise.resolve(result);
}
back() {
View
@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.0.0",
"version": "1.0.1",
"name": "goose-browser-environment",
"main": "lib/BrowserEnvironment.js",
"repository": "redco/goose-browser-environment",
@@ -9,8 +9,7 @@
"dependencies": {
"babel-polyfill": "^6.23.0",
"debug": "^3.0.1",
"goose-abstract-environment": "1.0.3",
"vow": "^0.4.16"
"goose-abstract-environment": "1.0.8"
},
"devDependencies": {
"babel-cli": "^6.18.0",
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 2fa5e09

Please sign in to comment.