Skip to content

Instantly share code, notes, and snippets.

@ericlbarnes
Last active January 8, 2024 01:52
Show Gist options
  • Save ericlbarnes/ac3ae075c97c1073869c to your computer and use it in GitHub Desktop.
Save ericlbarnes/ac3ae075c97c1073869c to your computer and use it in GitHub Desktop.

Revisions

  1. ericlbarnes revised this gist Sep 20, 2014. 2 changed files with 29 additions and 0 deletions.
    20 changes: 20 additions & 0 deletions bower.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    {
    "name": "project",
    "version": "0.0.0",
    "authors": [
    "Eric Barnes <[email protected]>"
    ],
    "license": "MIT",
    "private": true,
    "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
    ],
    "dependencies": {
    "fontawesome": "~4.2.0",
    "bootstrap-sass-official": "~3.2.0"
    }
    }
    9 changes: 9 additions & 0 deletions package.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    {
    "devDependencies": {
    "gulp": "^3.8.8",
    "gulp-ruby-sass": "^0.7.1",
    "gulp-notify": "^1.6.0",
    "gulp-autoprefixer": "^1.0.0",
    "gulp-bower": "0.0.6"
    }
    }
  2. ericlbarnes created this gist Sep 20, 2014.
    46 changes: 46 additions & 0 deletions gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    // Basic Gulp File
    //
    var gulp = require('gulp'),
    sass = require('gulp-ruby-sass')
    autoprefix = require('gulp-autoprefixer')
    notify = require("gulp-notify")
    bower = require('gulp-bower');

    var config = {
    sassPath: './resources/sass',
    bowerDir: './bower_components'
    }

    gulp.task('bower', function() {
    return bower()
    .pipe(gulp.dest(config.bowerDir))
    });

    gulp.task('icons', function() {
    return gulp.src(config.bowerDir + '/fontawesome/fonts/**.*')
    .pipe(gulp.dest('./public/fonts'));
    });

    gulp.task('css', function() {
    return gulp.src(config.sassPath + '/style.scss')
    .pipe(sass({
    style: 'compressed',
    loadPath: [
    './resources/sass',
    config.bowerDir + '/bootstrap-sass-official/assets/stylesheets',
    config.bowerDir + '/fontawesome/scss',
    ]
    })
    .on("error", notify.onError(function (error) {
    return "Error: " + error.message;
    })))
    .pipe(autoprefix('last 2 version'))
    .pipe(gulp.dest('./public/css'));
    });

    // Rerun the task when a file changes
    gulp.task('watch', function() {
    gulp.watch(config.sassPath + '/**/*.scss', ['css']);
    });

    gulp.task('default', ['bower', 'icons', 'css']);