-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
11 changed files
with
325 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 @@ | ||
* -crlf |
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,5 @@ | ||
public | ||
bower_components | ||
npm-debug.log | ||
/.tmp | ||
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,5 @@ | ||
language: node_js | ||
node_js: | ||
- "0.11" | ||
- "0.10" | ||
|
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 @@ | ||
web: node app |
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,11 @@ | ||
phragm | ||
===== | ||
[ ![Codeship Status for leogdion/phragm](https://www.codeship.io/projects/3e804630-c9c7-0131-ac6e-5e030090e4e5/status?branch=master)](https://www.codeship.io/projects/22474) | ||
|
||
[![Build Status](https://travis-ci.org/leogdion/phragm.svg)](https://travis-ci.org/leogdion/phragm) | ||
|
||
[![david-dm](https://david-dm.org/leogdion/phragm.svg)](https://david-dm.org/leogdion/phragm) | ||
|
||
[![HuBoard badge](http://img.shields.io/badge/Hu-Board-7965cc.svg)](https://huboard.com/leogdion/phragm) | ||
|
||
[![Coverage Status](https://img.shields.io/coveralls/leogdion/phragm.svg)](https://coveralls.io/r/leogdion/phragm) |
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,11 @@ | ||
var express = require('express'); | ||
var bodyParser = require('body-parser'); | ||
var app = express(); | ||
app.use(express.static(__dirname + '/../public')); | ||
app.use(bodyParser()); | ||
|
||
if (require.main === module) { | ||
app.listen(process.env.PORT || 3000); | ||
} else { | ||
module.exports = app; | ||
} |
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,21 @@ | ||
{ | ||
"name": "phragm", | ||
"version": "0.1.0", | ||
"authors": [ | ||
"Leo Dion <[email protected]>" | ||
], | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"client/www/vendor", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"requirejs": "~2.1.13" | ||
}, | ||
"resolutions": { | ||
"bootstrap": "~3.1.1" | ||
} | ||
} |
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,141 @@ | ||
var gulp = require('gulp'), | ||
mocha = require('gulp-mocha'), | ||
bump = require('gulp-bump'), | ||
jshint = require('gulp-jshint'), | ||
beautify = require('gulp-beautify'), | ||
istanbul = require("gulp-istanbul"), | ||
coveralls = require('gulp-coveralls'), | ||
less = require('gulp-less'), | ||
bower = require('bower'), | ||
bowerRequireJS = require('bower-requirejs'), | ||
requirejs = require('requirejs'), | ||
es = require('event-stream'), | ||
coverageEnforcer = require("gulp-istanbul-enforcer"), | ||
jstConcat = require('gulp-jst-concat'), | ||
jst = require('gulp-jst'), | ||
clean = require('gulp-clean'), | ||
expressService = require('gulp-express-service'); | ||
|
||
gulp.task('default', ['clean', 'lint', 'copy']); | ||
|
||
gulp.task('heroku:staging', ['default']); | ||
|
||
gulp.task('test', function (cb) { | ||
gulp.src(['./static/js/**/*.js', './app/**/*.js']).pipe(istanbul()) // Covering files | ||
.on('end', function () { | ||
gulp.src(["./test/**/*.js"]).pipe(mocha()).pipe(istanbul.writeReports()) // Creating the reports after tests runned | ||
.on('end', cb); | ||
}); | ||
}); | ||
|
||
gulp.task('clean', function () { | ||
return gulp.src(['public', '.tmp'], { | ||
read: false | ||
}).pipe(clean()); | ||
}); | ||
|
||
gulp.task('copy', [ /*'clean', 'bower'*/ ], function () { | ||
// gulp.src('src/**/*.html').pipe(gulp.dest('dist')); | ||
return es.merge( | ||
gulp.src('bower_components/requirejs/require.js').pipe(gulp.dest('public/js')), gulp.src('static/html/*.html').pipe(gulp.dest('public')), gulp.src('static/fonts/**/*.*').pipe(gulp.dest('public/fonts')), gulp.src('bower_components/bootstrap/fonts/*.*').pipe(gulp.dest('public/fonts/bootstrap')), gulp.src('static/images/**/*.*').pipe(gulp.dest('public/images'))); | ||
}); | ||
|
||
gulp.task('bower', function (cb) { | ||
var install = bower.commands.install(); | ||
|
||
install.on('log', function (message) { | ||
//console.log(message); | ||
}); | ||
install.on('error', function (error) { | ||
console.log(error); | ||
cb(error); | ||
}); | ||
install.on('end', cb.bind(undefined, undefined)); | ||
// place code for your default task here | ||
}); | ||
|
||
gulp.task('copy-rjs-config', ['clean'], function () { | ||
return gulp.src("static/js/config.js").pipe(gulp.dest(".tmp")); | ||
}); | ||
|
||
|
||
gulp.task('bowerrjs', ['bower', 'copy-rjs-config'], function (cb) { | ||
var options = { | ||
config: ".tmp/config.js", | ||
baseUrl: 'static/js', | ||
transitive: true | ||
}; | ||
|
||
bowerRequireJS(options, function (result) { | ||
console.log(result); | ||
cb(undefined, result); | ||
}); | ||
}); | ||
|
||
gulp.task('requirejs', ['bowerrjs', 'JST', 'beautify'], function (cb) { | ||
var config = { | ||
mainConfigFile: ".tmp/config.js", | ||
baseUrl: 'static/js', | ||
name: 'main', | ||
out: 'public/js/script.js', | ||
optimize: 'none' | ||
}; | ||
requirejs.optimize(config, cb.bind(undefined, undefined), cb); | ||
}); | ||
|
||
gulp.task('coveralls', ['enforce-coverage'], function () { | ||
return gulp.src('coverage/**/lcov.info').pipe(coveralls()); | ||
}); | ||
|
||
gulp.task('less', ['bower'], function () { | ||
return gulp.src('static/less/**/*.less').pipe(less()).pipe(gulp.dest('public/css')); | ||
}); | ||
|
||
gulp.task('JST', ['clean'], function () { | ||
return gulp.src('static/templates/**/*html').pipe(jstConcat('jst.js', { | ||
renameKeys: ['^.*templates[/|\\\\](.*).html$', '$1'], | ||
amd: true | ||
})).pipe(gulp.dest('.tmp')); | ||
}); | ||
|
||
|
||
gulp.task('enforce-coverage', ['test'], function () { | ||
var options = { | ||
thresholds: { | ||
statements: 95, | ||
branches: 95, | ||
functions: 95, | ||
lines: 95 | ||
}, | ||
coverageDirectory: 'coverage', | ||
rootDirectory: '' | ||
}; | ||
return gulp.src(['./static/js/**/*.js', './app/**/*.js']).pipe(coverageEnforcer(options)); | ||
}); | ||
|
||
gulp.task('test', function (cb) { | ||
gulp.src(['./static/js/**/*.js', './app/**/*.js']).pipe(istanbul()) // Covering files | ||
.on('end', function () { | ||
gulp.src(["./test/**/*.js"]).pipe(mocha()).pipe(istanbul.writeReports()) // Creating the reports after tests runned | ||
.on('end', cb); | ||
}); | ||
}); | ||
|
||
gulp.task('bump', function () { | ||
gulp.src(['./package.json', './bower.json']).pipe(bump({ | ||
type: 'patch' | ||
})).pipe(gulp.dest('./')); | ||
}); | ||
|
||
gulp.task('lint', ['beautify'], function () { | ||
return gulp.src(['./app/**/*.js', './test/**/*.js', './gulpfile.js', 'static/js/**/*.js']).pipe(jshint()).pipe(jshint.reporter('default')); | ||
}); | ||
|
||
gulp.task('beautify', function () { | ||
gulp.src(['./app/**/*.js', './test/**/*.js', './gulpfile.js', 'static/js/**/*.js'], { | ||
base: '.' | ||
}).pipe(beautify({ | ||
indentSize: 2, | ||
preserveNewlines: true | ||
})).pipe(gulp.dest('.')); | ||
}); |
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,43 @@ | ||
{ | ||
"name": "phragm", | ||
"version": "0.1.0", | ||
"prerelease": "alpha", | ||
"description": "sample project", | ||
"main": "server", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/leogdion/phragm.git" | ||
}, | ||
"scripts": { | ||
"test": "gulp test" | ||
}, | ||
"engines": { | ||
"node": "0.10.x" | ||
}, | ||
"author": "Leo G. Dion, BrightDigit, LLC <[email protected]>", | ||
"dependencies": { | ||
"body-parser": "^1.2.2", | ||
"express": "^4.3.2" | ||
}, | ||
"devDependencies": { | ||
"bower": "^1.3.3", | ||
"bower-requirejs": "^0.11.0", | ||
"chai": "^1.9.1", | ||
"chai-things": "^0.2.0", | ||
"event-stream": "^3.1.5", | ||
"gulp": "^3.7.0", | ||
"gulp-beautify": "^1.1.0", | ||
"gulp-bump": "^0.1.8", | ||
"gulp-clean": "^0.3.0", | ||
"gulp-coveralls": "^0.1.2", | ||
"gulp-express-service": "^1.2.3", | ||
"gulp-istanbul": "^0.2.0", | ||
"gulp-istanbul-enforcer": "^1.0.2", | ||
"gulp-jshint": "^1.6.1", | ||
"gulp-jst": "^0.1.1", | ||
"gulp-jst-concat": "0.0.1", | ||
"gulp-less": "^1.2.3", | ||
"gulp-mocha": "^0.4.1", | ||
"requirejs": "^2.1.13" | ||
} | ||
} |
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,81 @@ | ||
<!DOCTYPE html> | ||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | ||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | ||
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<title></title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width"> | ||
<script data-main="js/main" src="js/require.js"></script> | ||
<link rel="stylesheet" href="css/main.css"> | ||
<style> | ||
body { | ||
padding-top: 50px; | ||
padding-bottom: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<!--[if lt IE 7]> | ||
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p> | ||
<![endif]--> | ||
<div class="navbar navbar-inverse navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand" href="#">Project name</a> | ||
</div> | ||
<div class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li class="active"><a href="#">Home</a></li> | ||
<li><a href="#about">About</a></li> | ||
<li><a href="#contact">Contact</a></li> | ||
<li class="dropdown"> | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> | ||
<ul class="dropdown-menu"> | ||
<li><a href="#">Action</a></li> | ||
<li><a href="#">Another action</a></li> | ||
<li><a href="#">Something else here</a></li> | ||
<li class="divider"></li> | ||
<li class="dropdown-header">Nav header</li> | ||
<li><a href="#">Separated link</a></li> | ||
<li><a href="#">One more separated link</a></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
<ul class="nav navbar-nav navbar-right"> | ||
<li><a id="build-version" href="#"></a></li> | ||
</ul> | ||
</div><!--/.navbar-collapse --> | ||
</div> | ||
</div> | ||
|
||
<!-- Main jumbotron for a primary marketing message or call to action --> | ||
|
||
<div class="container"> | ||
<!-- Example row of columns --> | ||
<main/> | ||
|
||
<hr> | ||
|
||
<footer> | ||
<p>© Company 2013</p> | ||
</footer> | ||
</div> <!-- /container --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | ||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.1.min.js"><\/script>')</script> | ||
|
||
<script> | ||
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; | ||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; | ||
g.src='//www.google-analytics.com/ga.js'; | ||
s.parentNode.insertBefore(g,s)}(document,'script')); | ||
</script> | ||
</body> | ||
</html> |
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,5 @@ | ||
requirejs.config({ | ||
shim: { | ||
bootstrap: ['jquery'] | ||
} | ||
}); |