Exemple #1
0
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');
}
Exemple #2
0
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');
}
Exemple #3
0
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');
}
Exemple #4
0
 function (file) {
   console.log('start e2e.resources - ' + JSON.stringify(file.history, null, 2));
   start('e2e.copyAndCompile');
 });
Exemple #5
0
 () => {
   gulp.start('js');
 });
Exemple #6
0
 () => {
   gulp.start('files');
 });
Exemple #7
0
 watch('src/**/*.scss', function () {
   start('e2e.sass');
 });
Exemple #8
0
 () => {
   gulp.start('ts');
 });
 watch({name: 'templates', emitOnGlob: false, glob: ['./app/**/*.html', '!./app/index.html']}, () => {
   gulp.start('templates');
 });
Exemple #10
0
 function (file) {
   if (file.event !== 'unlink') {
     start(task);
   }
 }