1.7.2 • Published 8 years ago

greenhorn v1.7.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

greenhorn

A simple application intended to provide an easy way to hand off development of HTML views/templates to an uninitiated or outside developer. Greenhorn reads a greenhorn.json file which contains some basic information including the data context in which a template is rendered. This allows one to provide only sample data and not the entire application when all that needs to be developed is an HTML view.

install

npm install -g greenhorn

usage

Create a new directory

$ mkdir my-project
$ cd my-project

Create a greenhorn.json file

{
	"title" : "product-view",
	"data" : {
		"sku" : "12345",
		"name" : "Thingamabob"
	},
	"static" : [{
		"root" : "./static"
	}],
	"routes" : [{
		"url" : "/customer",
		"view" : "/customer/profile.ejs",
		"data" : {
			"customerCode" : "THINGAMABOBBERS",
			"name" : "Thing-A-Ma-Bobbers",
			"balance" : 42.00
		}
	}]
}

Execute

$ greenhorn

With debugging information...

$ DEBUG=* greenhorn

Develop your view

For example test.jade

Open your browser

Open your browser to http://localhost:5000/test.jade

todo

  • add support for remote greenhorn.json
  • add support for specifying greenhorn.json path via argv
  • add web interface load remote greenhorn.json load a specific /path * selectable datasets to apply to a view

license

MIT

1.7.2

8 years ago

1.7.1

8 years ago

1.7.0

8 years ago

1.6.0

8 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.0.0

8 years ago