From 72568acff06e4ecb9755c19f6c717e69148512d8 Mon Sep 17 00:00:00 2001 From: Pawel Kadluczka Date: Tue, 12 Sep 2017 21:35:37 -0700 Subject: [PATCH] Appending version to browser javascript file names --- .../Microsoft.AspNetCore.SignalR.Client.TS.csproj | 2 +- .../Microsoft.AspNetCore.SignalR.Client.TS/gulpfile.js | 9 +++++---- samples/ChatSample/ChatSample.csproj | 2 +- samples/ChatSample/Views/Home/Index.cshtml | 2 +- samples/SocketsSample/wwwroot/hubs.html | 8 ++++---- samples/SocketsSample/wwwroot/sockets.html | 4 ++-- samples/SocketsSample/wwwroot/streaming.html | 8 ++++---- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Microsoft.AspNetCore.SignalR.Client.TS.csproj b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Microsoft.AspNetCore.SignalR.Client.TS.csproj index c74f7812ec..3517310977 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Microsoft.AspNetCore.SignalR.Client.TS.csproj +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/Microsoft.AspNetCore.SignalR.Client.TS.csproj @@ -13,7 +13,7 @@ - + diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/gulpfile.js b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/gulpfile.js index 81905f3a2a..587a7b4923 100644 --- a/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/gulpfile.js +++ b/client-ts/Microsoft.AspNetCore.SignalR.Client.TS/gulpfile.js @@ -10,6 +10,7 @@ const babel = require('gulp-babel'); const tsProject = ts.createProject('./tsconfig.json'); const clientOutDir = tsProject.options.outDir; const browserOutDir = clientOutDir + '/../browser/'; +const versionSuffix = '1.0.0-alpha1'; gulp.task('clean', () => { return del([clientOutDir + '/..'], { force: true }); @@ -52,19 +53,19 @@ function browserifyModuleES5(sourceFileName, namespace, targetFileName, hasAsync } gulp.task('browserify-client', ['compile-ts-client'], () => { - return browserifyModule('HubConnection.js', 'signalR', 'signalr-client.js'); + return browserifyModule('HubConnection.js', 'signalR', `signalr-client-${versionSuffix}.js`); }); gulp.task('browserify-msgpackprotocol', ['compile-ts-client'], () => { - return browserifyModule('MessagePackHubProtocol.js', 'signalRMsgPack', 'signalr-msgpackprotocol.js'); + return browserifyModule('MessagePackHubProtocol.js', 'signalRMsgPack', `signalr-msgpackprotocol-${versionSuffix}.js`); }); gulp.task('browserify-clientES5', ['compile-ts-client'], () => { - return browserifyModuleES5('HubConnection.js', 'signalR', 'signalr-clientES5.js', /*hasAsync*/ true); + return browserifyModuleES5('HubConnection.js', 'signalR', `signalr-clientES5-${versionSuffix}.js`, /*hasAsync*/ true); }); gulp.task('browserify-msgpackprotocolES5', ['compile-ts-client'], () => { - return browserifyModuleES5('MessagePackHubProtocol.js', 'signalRMsgPack', 'signalr-msgpackprotocolES5.js', /*hasAsync*/ false); + return browserifyModuleES5('MessagePackHubProtocol.js', 'signalRMsgPack', `signalr-msgpackprotocolES5-${versionSuffix}.js`, /*hasAsync*/ false); }); gulp.task('browserify', [ 'browserify-client', 'browserify-msgpackprotocol', 'browserify-clientES5', 'browserify-msgpackprotocolES5']); diff --git a/samples/ChatSample/ChatSample.csproj b/samples/ChatSample/ChatSample.csproj index e959e7e36e..2c8d863f19 100644 --- a/samples/ChatSample/ChatSample.csproj +++ b/samples/ChatSample/ChatSample.csproj @@ -40,7 +40,7 @@ - + diff --git a/samples/ChatSample/Views/Home/Index.cshtml b/samples/ChatSample/Views/Home/Index.cshtml index 52676f6d50..7ae555f797 100644 --- a/samples/ChatSample/Views/Home/Index.cshtml +++ b/samples/ChatSample/Views/Home/Index.cshtml @@ -14,7 +14,7 @@ - + diff --git a/samples/SocketsSample/wwwroot/sockets.html b/samples/SocketsSample/wwwroot/sockets.html index eedc287e7b..0d5f5bd125 100644 --- a/samples/SocketsSample/wwwroot/sockets.html +++ b/samples/SocketsSample/wwwroot/sockets.html @@ -16,11 +16,11 @@ diff --git a/samples/SocketsSample/wwwroot/streaming.html b/samples/SocketsSample/wwwroot/streaming.html index 213245f1bc..39c1305112 100644 --- a/samples/SocketsSample/wwwroot/streaming.html +++ b/samples/SocketsSample/wwwroot/streaming.html @@ -27,14 +27,14 @@ if (typeof Promise === 'undefined') { document.write( - '