Skip to content

Commit

Permalink
Add missing semicolons. Optimizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ledin committed May 10, 2017
1 parent 90c3294 commit 0747c60
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('gulp-changed-in-place', function () {
.pipe(es.map(function (file, callback) {
// imitate gulp.dest without actualy writing files
// @see https://github.com/gulpjs/vinyl-fs/blob/master/lib/prepareWrite.js#L24
var targetBase = path.resolve(file.cwd, './build')
var targetBase = path.resolve(file.cwd, './build');
var targetPath = path.resolve(targetBase, file.relative);
file.base = targetBase;
file.path = targetPath;
Expand Down Expand Up @@ -127,10 +127,8 @@ describe('gulp-changed-in-place', function () {

var timeNow = Date.now() / 1000; // https://nodejs.org/docs/latest/api/fs.html#fs_fs_utimes_path_atime_mtime_callback

var theDate = new Date();
var currentYear = new Date().getFullYear();
var yesterYear = currentYear - 1;
var timeThen = new Date().setFullYear(yesterYear);
var timeThen = new Date();
timeThen.setFullYear(timeThen.getFullYear() - 1);

var fileBTime = fs.statSync(fileB).mtime;
fs.utimesSync(fileA, timeNow, timeNow);
Expand Down Expand Up @@ -163,7 +161,7 @@ describe('gulp-changed-in-place', function () {
.pipe(es.map(function (file, callback) {
// imitate gulp.dest without actualy writing files
// @see https://github.com/gulpjs/vinyl-fs/blob/master/lib/prepareWrite.js#L24
var targetBase = path.resolve(file.cwd, './build')
var targetBase = path.resolve(file.cwd, './build');
var targetPath = path.resolve(targetBase, file.relative);
file.base = targetBase;
file.path = targetPath;
Expand Down

0 comments on commit 0747c60

Please sign in to comment.