<commit_before>#penthouse
> Critical Path CSS Generator

[![NPM version](https://badge.fury.io/js/penthouse.svg)](http://badge.fury.io/js/penthouse)

## About
Penthouse is a tool generating critical path css for your web pages and web apps in order to speed up page rendering. Supply the tool with your site's full CSS, and the page you want to create the critical CSS for, and it will return all the CSS needed to render the above the fold content of the page. Read more about critical path css [here](http://www.phpied.com/css-and-the-critical-path/).

The process is automatic and the generated css should be ready for production as is. If you run in to problems however, check out the [Problems section](https://github.com/pocketjoso/penthouse/#problems-with-generated-css) further down on this page.

## Usage

Penthouse can be used:
 * from the command line
 * [as a Node module](https://github.com/pocketjoso/penthouse/#as-a-node-module)
 * [as a Grunt task](https://github.com/fatso83/grunt-penthouse)
 * as a Gulp task (just require Node module straight from just script)
 * via [the online version](https://github.com/pocketjoso/penthouse#online-version)

### From command line

#### Installation

Install [PhantomJS](https://github.com/ariya/phantomjs) first, and make sure it works for you. Then download the `penthouse.js` file.

#### Usage

	phantomjs penthouse.js [URL to page] [CSS file] > [critical path CSS file]
	
	//for example
	phantomjs penthouse.js http://mySite.com/page1 allStyles.css > page1-critical-styles.css
	phantomjs penthouse.js http://mySite.com/page2 allStyles.css > page2-critical-styles.css

##### HTTPS	
<commit_msg>added grunt, gulp instructions<commit_after>#penthouse
> Critical Path CSS Generator

[![NPM version](https://badge.fury.io/js/penthouse.svg)](http://badge.fury.io/js/penthouse)

## About
Penthouse is a tool generating critical path css for your web pages and web apps in order to speed up page rendering. Supply the tool with your site's full CSS, and the page you want to create the critical CSS for, and it will return all the CSS needed to render the above the fold content of the page. Read more about critical path css [here](http://www.phpied.com/css-and-the-critical-path/).

The process is automatic and the generated css should be ready for production as is. If you run in to problems however, check out the [Problems section](https://github.com/pocketjoso/penthouse/#problems-with-generated-css) further down on this page.

## Usage

Penthouse can be used:
 * from the command line
 * [as a Node module](https://github.com/pocketjoso/penthouse/#as-a-node-module)
 * [as a Grunt task](https://github.com/fatso83/grunt-penthouse)
 * as a Gulp task (just require Node module straight from your script)
 * via [the online version](https://github.com/pocketjoso/penthouse#online-version)

### From command line

#### Installation

Install [PhantomJS](https://github.com/ariya/phantomjs) first, and make sure it works for you. Then download the `penthouse.js` file.

#### Usage

	phantomjs penthouse.js [URL to page] [CSS file] > [critical path CSS file]
	
	//for example
	phantomjs penthouse.js http://mySite.com/page1 allStyles.css > page1-critical-styles.css
	phantomjs penthouse.js http://mySite.com/page2 allStyles.css > page2-critical-styles.css

##### HTTPS	

{'fraction_non_alphanumeric': 0.10977443609022557, 'fraction_numerical': 0.0036090225563909775, 'mean_word_length': 4.364516129032258, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2290438', 'n_tokens_mistral': 1033, 'n_tokens_neox': 984, 'n_words': 369}