【问题标题】:How can I specify all typescript files inside a folder as a source for grunt?如何将文件夹中的所有打字稿文件指定为 grunt 的来源?
【发布时间】:2014-12-17 19:10:17
【问题描述】:

我正在尝试运行这个 gruntfile:

module.exports = function (grunt) {
    grunt.initConfig({
        typescript: {
            base: {
                src: ['/app/*.ts'],
                dest: 'wwwroot/app.js',
                options: {
                    module: 'amd',
                    target: 'es5'
                }
            }
        }
    });
    grunt.loadNpmTasks("grunt-typescript");
};

这适用于 /app/*.ts 中的文件,但我怎样才能让它运行每个 .ts 文件(包括 /app 下的子目录中的文件)?

【问题讨论】:

    标签: javascript angularjs gruntjs typescript


    【解决方案1】:

    应该这样做:

    src: ['/app/**/*.ts'],
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-07
      • 1970-01-01
      • 1970-01-01
      • 2011-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-27
      相关资源
      最近更新 更多