0
gulpを使用してgulp-msbuildを使用してWebプロジェクトを構築しています。しかし、私は正しいフォルダに公開するために異なるビルドパラメータを持つ必要がある複数のWebプロジェクトがあります。ここで次のタスクにパイプする前のsrcパラメータへのアクセス
は私gulpfile.jsの一部です:
gulp.task('publish', function() {
var webProjectsPaths = [
'/Project1/Project1.csproj'
'/Project2/Project2.csproj'
];
return gulp
.src(webProjectsPaths)
.pipe(msbuild({
targets: ['WebPublish'],
toolsVersion: 14.0,
errorOnFail: true,
stdout: true,
properties: {
Configuration: 'Debug',
WebPublishMethod: 'FileSystem',
DeleteExistingFiles: true,
PublishUrl: 'Publish/##csproj file name without the extension##'
},
}));
});
私はPublishUrl
ダイナミック(##csproj file name without the extension##
を参照)を作ることができるようにmsbuild
タスクに送信する前.src
に渡される各パスにアクセスしたいです。