Created
November 16, 2014 23:09
-
-
Save josephj/f220238602ae0201efc7 to your computer and use it in GitHub Desktop.
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
# Constants | |
CSS_PATH = './src/assets/css/*.css' | |
JS_PATH = './src/assets/js/*.js' | |
SASS_PATH = './src/assets/css/*.sass' | |
OUTPUT_PATH = './src/assets/css' | |
HTML_PATH = './src/index.html' | |
HTTP_PORT = 8087 | |
LIVERELOAD_PORT = 32718 | |
# Gulp plugins | |
gulp = require 'gulp' | |
connect = require 'gulp-connect' | |
sass = require 'gulp-sass' | |
watch = require 'gulp-watch' | |
# Task - connect | |
gulp.task 'connect', -> | |
connect.server | |
root: ['src'] | |
port: HTTP_PORT | |
livereload: | |
port: LIVERELOAD_PORT | |
# Task - watch | |
gulp.task 'watch', -> | |
gulp.src SASS_PATH | |
.pipe watch(SASS_PATH) | |
.pipe sass | |
errLogToConsole: true | |
sourceComments : 'normal' | |
.pipe gulp.dest(OUTPUT_PATH) | |
gulp.src [HTML_PATH, CSS_PATH, JS_PATH] | |
.pipe watch([HTML_PATH, CSS_PATH, JS_PATH]) | |
.pipe connect.reload() | |
gulp.task 'default', ['connect', '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 characters
require('coffee-script/register'); | |
require('./gulpfile.coffee'); |
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": "prototype", | |
"version": "0.0.0", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "josephj", | |
"license": "ISC", | |
"devDependencies": { | |
"coffee-script": "^1.8.0", | |
"gulp": "^3.8.10", | |
"gulp-connect": "^2.2.0", | |
"gulp-sass": "^1.1.0", | |
"gulp-watch": "^1.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment