Skip to content

Commit b64064a

Browse files
committed
Merge branch typestack:master into master
2 parents f77dee3 + b5fcec2 commit b64064a

File tree

10 files changed

+246
-3601
lines changed

10 files changed

+246
-3601
lines changed

.gitignore

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
1-
build/
2-
node_modules/
3-
coverage/
4-
npm-debug.log
1+
# Logs
2+
logs
3+
*.log
4+
*.tmp
5+
*.tmp.*
6+
log.txt
7+
npm-debug.log*
8+
9+
# Testing
10+
lib-cov
11+
coverage
12+
13+
# Environment files
14+
.env
15+
16+
# Dependency directories
17+
node_modules
18+
19+
# MacOS related files
20+
*.DS_Store
21+
.AppleDouble
22+
.LSOverride
23+
._*
24+
UserInterfaceState.xcuserstate
25+
26+
# Windows related files
27+
Thumbs.db
28+
Desktop.ini
29+
$RECYCLE.BIN/
30+
31+
# Editors
32+
.idea
33+
.vscode
34+
*.sublime-project
35+
*.sublime-workspace
36+
.project
37+
.classpath
38+
.c9/
39+
*.launch
40+
.settings/
41+
42+
# IDE - VSCode
43+
.vscode/*
44+
!.vscode/tasks.json
45+
!.vscode/launch.json
46+
47+
# compiled output
48+
dist
49+
build
50+
tmp
51+
out-tsc

.travis.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
language: node_js
22
node_js:
33
- stable
4-
- 6
5-
- 5
6-
- 4
7-
#- 0.12
8-
#- 0.11
9-
10-
before_script:
11-
- typings install
12-
13-
after_success:
14-
- bash <(curl -s https://codecov.io/bash)
4+
- lts/*

README.md

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,30 @@
11
# socket-controllers
22

3-
[![Build Status](https://travis-ci.org/pleerock/socket-controllers.svg?branch=master)](https://travis-ci.org/pleerock/socket-controllers)
4-
[![codecov](https://codecov.io/gh/pleerock/socket-controllers/branch/master/graph/badge.svg)](https://codecov.io/gh/pleerock/socket-controllers)
3+
[![Build Status](https://travis-ci.com/typestack/socket-controllers.svg?branch=master)](https://travis-ci.com/typestack/socket-controllers)
54
[![npm version](https://badge.fury.io/js/socket-controllers.svg)](https://badge.fury.io/js/socket-controllers)
6-
[![Dependency Status](https://david-dm.org/pleerock/socket-controllers.svg)](https://david-dm.org/pleerock/socket-controllers)
7-
[![devDependency Status](https://david-dm.org/pleerock/socket-controllers/dev-status.svg)](https://david-dm.org/pleerock/socket-controllers#info=devDependencies)
8-
[![Join the chat at https://gitter.im/pleerock/socket-controllers](https://badges.gitter.im/pleerock/socket-controllers.svg)](https://gitter.im/pleerock/socket-controllers?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
95

10-
Use class-based controllers to handle websocket events.
11-
Helps to organize your code using websockets in classes.
6+
Use class-based controllers to handle websocket events. Helps to organize your code using websockets in classes.
127

138
## Installation
149

15-
1. Install module:
10+
1. Install `socket-controllers`:
1611

17-
`npm install socket-controllers --save`
12+
```
13+
npm install socket-controllers
14+
```
1815
19-
2. `reflect-metadata` shim is required:
16+
2. Install `reflect-metadata` shim:
2017
21-
`npm install reflect-metadata --save`
18+
```
19+
npm install reflect-metadata
20+
```
2221
2322
and make sure to import it in a global place, like app.ts:
2423
2524
```typescript
2625
import "reflect-metadata";
2726
```
28-
29-
3. ES6 features are used, if you are using old version of node.js you may need to install
30-
[es6-shim](https://github.com/paulmillr/es6-shim):
31-
32-
`npm install es6-shim --save`
33-
34-
and import it in a global place like app.ts:
35-
36-
```typescript
37-
import "es6-shim";
38-
```
39-
40-
4. Optionally you can install socket.io [typings](https://github.com/typings/typings):
41-
42-
`typings install dt~socket.io --save --global`
43-
44-
27+
4528
## Example of usage
4629
4730
1. Create a file `MessageController.ts`
@@ -84,7 +67,7 @@ Helps to organize your code using websockets in classes.
8467
createSocketServer(3001);
8568
```
8669
87-
3. Now you can send `save` websocket message using webosocket-client.
70+
3. Now you can send `save` websocket message using websocket-client.
8871
8972
## More usage examples
9073

codecov.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

gulpfile.ts

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@ const gulp = require("gulp");
44
const del = require("del");
55
const shell = require("gulp-shell");
66
const replace = require("gulp-replace");
7-
const mocha = require("gulp-mocha");
8-
const chai = require("chai");
97
const tslint = require("gulp-tslint");
108
const stylish = require("tslint-stylish");
119
const ts = require("gulp-typescript");
1210
const sourcemaps = require("gulp-sourcemaps");
13-
const istanbul = require("gulp-istanbul");
14-
const remapIstanbul = require("remap-istanbul/lib/gulpRemapIstanbul");
15-
1611
@Gulpclass()
1712
export class Gulpfile {
1813

@@ -118,6 +113,7 @@ export class Gulpfile {
118113
@SequenceTask()
119114
package() {
120115
return [
116+
"tslint",
121117
"clean",
122118
"packageCompile",
123119
"packageMoveCompiledFiles",
@@ -152,42 +148,4 @@ export class Gulpfile {
152148
}));
153149
}
154150

155-
/**
156-
* Runs before test coverage, required step to perform a test coverage.
157-
*/
158-
@Task()
159-
coveragePre() {
160-
return gulp.src(["./build/compiled/src/**/*.js"])
161-
.pipe(istanbul())
162-
.pipe(istanbul.hookRequire());
163-
}
164-
165-
/**
166-
* Runs post coverage operations.
167-
*/
168-
@Task("coveragePost", ["coveragePre"])
169-
coveragePost() {
170-
chai.should();
171-
chai.use(require("sinon-chai"));
172-
chai.use(require("chai-as-promised"));
173-
174-
return gulp.src(["./build/compiled/test/functional/**/*.js"])
175-
.pipe(mocha())
176-
.pipe(istanbul.writeReports());
177-
}
178-
179-
@Task()
180-
coverageRemap() {
181-
return gulp.src("./coverage/coverage-final.json")
182-
.pipe(remapIstanbul())
183-
.pipe(gulp.dest("./coverage"));
184-
}
185-
186-
/**
187-
* Compiles the code and runs tests.
188-
*/
189-
@SequenceTask()
190-
tests() {
191-
return ["compile", "coveragePost", "coverageRemap", "tslint"];
192-
}
193151
}

0 commit comments

Comments
 (0)