Creating npm package for ts client
This commit is contained in:
parent
a0dae7cb0e
commit
cc7f835e1d
|
|
@ -40,3 +40,4 @@ site.min.css
|
|||
.idea/
|
||||
.vscode/
|
||||
signalr-client/
|
||||
dist/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!dist/**/*
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"name": "signalr-core",
|
||||
"version": "1.0.0",
|
||||
"name": "signalr-client",
|
||||
"version": "0.1.0-alpha",
|
||||
"description": "ASP.NET Core SignalR",
|
||||
"main": "index.js",
|
||||
"main": "dist/src/index.js",
|
||||
"typings": "dist/src/index.d.ts",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ gulp.task('browserify-client', ['compile-ts-client'], () => {
|
|||
return browserify(clientOutDir + '/HubConnection.js', {standalone: 'signalR'})
|
||||
.bundle()
|
||||
.pipe(source('signalr-client.js'))
|
||||
.pipe(gulp.dest(clientOutDir + '/../signalr-client-bundle'));
|
||||
.pipe(gulp.dest(clientOutDir + '/../browser'));
|
||||
});
|
||||
|
||||
gulp.task('build-ts-client', ['clean', 'compile-ts-client', 'browserify-client']);
|
||||
|
|
@ -32,7 +32,7 @@ gulp.task('bundle-client', ['build-ts-client'], () => {
|
|||
console.log('Use \'--bundleOutDir\' option to specify the target file for the bundled client.');
|
||||
}
|
||||
else {
|
||||
return gulp.src(clientOutDir + '/../signalr-client-bundle/signalr-client.js')
|
||||
return gulp.src(clientOutDir + '/../browser/signalr-client.js')
|
||||
.pipe(gulp.dest(argv.bundleOutDir));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
export * from "./Common"
|
||||
export * from "./Connection"
|
||||
export * from "./HttpClient"
|
||||
export * from "./HubConnection"
|
||||
export * from "./Transports"
|
||||
|
||||
|
|
@ -9,7 +9,8 @@
|
|||
"removeComments": false,
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"outDir": "../../artifacts/lib/signalr-client-modules"
|
||||
"outDir": "../../dist/src",
|
||||
"declaration": true
|
||||
},
|
||||
"include": [
|
||||
"./**/*",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spec_dir": "artifacts/test/Microsoft.AspNetCore.Client.SignalR.TS.Tests",
|
||||
"spec_dir": "dist/test",
|
||||
"spec_files": [
|
||||
"./**/*[sS]pec.js"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"removeComments": false,
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"outDir": "../../artifacts/test/Microsoft.AspNetCore.Client.SignalR.TS.Tests/"
|
||||
"outDir": "../../dist/test"
|
||||
},
|
||||
"include": [
|
||||
"./**/*",
|
||||
|
|
|
|||
Loading…
Reference in New Issue