forked from getneil/hapi-coffee
-
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.
- Loading branch information
0 parents
commit 44978c9
Showing
16 changed files
with
268 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
app/ | ||
node_modules/ |
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 @@ | ||
#Hapi Coffee |
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,55 @@ | ||
gulp = require 'gulp' | ||
jade = require 'gulp-jade' | ||
gutil = require 'gulp-util' | ||
sass = require 'gulp-sass' | ||
coffee = require 'gulp-coffee' | ||
nodemon = require 'gulp-nodemon' | ||
app = null | ||
sources = | ||
jade: "src/**/*.jade" | ||
coffee: "src/**/*.coffee" | ||
sass: "src/**/*.scss" | ||
overwatch: "src/**/*.{js,html,css}" | ||
|
||
|
||
|
||
|
||
gulp.task "jade", (event) -> | ||
gulp.src [sources.jade], | ||
base:"./src" | ||
.pipe(jade(pretty: true)) | ||
.pipe gulp.dest("./app") | ||
|
||
gulp.task 'coffee', (event) -> | ||
gulp.src [sources.coffee], | ||
base:"./src" | ||
.pipe(coffee()) | ||
.pipe gulp.dest("./app") | ||
|
||
gulp.task "sass", (event) -> | ||
gulp.src [sources.sass], | ||
base:"./src" | ||
.pipe(sass(style: "compressed")) | ||
.pipe gulp.dest("./app") | ||
|
||
gulp.task "watch", -> | ||
gulp.watch sources.jade, ["jade"] | ||
gulp.watch sources.sass, ["sass"] | ||
gulp.watch sources.coffee, ["coffee"] | ||
return | ||
|
||
gulp.task "develop", -> | ||
nodemon | ||
script:"app/app.js" | ||
ext:"html js" | ||
ignore:["./app/assets/**","./app/views/**"] | ||
.on "restart", -> | ||
console.log "RESTARTED!" | ||
|
||
gulp.task "default", [ | ||
"jade" | ||
"coffee" | ||
"sass" | ||
"develop" | ||
"watch" | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
{ | ||
"name": "gulp-boilerplate", | ||
"version": "0.1.0", | ||
"description": "a starting point for using gulp", | ||
"devDependencies": { | ||
"gulp": "latest", | ||
"gulp-coffee": "latest", | ||
"gulp-jade": "latest", | ||
"gulp-nodemon": "^1.0.4", | ||
"gulp-sass": "latest", | ||
"gulp-util": "latest" | ||
}, | ||
"dependencies": { | ||
"good": "^2.3.0", | ||
"hapi": "^6.9.0" | ||
} | ||
} |
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,37 @@ | ||
Hapi = require("hapi") | ||
Good = require("good") | ||
Path = require "path" | ||
serverOptions = | ||
views: | ||
path:"./app/views" | ||
engines: | ||
html:"" | ||
|
||
server = new Hapi.Server(3000) | ||
|
||
initialize = (cb)-> | ||
|
||
server.route | ||
method: "GET" | ||
path: "/" | ||
handler: (request, reply) -> | ||
reply "hello world" | ||
return | ||
|
||
server.route | ||
method:"GET" | ||
path:"/assets/{param*}" | ||
handler: | ||
directory: | ||
path:"./assets/" | ||
listing:true | ||
|
||
server.pack.register Good, (err) -> | ||
throw err if err # something bad happened loading the plugin | ||
server.start -> | ||
server.log "info", "Server running at: " + server.info.uri | ||
cb() if cb | ||
return | ||
return | ||
return | ||
initialize() |
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,26 @@ | ||
$header-color: #A0D468; | ||
body { | ||
color:blue; | ||
padding: 0 0 0 0; | ||
margin: 0 0 0 0; | ||
} | ||
h1 { | ||
font-size: 3em; | ||
} | ||
header { | ||
background-color: $header-color; | ||
} | ||
header h1 { | ||
text-align: center; | ||
margin: 0 0 0 0; | ||
padding: 2em; | ||
color: #FFF; | ||
} | ||
footer { | ||
text-align: center; | ||
color: #888; | ||
} | ||
.center { | ||
text-align: center; | ||
color: #555; | ||
} |
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 @@ | ||
keep |
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,2 @@ | ||
keep | ||
|
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,7 @@ | ||
extends layout/layout | ||
|
||
block content | ||
h2.center. | ||
A really simple gulp boilerplate that sets up a static server with express that livereloads | ||
h2.center. | ||
It also is set up with jade, sass, and coffeescript tasks. |
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,2 @@ | ||
footer.my-footer. | ||
gulp-boilerplate © 2014 |
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,3 @@ | ||
header.my-header | ||
h1. | ||
gulp boilerplate |
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,45 @@ | ||
doctype html | ||
//if lt IE 7 | ||
html.no-js.lt-ie9.lt-ie8.lt-ie7(lang="en") | ||
//if IE 7 | ||
html.no-js.lt-ie9.lt-ie8(lang="en") | ||
//if IE 8 | ||
html.no-js.lt-ie9(lang="en") | ||
//if gt IE 8 | ||
html.no-js(lang="en") | ||
head | ||
meta(charset="utf-8") | ||
meta(http-equiv="X-UA-Compatible", content="IE=edge") | ||
title. | ||
gulp boilerplate | ||
meta(name="viewport", content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1.0") | ||
//Place favicon.ico and apple-touch-icon.png in the root directory | ||
include meta | ||
block meta | ||
include styles | ||
block styles | ||
script(src="js/vendor/modernizr-2.6.2.min.js") | ||
script(src="//code.jquery.com/jquery-2.1.0.min.js") | ||
body | ||
//if lt IE 7 | ||
p.browsehappy | ||
|You are using an | ||
strong | ||
|outdated browser | ||
|. Please | ||
a(href="http://browsehappy.com/") | ||
|upgrade your browser | ||
|to improve your experience. | ||
include header | ||
block content | ||
include footer | ||
include scripts | ||
block scripts | ||
// Google Analytics: change UA-XXXXX-X to be your sites ID. | ||
script. | ||
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= | ||
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; | ||
e=o.createElement(i);r=o.getElementsByTagName(i)[0]; | ||
e.src='//www.google-analytics.com/analytics.js'; | ||
r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); | ||
ga('create','UA-XXXXX-X');ga('send','pageview'); |
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 @@ | ||
//- GIVE ME SOME META TAGS |
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,2 @@ | ||
//- Feed me scripts here. | ||
script(src = "") |
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 @@ | ||
link(rel="stylesheet", href="css/style.css") |