forked from sintaxi/harp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sintaxi#234 from zeke/templates
Add support for Github-powered templates.
- Loading branch information
Showing
7 changed files
with
146 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,58 @@ | |
"description": "Static web server with built in preprocessing", | ||
"author": "Brock Whitten <[email protected]>", | ||
"contributors": [ | ||
{ "name": "Brock Whitten", "email": "[email protected]" }, | ||
{ "name": "Rob Ellis", "email": "[email protected]" }, | ||
{ "name": "Jorge Pedret", "email": "[email protected]" }, | ||
{ "name": "Michael Brooks", "email": "[email protected]" }, | ||
{ "name": "Tommy-Carlos Williams", "email": "[email protected]" }, | ||
{ "name": "Darryl Pogue", "email": "[email protected]" }, | ||
{ "name": "Boris Mann", "email": "[email protected]" }, | ||
{ "name": "Kenneth Ormandy", "email": "[email protected]" }, | ||
{ "name": "Keith Yao", "email": "[email protected]" }, | ||
{ "name": "Eric Drechsel", "email": "[email protected]" }, | ||
{ "name": "Andrew Hobden", "email": "[email protected]" }, | ||
{ "name": "Max Melentiev", "email": "[email protected]" }, | ||
{ "name": "Remy Sharp", "email": "[email protected]" } | ||
{ | ||
"name": "Brock Whitten", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Rob Ellis", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Jorge Pedret", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Michael Brooks", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Tommy-Carlos Williams", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Darryl Pogue", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Boris Mann", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Kenneth Ormandy", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Keith Yao", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Eric Drechsel", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Andrew Hobden", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Max Melentiev", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Remy Sharp", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"homepage": "http://harpjs.com", | ||
"bugs": "http://github.com/sintaxi/harp/issues", | ||
|
@@ -31,13 +70,15 @@ | |
"connect": "2.9.0", | ||
"fs-extra": "0.6.4", | ||
"async": "0.2.9", | ||
"mime": "1.2.11" | ||
"mime": "1.2.11", | ||
"download-github-repo": "0.1.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.8.1", | ||
"should": "1.2.2", | ||
"request": "2.30.0", | ||
"cheerio": "~0.13.1" | ||
"cheerio": "~0.13.1", | ||
"nixt": "~0.3.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha --reporter spec" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var nixt = require('nixt') | ||
|
||
describe("harp init", function() { | ||
|
||
beforeEach(function(done){ | ||
nixt() | ||
.run("rm -rf /tmp/harp && mkdir /tmp/harp") | ||
.exist("/tmp/harp") | ||
.end(done) | ||
}) | ||
|
||
it("downloads the default boilerplate if it's not set", function(done) { | ||
nixt() | ||
.run('harp init /tmp/harp') | ||
.stdout(/Downloading.*harp-boilerplates\/default/) | ||
.stdout(/Initialized project at \/tmp\/harp/) | ||
.exist('/tmp/harp/404.jade') | ||
.exist('/tmp/harp/_layout.jade') | ||
.exist('/tmp/harp/index.jade') | ||
.exist('/tmp/harp/main.less') | ||
.end(done) | ||
}) | ||
|
||
it("defaults to the harp-boilerplates github org when given a shorthand pattern", function(done) { | ||
nixt() | ||
.run('harp init /tmp/harp -b hb-start') | ||
.stdout(/Downloading.*harp-boilerplates\/hb-start/) | ||
.exist('/tmp/harp/public') | ||
.end(done) | ||
}) | ||
|
||
it("honors -b option when given a user/repo pattern", function(done) { | ||
nixt() | ||
.run('harp init /tmp/harp -b zeke/harp-sample') | ||
.stdout(/Downloading.*zeke\/harp-sample/) | ||
.exist('/tmp/harp/README.md') | ||
.exist('/tmp/harp/index.jade') | ||
.end(done) | ||
}) | ||
|
||
it("doesn't overwrite an existing directory", function(done) { | ||
nixt() | ||
.run('harp init /tmp/harp') | ||
.end(function() { | ||
nixt() | ||
.run('harp init /tmp/harp') | ||
.stdout(/Sorry,.*must be empty/) | ||
.end(done) | ||
}) | ||
}) | ||
|
||
}) |