Skip to content

Commit

Permalink
Add CSS build step to .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
barrymcgee committed Feb 7, 2017
1 parent a70a47d commit c8230ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ notifications:
language: ruby
rvm: 2.1.1
before_script:
- npm i
- node_modules/gulp/bin/gulp.js sass:jekyll
- gem install jekyll
- gem install percy-cli
script:
Expand Down
8 changes: 8 additions & 0 deletions gulp/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ gulp.task('sass:develop', function() {
.pipe(gulp.dest('jekyll/css/'));
});

// Build Sass for visual regression testing
gulp.task('sass:jekyll', function() {
return gulp.src(sassPath)
.pipe(sass({ errLogToConsole: true }))
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1'))
.pipe(gulp.dest('_jekyll/_site/build/css/'));
});

// Build Sass for production
gulp.task('sass:build', function() {
return gulp.src(sassPath)
Expand Down

0 comments on commit c8230ff

Please sign in to comment.