Permalink
Browse files

Added 'standalone file' functionality

  • Loading branch information...
1 parent ced24ab commit 00fef27729c55039a5e2dab3b089fa61a3d1177d @rapidrapids committed Jan 2, 2012
Showing with 737 additions and 81 deletions.
  1. +27 −0 README.md
  2. +0 −19 README.mdown
  3. +473 −0 docs/global.css
  4. +138 −0 docs/index.html
  5. +99 −62 pattern-primer.js
  6. 0 output.html → source.html
View
@@ -0,0 +1,27 @@
+###Overview
+
+Pattern-Primer-on-Node is a node.js port of Jeremy Keith's [Pattern Primer](https://github.com/adactio/Pattern-Primer), which is written in PHP.
+
+>Create little snippets of markup and save them to the "patterns folder." The pattern primer will generate a list of all the patterns in that folder. You will see the pattern rendered as HTML. You will also get the source displayed in a textarea.
+
+###Installation
+
+You'll need node.js installed (obviously). In addition, you'll need connect:
+
+ npm install connect
+
+###Simple Usage
+
+Place all your HTML extracts into the `<root>/public/patterns` folder. Navigate to the root directory of Pattern-Primer-on-Node and run:
+
+ node pattern-primer.js
+
+You can then navigate to http://localhost:8080/ to see the output.
+
+###Headless Operation
+
+If you want to generate a 'standalone' version of the primer output, then you can also run the program with the `tofile` switch as follows:
+
+ node pattern-primer.js --tofile
+
+This will place a standalone html file, and a copy of the 'global.css' file located in `<root>/public` and will place them in `<root>/docs`. You should just be able to navigate to that folder and open the index.html file to see the same output.
View
@@ -1,19 +0,0 @@
-###Overview
-
-Pattern-Primer-on-Node is a node.js port of Jeremy Keith's [Pattern Primer](https://github.com/adactio/Pattern-Primer), which is written in PHP.
-
-Create little snippets of markup and save them to the "patterns folder." The pattern primer will generate a list of all the patterns in that folder. You will see the pattern rendered as HTML. You will also get the source displayed in a textarea.
-
-###Installation
-
-You'll need node.js installed (obviously). In addition, you'll need connect:
-
- npm install connect
-
-###Usage
-
-Place all your HTML extracts into the `<root>/public/patterns` folder. Navigate to the root directory of Pattern-Primer-on-Node and run:
-
- node pattern-primer.js
-
-You can then navigate to http://localhost:8080/ to see the output.
Oops, something went wrong.

0 comments on commit 00fef27

Please sign in to comment.