Visual studio 2015 在VS2015任务运行器资源管理器中运行gulp文件失败

Visual studio 2015 在VS2015任务运行器资源管理器中运行gulp文件失败,visual-studio-2015,gulp,Visual Studio 2015,Gulp,我正在跟随Chris Sakell的教程,以期在AngularJs 2上进行水疗 按照指示,我在根目录中创建了gulp文件-gulp.js,在webroot目录中创建了tsconfig.json文件 我安装了npm和gulp,因为这是初始过程的一部分 我的想法是在wwwroot文件夹下创建和填充目录,包括“lib”和“app” 我尝试在VS2015中使用Task Runner Explorer来运行此任务,特别是单击左侧的“build spa”,我得到: :\Users\simon\SP

我正在跟随Chris Sakell的教程,以期在AngularJs 2上进行水疗

按照指示,我在根目录中创建了gulp文件-gulp.js,在webroot目录中创建了tsconfig.json文件

我安装了npm和gulp,因为这是初始过程的一部分

我的想法是在wwwroot文件夹下创建和填充目录,包括“lib”和“app”

我尝试在VS2015中使用Task Runner Explorer来运行此任务,特别是单击左侧的“build spa”,我得到:

    :\Users\simon\SPA\CHASAKELL-SCRATCH\PhotoGallery\src\PhotoGallery\Gulpfile.js" build-spa
[14:27:12] Using gulpfile ~\SPA\CHASAKELL-SCRATCH\PhotoGallery\src\PhotoGallery\Gulpfile.js
[14:27:12] Starting 'setup-vendors'...
[14:27:12] Starting 'compile-typescript'...
[14:27:12] Finished 'compile-typescript' after 20 ms
Process terminated with code 0.
wwroot下未创建任何文件,并且似乎未创建任何内容。这些文件有什么问题?或者,在VS2015中成功运行gulp.js文件的过程中,是否有我没有做的事情

编辑:好的,所以我从命令窗口运行了“gulp build spa”,它成功了。。。那么为什么它在VS2015中不起作用呢

tsconfig.json文件如下所示:

{
"compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "commonjs",
    "moduleResolution": "node",
    "noEmitOnError": false,
    "noImplicitAny": false,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5"
},
"exclude": [
    "node_modules/**/*.d.ts",
    "wwwroot",
    "typings/main",
    "typings/main.d.ts"
]
}
gulp.js文件是:

        var gulp = require('gulp'),
        ts = require('gulp-typescript'),
        merge = require('merge'),
        fs = require("fs"),
        del = require('del'),
        path = require('path');

    eval("var project = " + fs.readFileSync("./project.json"));
    var lib = "./" + project.webroot + "/lib/";

    var paths = {
        npm: './node_modules/',
        tsSource: './wwwroot/app/**/*.ts',
        tsOutput: lib + 'spa/',
        tsDef: lib + 'definitions/',
        jsVendors: lib + 'js',
        jsRxJSVendors: lib + 'js/rxjs',
        cssVendors: lib + 'css',
        imgVendors: lib + 'img',
        fontsVendors: lib + 'fonts'
    };


    var tsProject = ts.createProject('./wwwroot/tsconfig.json');

    gulp.task('setup-vendors', function (done) {
        gulp.src([
          'node_modules/jquery/dist/jquery.*js',
          'bower_components/bootstrap/dist/js/bootstrap*.js',
          'node_modules/fancybox/dist/js/jquery.fancybox.pack.js',
          'bower_components/alertify.js/lib/alertify.min.js',
          'systemjs.config.js'
        ]).pipe(gulp.dest(paths.jsVendors));

        gulp.src([
          'bower_components/bootstrap/dist/css/bootstrap.css',
          'node_modules/fancybox/dist/css/jquery.fancybox.css',
          'bower_components/components-font-awesome/css/font-awesome.css',
          'bower_components/alertify.js/themes/alertify.core.css',
          'bower_components/alertify.js/themes/alertify.bootstrap.css',
          'bower_components/alertify.js/themes/alertify.default.css'
        ]).pipe(gulp.dest(paths.cssVendors));

        gulp.src([
          'node_modules/fancybox/dist/img/blank.gif',
          'node_modules/fancybox/dist/img/fancybox_loading.gif',
          'node_modules/fancybox/dist/img/fancybox_loading@2x.gif',
          'node_modules/fancybox/dist/img/fancybox_overlay.png',
          'node_modules/fancybox/dist/img/fancybox_sprite.png',
          'node_modules/fancybox/dist/img/fancybox_sprite@2x.png'
        ]).pipe(gulp.dest(paths.imgVendors));

        gulp.src([
          'node_modules/bootstrap/fonts/glyphicons-halflings-regular.eot',
          'node_modules/bootstrap/fonts/glyphicons-halflings-regular.svg',
          'node_modules/bootstrap/fonts/glyphicons-halflings-regular.ttf',
          'node_modules/bootstrap/fonts/glyphicons-halflings-regular.woff',
          'node_modules/bootstrap/fonts/glyphicons-halflings-regular.woff2',
          'bower_components/components-font-awesome/fonts/FontAwesome.otf',
          'bower_components/components-font-awesome/fonts/fontawesome-webfont.eot',
          'bower_components/components-font-awesome/fonts/fontawesome-webfont.svg',
          'bower_components/components-font-awesome/fonts/fontawesome-webfont.ttf',
          'bower_components/components-font-awesome/fonts/fontawesome-webfont.woff',
          'bower_components/components-font-awesome/fonts/fontawesome-webfont.woff2',
        ]).pipe(gulp.dest(paths.fontsVendors));
    });

    gulp.task('compile-typescript', function (done) {
        var tsResult = gulp.src([
           "wwwroot/app/**/*.ts"
        ])
         .pipe(ts(tsProject), undefined, ts.reporter.fullReporter());
        return tsResult.js.pipe(gulp.dest(paths.tsOutput));
    });

    gulp.task('watch.ts', ['compile-typescript'], function () {
        return gulp.watch('wwwroot/app/**/*.ts', ['compile-typescript']);
    });

    gulp.task('watch', ['watch.ts']);

    gulp.task('clean-lib', function () {
        return del([lib]);
    });

    gulp.task('build-spa', ['setup-vendors', 'compile-typescript']);