Skip to content

Instantly share code, notes, and snippets.

@mkscrg
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkscrg/62d624a118e2722313fe to your computer and use it in GitHub Desktop.
Save mkscrg/62d624a118e2722313fe to your computer and use it in GitHub Desktop.
PhantomJS + es5-shim + Immutable.js
$ npm install
$ npm start
{
"name": "phantom-es5shim-immutable",
"version": "1.0.0",
"scripts": {
"start": "node_modules/.bin/phantomjs test.js"
},
"dependencies": {
"phantomjs": "^1.9.17"
},
"devDependencies": {
"es5-shim": "^4.1.7",
"immutable": "^3.7.4"
}
}
<!doctype html>
<html>
<head>
<script src="node_modules/es5-shim/es5-shim.js"></script>
<script src="node_modules/immutable/dist/immutable.js"></script>
</head>
<body></body>
</html>
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open('./test.html', function() {
phantom.exit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment