function e2eWatch(componentName: string, componentTest: string) { // If any tests change within components then run e2e.resources. watch([ 'src/components/*/test/**/*' ], function (file) { console.log('start e2e.resources - ' + JSON.stringify(file.history, null, 2)); start('e2e.copyAndCompile'); }); // If any src files change except for tests then transpile only the source ionic files watch([ 'src/**/*.ts', '!src/components/*/test/**/*', '!src/util/test/*' ], function (file) { console.log('start e2e.ngcSource - ' + JSON.stringify(file.history, null, 2)); start('e2e.copyAndCompile'); }); // If any scss files change then recompile all sass watch(['src/**/*.scss'], (file) => { console.log('start sass - ' + JSON.stringify(file.history, null, 2)); start('e2e.sass'); }); console.log(`http://localhost:${LOCAL_SERVER_PORT}/${DIST_NAME}/${E2E_NAME}/components/${componentName}/test/${componentTest}/`); start('e2e.serve'); }
function watchTask(task) { watch([ 'src/**/*.ts', '!src/components/*/test/**/*', '!src/util/test/*' ], function (file) { if (file.event !== 'unlink') { start(task); } } ); watch('src/**/*.scss', function () { start('e2e.sass'); }); start('e2e.serve'); }
function demosWatch(componentName: string, componentTest: string) { // If any tests change within components then run demos.resources. watch([ 'demos/src/**/*' ], function (file) { console.log('start demos.resources - ' + JSON.stringify(file.history, null, 2)); start('demos.copyAndCompile'); }); // If any src files change except for tests then transpile only the source ionic files watch([ 'src/**/*.ts', '!src/components/*/test/**/*', '!src/util/test/*' ], function (file) { console.log('start demos.ngcSource - ' + JSON.stringify(file.history, null, 2)); start('demos.copyAndCompile'); }); // If any scss files change then recompile all sass watch(['src/**/*.scss'], (file) => { console.log('start sass - ' + JSON.stringify(file.history, null, 2)); start('demos.sass'); }); let serverUrl = `http://localhost:${LOCAL_SERVER_PORT}/${DIST_NAME}/${DEMOS_NAME}`; if (componentName) { serverUrl += `/${componentName}`; } console.log(serverUrl); start('demos.serve'); }
function (file) { console.log('start e2e.resources - ' + JSON.stringify(file.history, null, 2)); start('e2e.copyAndCompile'); });
() => { gulp.start('js'); });
() => { gulp.start('files'); });
watch('src/**/*.scss', function () { start('e2e.sass'); });
() => { gulp.start('ts'); });
watch({name: 'templates', emitOnGlob: false, glob: ['./app/**/*.html', '!./app/index.html']}, () => { gulp.start('templates'); });
function (file) { if (file.event !== 'unlink') { start(task); } }