Skip to content

Commit 6a242f1

Browse files
committed
feat(core): support socket.io!
Example: *socketIO="let socket of 'https://...'" *socketIOOn="let event on 'event' from socket"
1 parent 6f00d00 commit 6a242f1

27 files changed

Lines changed: 726 additions & 77 deletions

angular.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,46 @@
170170
}
171171
}
172172
}
173+
},
174+
"socketio": {
175+
"root": "projects/socketio",
176+
"sourceRoot": "projects/socketio/src",
177+
"projectType": "library",
178+
"prefix": "lib",
179+
"architect": {
180+
"build": {
181+
"builder": "@angular-devkit/build-ng-packagr:build",
182+
"options": {
183+
"tsConfig": "projects/socketio/tsconfig.lib.json",
184+
"project": "projects/socketio/ng-package.json"
185+
},
186+
"configurations": {
187+
"production": {
188+
"project": "projects/socketio/ng-package.prod.json"
189+
}
190+
}
191+
},
192+
"test": {
193+
"builder": "@angular-devkit/build-angular:karma",
194+
"options": {
195+
"main": "projects/socketio/src/test.ts",
196+
"tsConfig": "projects/socketio/tsconfig.spec.json",
197+
"karmaConfig": "projects/socketio/karma.conf.js"
198+
}
199+
},
200+
"lint": {
201+
"builder": "@angular-devkit/build-angular:tslint",
202+
"options": {
203+
"tsConfig": [
204+
"projects/socketio/tsconfig.lib.json",
205+
"projects/socketio/tsconfig.spec.json"
206+
],
207+
"exclude": [
208+
"**/node_modules/**"
209+
]
210+
}
211+
}
212+
}
173213
}
174214
},
175215
"defaultProject": "ngxf"

package-lock.json

Lines changed: 25 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"core-js": "^2.5.4",
2828
"hammerjs": "^2.0.8",
2929
"rxjs": "6.3.3",
30+
"socket.io-client": "^2.1.1",
3031
"zone.js": "~0.8.26"
3132
},
3233
"devDependencies": {
@@ -39,6 +40,7 @@
3940
"@types/jasmine": "~2.8.8",
4041
"@types/jasminewd2": "~2.0.3",
4142
"@types/node": "~8.9.4",
43+
"@types/socket.io-client": "^1.4.32",
4244
"codelyzer": "~4.3.0",
4345
"cz-customizable": "^5.2.0",
4446
"jasmine-core": "~2.99.1",

projects/socketio/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<p align="center">
2+
<img src="https://github.com/ngxf/platform/raw/master/assets/logo.png" width="500px">
3+
<br />
4+
NGXF is a non-state management pattern + library for Angular
5+
<br />
6+
<br />
7+
<a href="https://badge.fury.io/js/%40ngxf%2Fplatform"><img src="https://badge.fury.io/js/%40ngxf%2Fplatform.svg"></a>
8+
</p>
9+
10+
## :interrobang: What is NGXF?
11+
NGXF is a non-state management pattern + library for Angular. It acts as a multiple source of
12+
truth for your application's state, providing simple rules for predictable state mutations.
13+
14+
NGXF is modeled after the CQRS pattern popularly implemented in libraries like Redux, NGRX and NGXS
15+
but reduces boilerplate by using modern HTML features such as templates and directives.
16+
17+
## 👋 New to NGXF?
18+
If you're just getting started with NGXF, I recommend you head over to the [concepts](https://ngxf.gitbook.io/platform/concepts/introduction).
19+
20+
## ❓ Need Help?
21+
For questions, please ask them on Stack Overflow with the `ngxf` tag:
22+
https://stackoverflow.com/questions/ask?tags=ngxf
23+
24+
To chat with other users and contributers join us on Telegram: https://t.me/ngSoviet
25+
26+
If you think there is a bug in this library, you can open an issue on GitHub (https://github.com/ngxf/platform/issues/new). If possible a link to a http://stackblitz.com (or github) repo with a repro or a failing test would be great.
27+
28+
## ❤️ Giving Back
29+
Become a [Contributor](https://ngxf.gitbook.io/platform/community/contributing).
30+

0 commit comments

Comments
 (0)