Skip to content

Commit

Permalink
initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
getneil committed Sep 29, 2014
0 parents commit 44978c9
Show file tree
Hide file tree
Showing 16 changed files with 268 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
app/
node_modules/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Hapi Coffee
55 changes: 55 additions & 0 deletions gulpfile.coffee
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"
]
66 changes: 66 additions & 0 deletions gulpfile.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions package.json
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"
}
}
37 changes: 37 additions & 0 deletions src/app.coffee
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()
26 changes: 26 additions & 0 deletions src/assets/style/style.scss
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;
}
1 change: 1 addition & 0 deletions src/controllers/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
keep
2 changes: 2 additions & 0 deletions src/models/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
keep

7 changes: 7 additions & 0 deletions src/views/index.jade
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.
2 changes: 2 additions & 0 deletions src/views/layout/footer.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
footer.my-footer.
gulp-boilerplate © 2014
3 changes: 3 additions & 0 deletions src/views/layout/header.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
header.my-header
h1.
gulp boilerplate
45 changes: 45 additions & 0 deletions src/views/layout/layout.jade
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');
1 change: 1 addition & 0 deletions src/views/layout/meta.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//- GIVE ME SOME META TAGS
2 changes: 2 additions & 0 deletions src/views/layout/scripts.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//- Feed me scripts here.
script(src = "")
1 change: 1 addition & 0 deletions src/views/layout/styles.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
link(rel="stylesheet", href="css/style.css")

0 comments on commit 44978c9

Please sign in to comment.