Project

hpp

0.0
No commit activity in last 3 years
No release in over 3 years
This is a very simple command line tool for HTML file pre-processing
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.5.3
>= 0.16.0
 Project Readme

What is HPP?

HPP stands for ‘HTML Pre-Processing’, is a command line tool for HTML Pre-Processing, especially for UI prototyping.

How to Use It?

Requirements

Ruby 1.9.3-p194

Installation

gem install hpp

Usage

Go to the directory where the original HTML file folder sits.

project
 |-src
   |-x.html
   |-_y.html
   |-css
     |-main.css
   |-js
     |-site.js

Assume x.html includes y.html, such as the directive <!—#include file=’y.html’—>

Invoking the command under project directory, just like bellow

project> hpp process src target

It will create another folder ‘target’, and ‘tree target’ will return:

project
 |-src
   |-x.html
   |-_y.html
   |-css
     |-main.css
   |-js
     |-site.js
 |-target
   |-x.html
   |-css
     |-main.css
   |-js
     |-site.js

Note: the content of _y.html will be included into x.html at the place where the above directive is.

Command Options

hpp process [source folder] [target folder] [—daemon]

  • If [source folder] not specified, the ‘src’ folder will be assumed by default. If there doesn’t exist the expected [source folder], RuntimeError will be raised.
  • If [target folder] not specified, the ‘target’ folder will be assumed by default. If there doesn’t exist the expected [target folder], the folder will be created.
  • If [—daemon] specified, it will invoke a process listening to the changes in [source folder], and process the whole [source folder] immediately once the changes detected, so that you don’t need to invoke the command again and again. This is available since version 0.1.2

License

MIT License