Created
          February 29, 2016 23:19 
        
      - 
      
 - 
        
Save bryceroney/395b2cc578d6fb175596 to your computer and use it in GitHub Desktop.  
    Template Gulpfile
  
        
  
    
      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 characters
    
  
  
    
  | var gulp = require('gulp'), | |
| wiredep = require('wiredep').stream, | |
| sass = require('gulp-sass'), | |
| nano = require('gulp-cssnano'), | |
| uncss = require('gulp-uncss'), | |
| server = require('gulp-server-livereload') | |
| gulp.task('bower', function() { | |
| gulp.src('./app/*.html') | |
| .pipe(wiredep()) | |
| .pipe(gulp.dest('./app')) | |
| }); | |
| gulp.task('styles', function() { | |
| gulp.src('./app/styles/*.scss') | |
| .pipe(wiredep()) | |
| .pipe(sass().on('error', sass.logError)) | |
| // .pipe(uncss({html: ['./app/*.html']})) | |
| // .pipe(nano()) | |
| .pipe(gulp.dest('./app/styles')); | |
| }); | |
| gulp.task('scripts', function() { | |
| gulp.src('./app/scripts/*.js') | |
| .pipe(gulp.dest('./app/scripts')); | |
| }) | |
| gulp.task('serve', ['default'], function() { | |
| gulp.src('./app') | |
| .pipe(server({ | |
| livereload: true, | |
| open: true | |
| })) | |
| }) | |
| gulp.task('default', ['bower', 'styles', 'scripts']); | 
  
    
      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 characters
    
  
  
    
  | { | |
| "name": "website_template", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "GPL-3.0", | |
| "dependencies": { | |
| "gulp": "^3.9.0", | |
| "gulp-sass": "^2.1.1", | |
| "wiredep": "^3.0.0" | |
| }, | |
| "devDependencies": { | |
| "gulp-cssnano": "^2.0.0", | |
| "gulp-server-livereload": "^1.5.4", | |
| "gulp-uncss": "^1.0.4" | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment