This file contains 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'); | |
var coffee = require('gulp-coffee'); | |
gulp.task('scripts', function () { | |
gulp.src('src/*.coffee') | |
.pipe(coffee()) | |
.pipe(gulp.dest('./')); | |
}); | |
gulp.task('watch', function () { |
This file contains 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
# Source: http://fvue.nl/wiki/Bash:_Error_handling | |
# | |
#!/bin/bash -eu | |
# -e: Exit immediately if a command exits with a non-zero status. | |
# -u: Treat unset variables as an error when substituting. | |
(false) # Caveat 1: If an error occurs in a subshell, it isn't detected | |
(false) || false # Solution: If you want to exit, you have to detect the error yourself | |
(false; true) || false # Caveat 2: The return status of the ';' separated list is `true' | |
(false && true) || false # Solution: If you want to control the last command executed, use `&&' |