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