From 079c265bae15e376b5f517bcf937d738a1ccb6b9 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 27 Mar 2015 13:31:59 -0600 Subject: [PATCH] gulp(e2e): remove unused var --- gulpfile.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index a076ee3ef1..7be7385fa3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,15 +2,15 @@ // Mostly stolen from https://github.com/pkozlowski-opensource/ng2-play ///// -var _ = require('lodash'); +var _ = require('lodash') var buildConfig = require('./scripts/build/config') var SystemJsBuilder = require('systemjs-builder') var exec = require('child_process').exec -var fs = require('fs'); +var fs = require('fs') var gulp = require('gulp') var karma = require('karma').server var path = require('path') -var VinylFile = require('vinyl'); +var VinylFile = require('vinyl') var argv = require('yargs').argv var concat = require('gulp-concat') @@ -89,7 +89,7 @@ gulp.task('e2e', ['build'], function() { file.dirname = file.dirname.replace('/test/', '/') })) .pipe(gulpif(/main.html$/, through2.obj(function(file, enc, next) { - var indexClone = _.clone(file); + var indexClone = _.clone(file) this.push(new VinylFile(_.assign(indexClone, { contents: new Buffer(indexContents), path: file.path.replace(/main.html$/, 'index.html'), @@ -97,16 +97,15 @@ gulp.task('e2e', ['build'], function() { next(null, file) }))) .pipe(gulpif(/.e2e.js$/, through2.obj(function(file, enc, next) { - var basename = path.basename(file); var relativePath = path.dirname(file.path.replace(/^.*?src.components/, '')) - var contents = file.contents.toString(); - contents = template(_.defaults(data || {}, { + var contents = file.contents.toString() + contents = testTemplate({ contents: contents, buildConfig: buildConfig, relativePath: relativePath - })) - file.contents = new Buffer(contents); - next(null, file); + }) + file.contents = new Buffer(contents) + next(null, file) }))) .pipe(gulpif({ isFile: true }, gulp.dest(buildConfig.dist + '/e2e'))) })