Skip to content

Instantly share code, notes, and snippets.

Created March 26, 2014 00:12
Show Gist options
  • Save anonymous/9774298 to your computer and use it in GitHub Desktop.
Save anonymous/9774298 to your computer and use it in GitHub Desktop.
gulp ENOENT
gulp = require('gulp');
rename = require('gulp-rename');
gulp.task('enoent', function () {
gulp.src('./this-file-does-not-exist')
.pipe(rename('enoent'))
.pipe(gulp.dest('.'));
});
gulp.task('ok', function () {
gulp.src('./this-one-does')
.pipe(rename('ok'))
.pipe(gulp.dest('.'));
});
gulp.task('default', ['enoent', 'ok']);
{
"name": "gulp-enoent",
"version": "0.0.0",
"description": "Gulp Fails Silently on ENOENT. This behavior is not cool.",
"main": "gulpfile.js",
"dependencies": {
"gulp": "~3.5.6",
"gulp-rename": "~1.2.0"
},
"devDependencies": {
"gulp": "^3.5.6",
"gulp-rename": "^1.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
sample contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment