• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript gulp.watch函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中gulp.watch函数的典型用法代码示例。如果您正苦于以下问题:TypeScript watch函数的具体用法?TypeScript watch怎么用?TypeScript watch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了watch函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: jade

    gulp.task(name, [Build.name], () => {
        const ts = [
            root.application.scripts.typescripts().toString(),
            root.application.scripts.typings().Not(),
//            `${Folders.clientUnitTests}/**/*.ts`,
//            `!${Folders.clientUnitTests}/typings/**/*`,
//            `!${Folders.clientUnitTests}/node_modules/**/*`,
//            `${Folders.gulp}/**/*.ts`,
//            `!${Folders.gulp}/typings/**/*.ts`,
//            `!${Folders.gulp}/node_modules/**/*`
        ];

        const jade = [
            root.application.jade().toString()
        ];

        gulp.watch(jade, jadeLint);
        gulp.watch(ts, tslint);
//        gulp.watch(ts, purge);
        gulp.watch(root.application.styles.files().toString(), [Css.name]);

//        const environmentFiles = [
//            root.application.environment.template().toString(),
//            root.packageJson().toString()
//        ];
//        gulp.watch(environmentFiles, [Environment.name]);
        gulp.watch(root.application. jade().toString(), [Jade.name]);
//        gulp.watch(root.application.jade().toString(), purge);
    });
开发者ID:ibzakharov,项目名称:angular_project_template,代码行数:29,代码来源:gulpfile.ts


示例2: function

gulp.task('autoTest', ['build-dev', 'templatecache', 'compile-specs'], function(done: () => any) {
    gulp.watch([config.sourceTs], ['build-dev'])
            .on('change', changeEvent);
     gulp.watch([config.sourceSpecs], ['compile-specs'])
            .on('change', changeEvent);
    startTests(false, done);
});
开发者ID:dcaballeroc,项目名称:unicron,代码行数:7,代码来源:gulpfileTypescript.ts


示例3: function

gulp.task('browserSync', function () {
    browserSync.init({
        port: 8000,
        proxy: "http://localhost:12345"
    });

	function debounce(fn, delay) {
	  var timer = null;
	  return function () {
		var context = this, args = arguments;
		clearTimeout(timer);
		timer = setTimeout(function () {
		  fn.apply(context, args);
		}, delay);
	  };
	}

    gulp.watch(["src/**/*.ts"], ['compile', 'reloadBrowserSync']).on('change', function (e) {
        console.log('TypeScript file ' + e.path + ' has been changed. Compiling.');
    });
    gulp.watch(["src/*js", "src/**/*.html", "src/**/*.css"], ['resources', 'reloadBrowserSync']).on('change', function (e) {
        console.log('Resource file ' + e.path + ' has been changed. Updating.');
    });
    gulp.watch('src/**/*.scss', ['sass', 'resources', 'reloadBrowserSync'], function(e){
        console.log('Sass file ' + e.path + ' has been changed. Updating.');
    });

});
开发者ID:benhallouk,项目名称:HCLC-Portal,代码行数:28,代码来源:gulpfile.ts


示例4: watch

function watch() {
	gulp.watch(paths.html, html);
	gulp.watch(paths.sass, styles);
	gulp.watch(paths.ts, compile);
	gulp.watch(paths.res, res);
	gulp.watch(paths.loader, loader);
}
开发者ID:bradtaylor707,项目名称:asphalt,代码行数:7,代码来源:gulpfile.ts


示例5: function

gulp.task('watch', function () {
    gulp.watch(["src/**/*.ts"]).on('change', function () {
    });
    gulp.watch(["src/**/*.html"]).on('change', function () {
    });
    gulp.watch('./src/app/styles/**/*.scss', ['sass']);
    gulp.watch('./src/app/images/**', ['images']);
});
开发者ID:canygt27,项目名称:angular2-scaffolding,代码行数:8,代码来源:gulpfile.ts


示例6: runSequence

gulp.task("watch", () => {
  gulp.watch(`${paths.coffee.watchSources}`, () => {
    runSequence("scripts:build")
  })
  gulp.watch(`${paths.less.watchSources}`, () => {
    runSequence("styles:build")
  })
})
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:8,代码来源:watch.ts


示例7: function

gulp.task('watch', function () {
    gulp.watch(["client/**/*.ts"], ['compile']).on('change', function (e) {
        console.log('TypeScript file ' + e.path + ' has been changed. Compiling.');
    });
    gulp.watch(["client/**/*.html", "client/**/*.css"], ['resources']).on('change', function (e) {
        console.log('Resource file ' + e.path + ' has been changed. Updating.');
    });
});
开发者ID:camphor-scent,项目名称:camphor,代码行数:8,代码来源:gulpfile.ts


示例8: function

gulp.task('watch', function () {
    gulp.watch(["frontend/**/*.ts", "backend/**/*.js" ], ['compile']).on('change', function (e) {
        console.log('Source file ' + e.path + ' has been changed. Compiling.');
    });
    gulp.watch(["frontend/**/*.html", "frontend/**/*.css", "frontend/*.js"], ['resources']).on('change', function (e) {
        console.log('Resource file ' + e.path + ' has been changed. Updating.');
    });
});
开发者ID:Gettor,项目名称:d20Site,代码行数:8,代码来源:gulpfile.ts


示例9: task

task(':watch:devapp', () => {
  watch(join(appDir, '**/*.ts'), [':build:devapp:ts', triggerLivereload]);
  watch(join(appDir, '**/*.scss'), [':build:devapp:scss', triggerLivereload]);
  watch(join(appDir, '**/*.html'), [':build:devapp:assets', triggerLivereload]);

  // The themes for the demo-app are built by the demo-app using the SCSS mixins from Material.
  // Therefore when the CSS files have been changed the SCSS mixins have been refreshed and
  // copied over. Rebuilt the theme CSS using the updated SCSS mixins.
  watch(join(materialOutPath, '**/*.css'), [':build:devapp:scss', triggerLivereload]);
});
开发者ID:jiw0220,项目名称:jigsaw,代码行数:10,代码来源:development.ts


示例10: function

  return function(done) {
    gulp.watch(project.transpiler.source, refreshCb).on('change', onChangeCb);
    gulp.watch(project.markupProcessor.source, refreshCb).on('change', onChangeCb);
    gulp.watch(project.cssProcessor.source, refreshCb).on('change', onChangeCb);

    //see if there are static files to be watched
    if (typeof project.build.copyFiles === 'object') {
      const files = Object.keys(project.build.copyFiles);
      gulp.watch(files, refreshCb).on('change', onChangeCb);
    }
  };
开发者ID:dwarry,项目名称:AspNetCoreWithAurelia,代码行数:11,代码来源:run.ts



注:本文中的gulp.watch函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript gulp-atom-electron.default函数代码示例发布时间:2022-05-25
下一篇:
TypeScript gulp.tree函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap