Skip to content

Commit

Permalink
local development
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiokopplin committed Feb 25, 2016
1 parent 7a16341 commit 9c2fe8b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ picture: 'assets/images/profile.jpg'

url: http://sergiokopplin.github.io/indigo
# your url: http://USERNAME.github.io
# if testing locally: http://localhost:3000

permalink: /:title/

Expand Down
2 changes: 2 additions & 0 deletions _config_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# for local testing
url: http://localhost:3000
7 changes: 5 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ var gulp = require('gulp'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
plumber = require('gulp-plumber'),
cp = require('child_process');
cp = require('child_process'),
changed = require('gulp-changed'),

// stylus
stylus = require('gulp-stylus'),
Expand All @@ -19,7 +20,7 @@ var messages = {

gulp.task('jekyll-build', function (done) {
browserSync.notify(messages.jekyllBuild);
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--drafts'], {stdio: 'inherit'}).on('close', done);
return cp.spawn('bundle', ['exec', 'jekyll', 'build', '--drafts', '--quiet', '--config', '_config.yml,_config_dev.yml'], {stdio: 'inherit'}).on('close', done);
// return cp.spawn('bundle', ['exec', 'jekyll', 'build'], {stdio: 'inherit'}).on('close', done);
});

Expand All @@ -36,6 +37,7 @@ gulp.task('browserSync', ['jekyll-build'], function() {

gulp.task('styles', function() {
return gulp.src('src/styles/main.styl')
.pipe(changed('assets/styles'))
.pipe(plumber())
.pipe(stylus({
use:[prefixer(), rupture(), nib()],
Expand All @@ -49,6 +51,7 @@ gulp.task('styles', function() {

gulp.task('imagemin', function(tmp) {
return gulp.src('assets/images/**/*.{jpg,png,gif}')
.pipe(changed('assets/images'))
.pipe(plumber())
.pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))
.pipe(gulp.dest('assets/images'));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"autoprefixer-stylus": "^0.8.1",
"browser-sync": "^2.10.1",
"gulp": "^3.9.0",
"gulp-changed": "^1.3.0",
"gulp-concat": "^2.6.0",
"gulp-imagemin": "^2.4.0",
"gulp-plumber": "^1.0.1",
Expand Down

0 comments on commit 9c2fe8b

Please sign in to comment.