Skip to content

Commit 98e183d

Browse files
committed
docs(esdoc): add playground environment in ESDoc-generated page
Add Rx.umd.js script to the ESDoc-generated page, so RxJS can be experimented in the DevTools. Also add a welcome message in the console, and a hint text in index.md.
1 parent d5f1bcd commit 98e183d

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

doc/asset/devtools-welcome.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var welcomeText = (
2+
' ____ _ ____ \n'+
3+
'| _ \\ __ __ | / ___| \n'+
4+
'| |_) |\\ \\/ / | \\___ \\ \n'+
5+
'| _ < > < |_| |___) | \n'+
6+
'|_| \\_\\/_/\\_\\___/|____/ \n'+
7+
'\nTry this code to get started experimenting with RxJS:\n'+
8+
'\n var subscription = Rx.Observable.interval(500)'+
9+
'.take(4).subscribe(function (x) { console.log(x) });\n'
10+
);
11+
if (console.info) {
12+
console.info(welcomeText);
13+
} else {
14+
console.log(welcomeText);
15+
}

doc/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Exte
1010
*Read the Manual on Observables, Observer, Subject, etc*
1111
### [» Full reference](./identifiers.html)
1212
*Read detailed documentation on each operator*
13+
14+
**Hint: open your DevTools to experiment with RxJS.**

esdoc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"undocumentIdentifier": false,
55
"title": "RxJS",
66
"styles": ["./doc/styles/main.css"],
7+
"scripts": [
8+
"./dist/global/Rx.umd.min.js",
9+
"./doc/asset/devtools-welcome.js"
10+
],
711
"index": "./doc/index.md",
812
"plugins": [
913
{"name": "./tools/custom-esdoc-plugin.js"}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"build_perf": "npm run build_cjs && npm run build_global && webdriver-manager update && npm run perf",
2323
"build_test": "rm -rf dist/ && npm run lint && npm run build_cjs && npm run test_buildonly && npm run test_nobuild",
2424
"build_cover": "rm -rf dist/ && npm run lint && npm run build_cjs && npm run test_buildonly && npm run cover",
25-
"build_docs": "npm run build_es6 && npm run tests2png && esdoc -c esdoc.json",
25+
"build_docs": "npm run build_es6 && npm run build_global && npm run tests2png && esdoc -c esdoc.json",
2626
"publish_docs": "./publish_docs.sh",
2727
"lint_perf": "eslint perf/",
2828
"lint_spec": "tslint -c tslint.json spec/*.ts spec/**/*.ts spec/**/**/*.ts",

0 commit comments

Comments
 (0)