Конфигурация задачи Grunt TS - файлы не найдены

Я пытаюсь включить компиляцию TS в мой проект. Это мой tsconfig.json:

{
  "compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "system",
    "moduleResolution": "node",
    "noImplicitAny": false,
    "outDir": "build/develop/assets/scripts",
    "removeComments": false,
    "rootDir": "assets/management/",
    "sourceMap": false,
    "target": "ES5"
  },
  "exclude": [
    "node_modules"
  ]
}

И это мой файл tasks/config/ts.js:

/**
 * Compile TS files to JS.
 *
 * @see https://github.com/TypeStrong/grunt-ts
 */
module.exports = function (grunt) {
    grunt.config.set('ts', {
        angular_app_dev: {
            default: {
                // src: [
                //     "assets/management/**/*.ts",
                //     "!node_modules/**/*.ts" // Avoid compiling TypeScript files in node_modules
                // ],
                // outDir: "assets/vili2",
                tsconfig: {
                    tsconfig: true,
                    ignoreFiles: false,
                    ignoreSettings: false,
                    overwriteFilesGlob: false,
                    updateFiles: true,
                    passThrough: false
                }
                // options: {
                //     module: 'commonjs',
                //     // To compile TypeScript using external modules like NodeJS
                //     fast: 'never'
                //     // You'll need to recompile all the files each time for NodeJS
                // }
            }

        }
    });

    grunt.loadNpmTasks('grunt-ts');
};

Я пытаюсь сделать так, чтобы он компилировал файлы TS (позже я хочу добавить часы, чтобы они компилировали их каждый раз, когда я их изменял, но по одной вещи за раз)

Когда я запускаю "tsc" из командной строки, он работает отлично, однако, если я запускаю

grunt ts:angular_app_dev -verbose

это производит это:

$ grunt ts:angular_app_dev -verbose
Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.

Registering "grunt-contrib-clean" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-clean\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-clean\package.json...OK
Loading "clean.js" tasks...OK
+ clean

Registering "grunt-contrib-coffee" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-coffee\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-coffee\package.json...OK
Loading "coffee.js" tasks...OK
+ coffee

Registering "grunt-contrib-concat" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-concat\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-concat\package.json...OK
Loading "concat.js" tasks...OK
+ concat

Registering "grunt-contrib-copy" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-copy\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-copy\package.json...OK
Loading "copy.js" tasks...OK
+ copy

Registering "grunt-contrib-cssmin" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-cssmin\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-cssmin\package.json...OK
Loading "cssmin.js" tasks...OK
+ cssmin

Registering "grunt-contrib-jst" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-jst\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-jst\package.json...OK
Loading "jst.js" tasks...OK
+ jst

Registering "grunt-contrib-less" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-less\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-less\package.json...OK
Loading "less.js" tasks...OK
+ less

Registering "grunt-sails-linker" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-sails-linker\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-sails-linker\package.json...OK
Loading "scriptlinker.js" tasks...OK
+ sails-linker

Registering "grunt-sync" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-sync\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-sync\package.json...OK
Loading "sync.js" tasks...OK
+ sync

Registering "grunt-ts" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-ts\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-ts\package.json...OK
Loading "ts.js" tasks...OK
+ ts

Registering "grunt-contrib-uglify" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-uglify\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-uglify\package.json...OK
Loading "uglify.js" tasks...OK
+ uglify

Registering "grunt-contrib-watch" local Npm module tasks.
Reading D:\Work\...\...\node_modules\grunt-contrib-watch\package.json...OK
Parsing D:\Work\...\...\node_modules\grunt-contrib-watch\package.json...OK
Loading "watch.js" tasks...OK
+ watch
Loading "Gruntfile.js" tasks...OK
+ build, buildProd, compileAssets, db:migrate, default, linkAssets, linkAssetsBuild, linkAssetsBuildProd, prod, prodTest, syncAssets

Running tasks: ts:angular_app_dev

Running "ts:angular_app_dev" (ts) task
Verifying property ts.angular_app_dev exists in config...OK
File: [no files]

Done, without errors.

Что мне не хватает???

1 ответ

Вы ничего не пропускаете. Как говорится внизу, "Готово, без ошибок". Снимите свой флаг -verbose, чтобы получить меньше информации о компиляции grunt:)

хрюкать ts:angular_app_dev должно быть достаточно хорошим

Другие вопросы по тегам