Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ node_modules
# Debug log from npm
npm-debug.log


#dynamic content

public/stylesheets/style.css
public/stylesheets/**/*.css

#generated site.

_site
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Shawn Cicoria

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Step1

These are edits.
We should be at the point of a running Express site

And a Gulp tasks that compiles the LESS files for me and packages the site into _site





17 changes: 17 additions & 0 deletions checkout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var debug = require('debug')('HelloWorld:checkout');

var vsocheckout = require('vsocheckout');

var url = 'localhost:3000/vsostatus';

vsocheckout.getStatus(url, 236, function(err, result){
if (err) console.error(err);
else {
debug('got data to work with..');
vsocheckout.checkout(result);

}


});

64 changes: 64 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
var gulp = require('gulp');
var concat = require('gulp-concat');
var jade = require('gulp-jade');
var less = require('gulp-less');
var minifyCss = require('gulp-minify-css');
var notify = require('gulp-notify');
var replace = require('gulp-replace');
var vinylPaths = require('vinyl-paths');

var del = require('del');
var path = require('path');


gulp.task('default', function() {
return gulp.src('')
.pipe(notify({ message: 'welcome to gulp...'}));
});

gulp.task('clean', function () {
return gulp.src('./_site/*')
.pipe(vinylPaths(del))
});

gulp.task('less', function () {
// w/out concat you end up w/ 2 files
return gulp.src(['./public/stylesheets/bootstrap/bootstrap.less', './public/stylesheets/style.less'])

.pipe(less())
.pipe(concat('style.css'))
.pipe(minifyCss()) //.pipe(minifyCss({compatibility: 'ie8'}))
.pipe(gulp.dest('./_site/public/stylesheets/'));
});


gulp.task('copy', function(){
//using 'base' parm keeps each file and roots them in the dest
return gulp.src(
[
'./bin/**',
'./routes/**',
'./views/**',
'./app.js',
'./package.json'
],
{ base: '.' }
)
.pipe(replace('link(rel=\'stylesheet\', href=\'/stylesheets/bootstrap/bootstrap.css\')', ''))
.pipe(gulp.dest('./_site/'))
});


gulp.task('jade', function(){
//locals are defined for jade process - otherwise the object notavaiblle during compile.
var YOUR_LOCALS = { error : { status: 'foo' }};
return gulp.src('./views/**/*.jade')
.pipe(jade({
locals: YOUR_LOCALS
}));
});



gulp.task('package', ['less', 'copy', 'jade']);

22 changes: 19 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
"start": "node ./bin/www",
"debug": "set DEBUG=HelloWorld:* && nodemon ./bin/www",
"test": "set DEBUG=*:* && node checkout.js",
"pretest": "npm uninstall vsocheckout && npm install file:..\\..\\vs\\vsocheckout",
"quick" : "set DEBUG=*:* && node checkout.js"
},
"dependencies": {
"body-parser": "~1.13.2",
Expand All @@ -13,6 +17,18 @@
"jade": "~1.11.0",
"less-middleware": "1.0.x",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0"
"serve-favicon": "~2.3.0",
"vsocheckout": "file:..\\..\\vs\\vsocheckout"
},
"devDependencies": {
"del": "^2.2.0",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-jade": "^1.1.0",
"gulp-less": "^3.0.5",
"gulp-minify-css": "^1.2.2",
"gulp-notify": "^2.2.0",
"gulp-replace": "^0.5.4",
"vinyl-paths": "^2.1.0"
}
}
}
Loading