Last active
October 12, 2024 17:15
-
-
Save chriskjaer/8634047 to your computer and use it in GitHub Desktop.
Revisions
-
chriskjaer revised this gist
Jan 29, 2014 . 2 changed files with 2 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ var gulp = require('gulp'), uglify = require('gulp-uglify'), jade = require('gulp-jade'), concat = require('gulp-concat'), livereload = require('gulp-livereload'), // Livereload plugin needed: https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei tinylr = require('tiny-lr'), express = require('express'), app = express(), This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,8 @@ { "name": "gulp", "version": "0.0.1", "description": "Gulp Recipe - Jade, Sass, Livereload and static server", "author": "Chris Kjaer", "devDependencies": { "gulp-concat": "~2.1.7", "gulp-util": "~2.2.12", -
chriskjaer revised this gist
Jan 26, 2014 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ var gulp = require('gulp'), gutil = require('gulp-util'), sass = require('gulp-sass'), @@ -62,8 +61,7 @@ gulp.task('watch', function () { gulp.watch('src/assets/js/*.js',['js']); gulp.watch('src/*.jade',['templates']); }); }); -
chriskjaer created this gist
Jan 26, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,71 @@ var gulp = require('gulp'), gutil = require('gulp-util'), sass = require('gulp-sass'), csso = require('gulp-csso'), uglify = require('gulp-uglify'), jade = require('gulp-jade'), concat = require('gulp-concat'), livereload = require('gulp-livereload'), tinylr = require('tiny-lr'), express = require('express'), app = express(), marked = require('marked'), // For :markdown filter in jade path = require('path'), server = tinylr(); // --- Basic Tasks --- gulp.task('css', function() { return gulp.src('src/assets/stylesheets/*.scss') .pipe( sass( { includePaths: ['src/assets/stylesheets'], errLogToConsole: true } ) ) .pipe( csso() ) .pipe( gulp.dest('dist/assets/stylesheets/') ) .pipe( livereload( server )); }); gulp.task('js', function() { return gulp.src('src/assets/scripts/*.js') .pipe( uglify() ) .pipe( concat('all.min.js')) .pipe( gulp.dest('dist/assets/scripts/')) .pipe( livereload( server )); }); gulp.task('templates', function() { return gulp.src('src/*.jade') .pipe(jade({ pretty: true })) .pipe(gulp.dest('dist/')) .pipe( livereload( server )); }); gulp.task('express', function() { app.use(express.static(path.resolve('./dist'))); app.listen(1337); gutil.log('Listening on port: 1337'); }); gulp.task('watch', function () { server.listen(35729, function (err) { if (err) { return console.log(err); } gulp.watch('src/assets/stylesheets/*.scss',['css']); gulp.watch('src/assets/js/*.js',['js']); gulp.watch('src/*.jade',['templates']); gulp.watch('src/posts/*.md',['post']); }); }); // Default Task gulp.task('default', ['js','css','templates','express','watch']); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ { "name": "gulp", "version": "0.0.0", "description": "Gulp Recipe - Jade, Sass, Livereload and static server", "main": "index.js", "scripts": { }, "author": "Chris Kjaer", "license": "ISC", "devDependencies": { "gulp-concat": "~2.1.7", "gulp-util": "~2.2.12", "gulp": "~3.5.0", "gulp-uglify": "~0.1.0", "gulp-csso": "~0.1.8", "gulp-sass": "~0.4.1", "gulp-jade": "~0.3.0", "gulp-livereload": "~0.2.0", "tiny-lr": "0.0.5", "express": "~3.4.8", "marked": "~0.3.0" } }