An open API service indexing awesome lists of open source software.

https://github.com/aranasoft/phantomiis

PhantomIIS is a utility for executing PhantomJS within the context of an IIS Express web server.
https://github.com/aranasoft/phantomiis

Last synced: 11 months ago
JSON representation

PhantomIIS is a utility for executing PhantomJS within the context of an IIS Express web server.

Awesome Lists containing this project

README

          

# Phantom IIS

[PhantomIIS](http://github.com/jayharris/phantomiis) is a utility for executing
[PhantomJS](http://phantomjs.org/) within the context of an IIS Express web server.

## Why?

Unlike compile-time bundling and minification utilities like GruntJS, many ASP.NET applications
rely on the [Web Optimization Framework](http://aspnetoptimization.codeplex.com/) to perform run-time
bundling and minification on the server. In these cases, it is often helpful and necessary to execute
JavaScript tests using the ASP.NET bundler. By executing under IIS Express, PhantomJS can have full
access to the ASP.NET site, and it's pages, scripts, and bundles, without the developer having to
fully configure an IIS site.

## What does it do?

Configuring IIS can be a pain, especially in Development or Continuous Integration scenarios where the physical directory can change from test run to test run. PhantomIIS will spin up a new instance of IIS Express, using the directory and port you specify, execute PhantomJS, and then gracefully shut down IIS Express. There is no need to worry about App Domains, physical directories, and proper IIS configurations.

## Install

Download the latest version from the [Releases](https://github.com/aranasoft/PhantomIIS/releases) page.

## Usage

To execute PhantomIIS from the command line:

phantomiis

### Options

--iisexpress=VALUE, -i

The path to `iisexpress.exe`. This is usually `C:\Program Files\IIS Express\iisexpress.exe` or `C:\Program Files (x86)\IIS Express\iisexpress.exe`. If you do not specify this flag, PhatomIIS will search your PATH.

--phantomjs=VALUE, -j

The path to `phantomjs.exe`. If you do not specify this flag, PhatomIIS will search your PATH environment variable.

--phantomconfig=VALUE, -jc

The path to the PhantomJS JSON Configuration file. This configuration file is passed to PhantomJS's `--config` flag, and is used instead of exposing all PhantomJS CLI flags through PhantomIIS. If this flag is not specified, then the default PhantomJS configuration is used.

--phantomscript=VALUE, -js

The path to the PhantomJS execution script. Default: `.\phantom.run.js`.

--siteroot=VALUE, -s

The path to the root of your ASP.NET Web Site. Default: `.\`

--port=VALUE, -p

The port to assign to your ASP.NET Web Site. Default: 3000

--help, -h, -?

Display help text

--version, -V

Display the current version of PhantomIIS

## Hat Tips

- [@roysvork](https://github.com/Roysvork) - This is largely based on and inspired by Pete's [PhantomExpress Gist](https://gist.github.com/Roysvork/5274142).
- [@harveykwok](http://stackoverflow.com/users/452199/harvey-kwok) - [How to programmatically stop IIS Express](http://stackoverflow.com/questions/4772092/starting-and-stopping-iis-express-programmatically/4777927#4777927) without `process.kill()`

## License

PhantomIIS is copyright of Arana Software, released under the [BSD License](http://opensource.org/licenses/BSD-3-Clause).