Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jevets committed Aug 18, 2015
0 parents commit 96dab32
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
/www
*.log
secrets.*
Empty file added README.md
Empty file.
9 changes: 9 additions & 0 deletions harp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"globals": {
"site": {
"language": "en",

"name": "Harp Starter"
}
}
}
46 changes: 46 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
var argv = require('yargs').argv;
var harp = require('harp');
var rsync = require('rsyncwrapper').rsync;
var util = require('util');


global.moment = require('moment');
global._ = require('underscore');


var build = function() {
util.log('Compiling...');
harp.compile('.', './www', function(err) {
if (err) {
util.log('Compile failed with errors:');
util.log(err);
} else {
util.log('Compile completed without errors');
}
});
};

var serve = function() {
var port = argv.port || '9000';
console.log('Serving on port 9000');
harp.server('.', {
port: port
});
};

var deploy = function() {

};


switch (argv._[0]) {
case 'serve':
serve();
break;
case 'build':
build();
break;
default:
util.log('No command specified.');
break;
}
40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "harp-starter",
"version": "1.0.0",
"description": "A starting point for a harp static site, with support for external npm modules",
"main": "index.js",
"scripts": {
"serve": "node index.js serve",
"build": "node index.js build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/evendev/harp-starter.git"
},
"keywords": [
"bootstrap",
"browserify",
"harp",
"harpjs",
"jquery",
"moment",
"underscore"
],
"author": "Steve Jamesson",
"license": "ISC",
"bugs": {
"url": "https://github.com/evendev/harp-starter/issues"
},
"homepage": "https://github.com/evendev/harp-starter#readme",
"devDependencies": {
"bootstrap": "^3.3.5",
"browserify": "^11.0.1",
"harp": "^0.17.0",
"jquery": "^2.1.4",
"moment": "^2.10.6",
"rsyncwrapper": "^0.4.3",
"underscore": "^1.8.3",
"util": "^0.10.3",
"yargs": "^3.19.0"
}
}
Empty file added public/404.jade
Empty file.
1 change: 1 addition & 0 deletions public/_layout.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!= yield
5 changes: 5 additions & 0 deletions public/_layouts/container.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends main

block main
.container
block container
12 changes: 12 additions & 0 deletions public/_layouts/html.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
doctype html
html(lang='#{ site.language }')
head
block head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
meta(name='viewport', content='width=device-width, initial-scale=1.0')
title
block title
= site.name
body
block body
7 changes: 7 additions & 0 deletions public/_layouts/main.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends html

block append head
link(rel='stylesheet', href='/assets/css/app.css')

block body
block main
1 change: 1 addition & 0 deletions public/assets/css/app.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../../../node_modules/bootstrap/less/bootstrap';
20 changes: 20 additions & 0 deletions public/index.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
extends _layouts/container

block prepend title
| Welcome -

block container
:markdown
# Welcome to `harp-starter`

## Build

```bash
npm run build
```

## Serve

```bash
npm run serve [--port=9000]
```
14 changes: 14 additions & 0 deletions secrets-sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"servers": {
"prod": {
"user": "",
"host": "",
"path": "/path/to/public/html"
},
"dev": {
"user": "",
"host": "",
"path": "/path/to/public/html"
}
}
}

0 comments on commit 96dab32

Please sign in to comment.