mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
gulp4 ftw
This commit is contained in:
403
gulpfile.js
403
gulpfile.js
@ -53,243 +53,224 @@ var tscReporter = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('clean.build', function() {
|
// Framework
|
||||||
runSequence(
|
gulp.task('transpile', transpileTask);
|
||||||
'clean',
|
gulp.task('bundle.js', bundleJsTask);
|
||||||
'transpile',
|
gulp.task('sass', sassTask);
|
||||||
//'bundle.deps',
|
gulp.task('fonts', fontsTask);
|
||||||
'bundle.js',
|
|
||||||
'examples',
|
|
||||||
'sass',
|
|
||||||
'fonts',
|
|
||||||
'vendor',
|
|
||||||
'copy-scripts');
|
|
||||||
})
|
|
||||||
|
|
||||||
gulp.task('build', function() {
|
// Karma testing
|
||||||
runSequence(
|
gulp.task('tests', testsTask);
|
||||||
'transpile',
|
gulp.task('karma', karmaTask);
|
||||||
'bundle.js',
|
gulp.task('karma-watch', karmaWatchTask);
|
||||||
'examples',
|
|
||||||
'sass',
|
|
||||||
'fonts',
|
|
||||||
'vendor',
|
|
||||||
'copy-scripts');
|
|
||||||
})
|
|
||||||
|
|
||||||
gulp.task('watch', function() {
|
// e2e testing
|
||||||
|
gulp.task('e2e.copy', e2eCopyTask);
|
||||||
|
gulp.task('e2e.template', e2eHTMLTemplateTask);
|
||||||
|
gulp.task('e2e.transpile', e2eTranspileTask);
|
||||||
|
gulp.task('e2e.tests', e2eTestsTask);
|
||||||
|
gulp.task('e2e', gulp.parallel('e2e.copy', 'e2e.template', 'e2e.transpile', 'e2e.tests'));
|
||||||
|
|
||||||
runSequence(
|
// Utility
|
||||||
'transpile',
|
gulp.task('clean', cleanTask);
|
||||||
'bundle.js',
|
gulp.task('vendor', vendorTask);
|
||||||
'examples',
|
gulp.task('copy-scripts', copyScriptsTask);
|
||||||
'sass',
|
gulp.task('serve', serveTask);
|
||||||
'fonts',
|
gulp.task('watch-task', watchTask);
|
||||||
'vendor',
|
gulp.task('watch', gulp.series('serve', 'watch-task'));
|
||||||
'copy-scripts',
|
gulp.task('examples', gulp.parallel('e2e.copy', 'e2e.template', 'e2e.transpile'));
|
||||||
'serve',
|
|
||||||
|
|
||||||
function() {
|
// Build
|
||||||
watch(
|
gulp.task('build', gulp.parallel(
|
||||||
[
|
gulp.series('transpile', 'bundle.js', 'copy-scripts'),
|
||||||
'ionic/**/*.js',
|
'sass',
|
||||||
'ionic/**/*.ts',
|
'fonts',
|
||||||
'!ionic/components/*/test/**/*',
|
'vendor'
|
||||||
'!ionic/util/test/*'
|
))
|
||||||
],
|
|
||||||
function() {
|
|
||||||
runSequence(
|
|
||||||
'transpile',
|
|
||||||
'bundle.js',
|
|
||||||
'examples'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
watch('ionic/components/*/test/**/*', function() {
|
gulp.task('clean.build', gulp.series(
|
||||||
gulp.start('examples');
|
'clean',
|
||||||
});
|
'build'
|
||||||
|
));
|
||||||
|
|
||||||
watch('ionic/**/*.scss', function() {
|
gulp.task('build.watch', gulp.series(
|
||||||
gulp.start('sass');
|
gulp.parallel('build', 'examples'),
|
||||||
});
|
'serve',
|
||||||
})
|
'watch-task'
|
||||||
});
|
))
|
||||||
|
|
||||||
gulp.task('serve', function() {
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
function watchTask(done) {
|
||||||
|
watch([
|
||||||
|
'ionic/**/*.js',
|
||||||
|
'ionic/**/*.ts',
|
||||||
|
'!ionic/components/*/test/**/*',
|
||||||
|
'!ionic/util/test/*'
|
||||||
|
],
|
||||||
|
gulp.series('transpile', 'bundle.js')
|
||||||
|
);
|
||||||
|
watch('ionic/components/*/test/**/*.ts', e2eTranspileTask);
|
||||||
|
watch('scripts/e2e/e2e.template.html', e2eHTMLTemplateTask);
|
||||||
|
watch([
|
||||||
|
'ionic/components/*/test/**/*',
|
||||||
|
'!ionic/components/*/test/**/*.ts'
|
||||||
|
],
|
||||||
|
e2eCopyTask
|
||||||
|
);
|
||||||
|
watch('ionic/**/*.scss', sassTask);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
|
function serveTask(done) {
|
||||||
connect.server({
|
connect.server({
|
||||||
root: 'dist',
|
root: 'dist',
|
||||||
port: 8000,
|
port: 8000,
|
||||||
livereload: false
|
livereload: false
|
||||||
});
|
});
|
||||||
});
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
gulp.task('clean', function(done) {
|
function cleanTask(done) {
|
||||||
del(['dist/'], done);
|
del(['dist/'], done);
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('transpile', function() {
|
function transpileTask() {
|
||||||
var stream = gulp.src(
|
var stream = gulp.src([
|
||||||
[
|
'ionic/**/*.ts',
|
||||||
'ionic/**/*.ts',
|
'ionic/**/*.js',
|
||||||
'ionic/**/*.js',
|
'!ionic/components/*/test/**/*',
|
||||||
'!ionic/components/*/test/**/*',
|
'!ionic/init.js',
|
||||||
'!ionic/init.js',
|
'!ionic/util/test/*'
|
||||||
'!ionic/util/test/*'
|
])
|
||||||
]
|
.pipe(cache('transpile', { optimizeMemory: true }))
|
||||||
)
|
.pipe(tsc(tscOptions, null, tscReporter))
|
||||||
.pipe(cache('transpile', { optimizeMemory: true }))
|
.on('error', function(error) {
|
||||||
.pipe(tsc(tscOptions, null, tscReporter))
|
stream.emit('end');
|
||||||
.on('error', function(error) {
|
})
|
||||||
stream.emit('end');
|
.pipe(gulp.dest('dist/js/es6/ionic'))
|
||||||
})
|
.pipe(babel(getBabelOptions('ionic')))
|
||||||
.pipe(gulp.dest('dist/js/es6/ionic'))
|
.on('error', function (err) {
|
||||||
.pipe(babel(getBabelOptions('ionic')))
|
console.log("ERROR: " + err.message);
|
||||||
.on('error', function (err) {
|
this.emit('end');
|
||||||
console.log("ERROR: " + err.message);
|
})
|
||||||
this.emit('end');
|
.pipe(gulp.dest('dist/js/es5/ionic'))
|
||||||
})
|
|
||||||
.pipe(gulp.dest('dist/js/es5/ionic'))
|
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('bundle.js', function() {
|
function bundleJsTask() {
|
||||||
return gulp.src(['dist/js/es5/ionic/**/*.js', 'ionic/init.js'])
|
return gulp.src(['dist/js/es5/ionic/**/*.js', 'ionic/init.js'])
|
||||||
.pipe(concat('ionic.bundle.js'))
|
.pipe(concat('ionic.bundle.js'))
|
||||||
.pipe(gulp.dest('dist/js/'));
|
.pipe(gulp.dest('dist/js/'));
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('tests', function() {
|
function testsTask() {
|
||||||
return gulp.src('ionic/components/*/test/*/**/*.spec.ts')
|
return gulp.src('ionic/components/*/test/*/**/*.spec.ts')
|
||||||
.pipe(tsc(tscOptions, null, tscReporter))
|
.pipe(tsc(tscOptions, null, tscReporter))
|
||||||
.pipe(babel(getBabelOptions('tests')))
|
.pipe(babel(getBabelOptions('tests')))
|
||||||
.pipe(rename(function(file) {
|
.pipe(rename(function(file) {
|
||||||
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('dist/tests'))
|
.pipe(gulp.dest('dist/tests'))
|
||||||
})
|
}
|
||||||
|
|
||||||
gulp.task('examples', function() {
|
function copyScriptsTask() {
|
||||||
var buildTest = lazypipe()
|
return gulp.src([
|
||||||
.pipe(tsc, tscOptions, null, tscReporter)
|
'scripts/resources/*.js',
|
||||||
.pipe(babel, getBabelOptions('examples'))
|
'config.js',
|
||||||
|
'dist/js/ionic.bundle.js',
|
||||||
|
'dist/vendor/web-animations-js/web-animations.min.js'
|
||||||
|
])
|
||||||
|
.pipe(gulp.dest('dist/lib'));
|
||||||
|
}
|
||||||
|
|
||||||
// Get each test folder with gulp.src
|
|
||||||
return gulp.src(['ionic/components/*/test/*/**/*', '!ionic/components/*/test/*/**/*.spec.ts'])
|
function e2eCopyTask() {
|
||||||
.pipe(cache('examples', { optimizeMemory: true }))
|
return gulp.src([
|
||||||
.pipe(gulpif(/.ts$/, buildTest()))
|
'ionic/components/*/test/*/**/*',
|
||||||
|
'!ionic/components/*/test/*/**/*.ts'
|
||||||
|
])
|
||||||
|
.pipe(rename(function(file) {
|
||||||
|
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest('dist/e2e'))
|
||||||
|
}
|
||||||
|
|
||||||
|
function e2eTranspileTask() {
|
||||||
|
return gulp.src([
|
||||||
|
'ionic/components/*/test/*/**/*.ts',
|
||||||
|
'!ionic/components/*/test/*/**/*.spec.ts',
|
||||||
|
'!ionic/components/*/test/*/**/e2e.ts'
|
||||||
|
])
|
||||||
|
.pipe(cache('e2e.transpile', { optimizeMemory: true }))
|
||||||
|
.pipe(tsc(tscOptions, null, tscReporter))
|
||||||
|
.pipe(babel(getBabelOptions('e2e')))
|
||||||
.on('error', function (err) {
|
.on('error', function (err) {
|
||||||
console.log("ERROR: " + err.message);
|
console.log("ERROR: " + err.message);
|
||||||
this.emit('end');
|
this.emit('end');
|
||||||
})
|
})
|
||||||
.pipe(gulpif(/index.js$/, createIndexHTML())) //TSC changes .ts to .js
|
|
||||||
.pipe(rename(function(file) {
|
.pipe(rename(function(file) {
|
||||||
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('dist/examples/'))
|
|
||||||
|
|
||||||
function createIndexHTML() {
|
|
||||||
var template = _.template(
|
|
||||||
fs.readFileSync('scripts/e2e/example.template.html')
|
|
||||||
)({
|
|
||||||
buildConfig: buildConfig
|
|
||||||
});
|
|
||||||
|
|
||||||
return through2.obj(function(file, enc, next) {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
var module = path.dirname(file.path)
|
|
||||||
.replace(__dirname, '')
|
|
||||||
.replace('/ionic/components/', 'examples/')
|
|
||||||
.replace('/test/', '/') +
|
|
||||||
'/index';
|
|
||||||
|
|
||||||
var indexContents = template.replace('{{MODULE}}', module);
|
|
||||||
|
|
||||||
self.push(new VinylFile({
|
|
||||||
base: file.base,
|
|
||||||
contents: new Buffer(indexContents),
|
|
||||||
path: path.join(path.dirname(file.path), 'index.html'),
|
|
||||||
}));
|
|
||||||
next(null, file);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('copy-scripts', function(){
|
|
||||||
gulp.src(['scripts/resources/*.js', 'config.js', 'dist/js/ionic.bundle.js',
|
|
||||||
'dist/vendor/web-animations-js/web-animations.min.js'])
|
|
||||||
.pipe(gulp.dest('dist/lib'));
|
|
||||||
})
|
|
||||||
|
|
||||||
gulp.task('e2e', ['copy-scripts'], function() {
|
|
||||||
var buildTest = lazypipe()
|
|
||||||
//.pipe(traceur, traceurOptions)
|
|
||||||
.pipe(tsc, tscOptions, null, tscReporter)
|
|
||||||
.pipe(babel, getBabelOptions('e2e'))
|
|
||||||
|
|
||||||
var buildE2ETest = lazypipe()
|
|
||||||
//.pipe(traceur, traceurOptions)
|
|
||||||
.pipe(tsc, tscOptions, null, tscReporter)
|
|
||||||
.pipe(babel)
|
|
||||||
|
|
||||||
var indexTemplate = _.template(
|
|
||||||
fs.readFileSync('scripts/e2e/e2e.template.html')
|
|
||||||
)({
|
|
||||||
buildConfig: buildConfig
|
|
||||||
|
|
||||||
})
|
|
||||||
var testTemplate = _.template( fs.readFileSync('scripts/e2e/e2e.template.js') )
|
|
||||||
|
|
||||||
var platforms = [
|
|
||||||
'android',
|
|
||||||
'core',
|
|
||||||
'ios',
|
|
||||||
];
|
|
||||||
|
|
||||||
// Get each test folder with gulp.src
|
|
||||||
return gulp.src(['ionic/components/*/test/*/**/*', '!ionic/components/*/test/*/**/*.spec.ts'])
|
|
||||||
.pipe(cache('e2e', { optimizeMemory: true }))
|
|
||||||
.pipe(gulpif(/e2e.ts$/, buildE2ETest()))
|
|
||||||
.pipe(gulpif(/.ts$/, buildTest()))
|
|
||||||
.on('error', function (err) {
|
|
||||||
console.log("ERROR: " + err.message);
|
|
||||||
this.emit('end');
|
|
||||||
})
|
|
||||||
.pipe(gulpif(/index.js$/, createIndexHTML())) //TSC changes .ts to .js
|
|
||||||
.pipe(rename(function(file) {
|
|
||||||
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
|
||||||
}))
|
|
||||||
.pipe(gulpif(/e2e.js$/, createPlatformTests()))
|
|
||||||
.pipe(gulp.dest('dist/e2e/'))
|
.pipe(gulp.dest('dist/e2e/'))
|
||||||
|
}
|
||||||
|
|
||||||
function createIndexHTML() {
|
function e2eHTMLTemplateTask() {
|
||||||
return through2.obj(function(file, enc, next) {
|
var HTMLTemplate = _.template(
|
||||||
var self = this;
|
fs.readFileSync('scripts/e2e/e2e.template.html')
|
||||||
|
)({
|
||||||
|
buildConfig: buildConfig
|
||||||
|
});
|
||||||
|
|
||||||
|
// we won't actually do anything with index.ts, we just know that this is the
|
||||||
|
// location index.html should be
|
||||||
|
return gulp.src('ionic/components/*/test/*/**/index.ts')
|
||||||
|
.pipe(cache('e2e.html.template', { optimizeMemory: true }))
|
||||||
|
.pipe(through2.obj(function(file, enc, next) {
|
||||||
var module = path.dirname(file.path)
|
var module = path.dirname(file.path)
|
||||||
.replace(__dirname, '')
|
.replace(__dirname, '')
|
||||||
.replace('/ionic/components/', 'e2e/')
|
.replace('/ionic/components/', 'e2e/')
|
||||||
.replace('/test/', '/') +
|
.replace('/test/', '/') +
|
||||||
'/index';
|
'/index';
|
||||||
|
|
||||||
var indexContents = indexTemplate.replace('{{MODULE}}', module);
|
var templateContents = HTMLTemplate.replace('{{MODULE}}', module);
|
||||||
|
var indexFile = new VinylFile({
|
||||||
self.push(new VinylFile({
|
|
||||||
base: file.base,
|
base: file.base,
|
||||||
contents: new Buffer(indexContents),
|
contents: new Buffer(templateContents),
|
||||||
path: path.join(path.dirname(file.path), 'index.html'),
|
path: path.join(path.dirname(file.path), 'index.html'),
|
||||||
}));
|
})
|
||||||
next(null, file);
|
next(null, indexFile);
|
||||||
});
|
}))
|
||||||
}
|
.pipe(rename(function(file) {
|
||||||
|
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest('dist/e2e/'))
|
||||||
|
}
|
||||||
|
|
||||||
function createPlatformTests(file) {
|
function e2eTestsTask() {
|
||||||
return through2.obj(function(file, enc, next) {
|
var testTemplate = _.template(fs.readFileSync('scripts/e2e/e2e.template.js'));
|
||||||
var self = this
|
var platforms = [
|
||||||
var relativePath = path.dirname(file.path.replace(/^.*?ionic(\/|\\)components(\/|\\)/, ''))
|
'android',
|
||||||
var contents = file.contents.toString()
|
'core',
|
||||||
|
'ios',
|
||||||
|
];
|
||||||
|
|
||||||
|
return gulp.src('ionic/components/*/test/*/**/e2e.ts')
|
||||||
|
.pipe(cache('e2e.tests', { optimizeMemory: true }))
|
||||||
|
.pipe(tsc(tscOptions, null, tscReporter))
|
||||||
|
.pipe(babel())
|
||||||
|
.on('error', function (err) {
|
||||||
|
console.log("ERROR: " + err.message);
|
||||||
|
this.emit('end');
|
||||||
|
})
|
||||||
|
.pipe(rename(function(file) {
|
||||||
|
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||||
|
}))
|
||||||
|
.pipe(through2.obj(function(file, enc, next) {
|
||||||
|
var self = this;
|
||||||
|
var relativePath = path.dirname(file.path.replace(/^.*?ionic(\/|\\)components(\/|\\)/, ''));
|
||||||
|
var contents = file.contents.toString();
|
||||||
platforms.forEach(function(platform) {
|
platforms.forEach(function(platform) {
|
||||||
var platformContents = testTemplate({
|
var platformContents = testTemplate({
|
||||||
contents: contents,
|
contents: contents,
|
||||||
@ -304,11 +285,11 @@ gulp.task('e2e', ['copy-scripts'], function() {
|
|||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
next()
|
next()
|
||||||
})
|
}))
|
||||||
}
|
.pipe(gulp.dest('dist/e2e/'))
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('sass', function() {
|
function sassTask() {
|
||||||
return gulp.src('ionic/ionic.scss')
|
return gulp.src('ionic/ionic.scss')
|
||||||
.pipe(sass({
|
.pipe(sass({
|
||||||
onError: function(err) {
|
onError: function(err) {
|
||||||
@ -317,25 +298,25 @@ gulp.task('sass', function() {
|
|||||||
}))
|
}))
|
||||||
.pipe(autoprefixer(buildConfig.autoprefixer))
|
.pipe(autoprefixer(buildConfig.autoprefixer))
|
||||||
.pipe(gulp.dest('dist/css/'));
|
.pipe(gulp.dest('dist/css/'));
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('fonts', function() {
|
function fontsTask() {
|
||||||
return gulp.src('ionic/components/icon/fonts/**/*')
|
return gulp.src('ionic/components/icon/fonts/**/*')
|
||||||
.pipe(gulp.dest('dist/fonts'));
|
.pipe(gulp.dest('dist/fonts'));
|
||||||
});
|
}
|
||||||
|
|
||||||
gulp.task('vendor', function() {
|
function vendorTask() {
|
||||||
return gulp.src(['scripts/vendor/**/*'])
|
return gulp.src(['scripts/vendor/**/*'])
|
||||||
.pipe(gulp.dest('dist/vendor'));
|
.pipe(gulp.dest('dist/vendor'));
|
||||||
});
|
}
|
||||||
|
|
||||||
require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig);
|
function karmaTask() {
|
||||||
|
|
||||||
gulp.task('karma', function() {
|
|
||||||
return karma.start({ configFile: __dirname + '/scripts/test/karma.conf.js' })
|
return karma.start({ configFile: __dirname + '/scripts/test/karma.conf.js' })
|
||||||
//return karma.start({ configFile: __dirname + '/karma.conf.js' })
|
}
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('karma-watch', function() {
|
function karmaWatchTask() {
|
||||||
return karma.start({ configFile: __dirname + '/scripts/test/karma-watch.conf.js' })
|
return karma.start({ configFile: __dirname + '/scripts/test/karma-watch.conf.js' })
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// snapshot tasks
|
||||||
|
require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig);
|
||||||
|
@ -14,16 +14,24 @@ module.exports = function(gulp, argv, buildConfig) {
|
|||||||
var protractorHttpServer;
|
var protractorHttpServer;
|
||||||
var snapshotValues = _.merge(snapshotConfig.platformDefauls, argv);
|
var snapshotValues = _.merge(snapshotConfig.platformDefauls, argv);
|
||||||
|
|
||||||
gulp.task('protractor-server', function() {
|
gulp.task('protractor-server', protractorServerTask);
|
||||||
|
gulp.task('snapshot-task', snapshotTask);
|
||||||
|
gulp.task('snapshot', gulp.series(
|
||||||
|
gulp.parallel('build', 'e2e', 'protractor-server'),
|
||||||
|
'snapshot-task'
|
||||||
|
));
|
||||||
|
|
||||||
|
function protractorServerTask(done) {
|
||||||
var app = connect().use(serveStatic(projectRoot)); // serve everything that is static
|
var app = connect().use(serveStatic(projectRoot)); // serve everything that is static
|
||||||
protractorHttpServer = http.createServer(app).listen(buildConfig.protractorPort);
|
protractorHttpServer = http.createServer(app).listen(buildConfig.protractorPort);
|
||||||
console.log('Serving `dist` on http://localhost:' + buildConfig.protractorPort);
|
console.log('Serving `dist` on http://localhost:' + buildConfig.protractorPort);
|
||||||
});
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
gulp.task('snapshot', ['e2e', 'protractor-server'], function(done) {
|
function snapshotTask(done) {
|
||||||
var protractorConfigFile = path.resolve(projectRoot, 'scripts/snapshot/protractor.config.js');
|
var protractorConfigFile = path.resolve(projectRoot, 'scripts/snapshot/protractor.config.js');
|
||||||
snapshot(done, protractorConfigFile);
|
snapshot(done, protractorConfigFile);
|
||||||
});
|
}
|
||||||
|
|
||||||
function snapshot(done, protractorConfigFile) {
|
function snapshot(done, protractorConfigFile) {
|
||||||
snapshotValues.params.test_id = uuid.v4().split('-')[0];
|
snapshotValues.params.test_id = uuid.v4().split('-')[0];
|
||||||
@ -41,12 +49,13 @@ module.exports = function(gulp, argv, buildConfig) {
|
|||||||
return _.template(argument, snapshotValues);
|
return _.template(argument, snapshotValues);
|
||||||
});
|
});
|
||||||
|
|
||||||
e2ePublish(snapshotValues.params.test_id);
|
// e2ePublish(snapshotValues.params.test_id);
|
||||||
|
|
||||||
return protractor(done, [protractorConfigFile].concat(protractorArgs));
|
return protractor(done, [protractorConfigFile].concat(protractorArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
function protractor(done, args) {
|
function protractor(done, args) {
|
||||||
|
debugger;
|
||||||
var child = cp.spawn('protractor', args, {
|
var child = cp.spawn('protractor', args, {
|
||||||
stdio: [process.stdin, process.stdout, 'pipe']
|
stdio: [process.stdin, process.stdout, 'pipe']
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user