Files
Brandy Carney d93070a7d5 chore(gulp): update e2e and snapshot (#8846)
* chore(e2e): add livereload server and clean task for e2e

* chore(e2e): refactor to use gulp connect and open

* chore(e2e): WIP remove open, add formatting, add reload task

* wip(e2e): use SystemJS for faster dev e2e rebuilds

* chore(e2e): wip removing old gulp file, old e2e task

update template for e2e and port number

* chore(e2e): wip add SystemJS for dev build of e2e, use those tasks instead

* chore(e2e): uncomment out range components

* chore(e2e): wip fix paths for the e2e tempate

* chore(scripts): update README back to the old way

* chore(e2e): code cleanup

* chore(e2e): split tasks into dev and prod, put common tasks in e2e

* chore(e2e): rename e2e templates and add to readme

* chore(e2e): fix dev build so it will work with snapshot

* chore(snapshot): get snapshot working with dev and prod builds
2016-10-21 23:59:20 +02:00

56 lines
1.3 KiB
TypeScript

import { dest, src, task } from 'gulp';
import * as connect from 'gulp-connect';
import * as del from 'del';
import * as runSequence from 'run-sequence';
import { DIST_E2E_ROOT, LOCAL_SERVER_PORT, SCRIPTS_ROOT } from '../constants';
import { compileSass, copyFonts, createTimestamp, setSassIonicVersion, writePolyfills } from '../util';
task('e2e.clean', (done: Function) => {
del(['dist/e2e/**']).then(() => {
done();
}).catch(err => {
done(err);
});
});
task('e2e.polyfill', (done: Function) => {
writePolyfills('dist/e2e/polyfills').then(() => {
done();
}).catch(err => {
done(err);
});
});
task('e2e.copyAndCompile', (done: (err: any) => void) => {
runSequence(
'e2e.copySource',
'e2e.compileTests',
'e2e.bundle',
done);
});
task('e2e.copyExternalDependencies', () => {
src([`${SCRIPTS_ROOT}/e2e/*.css`]).pipe(dest(`${DIST_E2E_ROOT}/css`));
});
task('e2e.sass', () => {
// ensure there is a version.scss file
setSassIonicVersion(`E2E-${createTimestamp()}`);
return compileSass(`${DIST_E2E_ROOT}/css`);
});
task('e2e.fonts', () => {
return copyFonts(`${DIST_E2E_ROOT}/fonts`);
});
task('e2e.serve', function() {
connect.server({
root: './',
port: LOCAL_SERVER_PORT,
livereload: {
port: 35700
}
});
});