Skip to content

Commit

Permalink
docs(esdoc): add playground environment in ESDoc-generated page
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
staltz committed Mar 3, 2016
1 parent d5f1bcd commit 98e183d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions doc/asset/devtools-welcome.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var welcomeText = (
' ____ _ ____ \n'+
'| _ \\ __ __ | / ___| \n'+
'| |_) |\\ \\/ / | \\___ \\ \n'+
'| _ < > < |_| |___) | \n'+
'|_| \\_\\/_/\\_\\___/|____/ \n'+
'\nTry this code to get started experimenting with RxJS:\n'+
'\n var subscription = Rx.Observable.interval(500)'+
'.take(4).subscribe(function (x) { console.log(x) });\n'
);
if (console.info) {
console.info(welcomeText);
} else {
console.log(welcomeText);
}
2 changes: 2 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Exte
*Read the Manual on Observables, Observer, Subject, etc*
### [» Full reference](./identifiers.html)
*Read detailed documentation on each operator*

**Hint: open your DevTools to experiment with RxJS.**
4 changes: 4 additions & 0 deletions esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"undocumentIdentifier": false,
"title": "RxJS",
"styles": ["./doc/styles/main.css"],
"scripts": [
"./dist/global/Rx.umd.min.js",
"./doc/asset/devtools-welcome.js"
],
"index": "./doc/index.md",
"plugins": [
{"name": "./tools/custom-esdoc-plugin.js"}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build_perf": "npm run build_cjs && npm run build_global && webdriver-manager update && npm run perf",
"build_test": "rm -rf dist/ && npm run lint && npm run build_cjs && npm run test_buildonly && npm run test_nobuild",
"build_cover": "rm -rf dist/ && npm run lint && npm run build_cjs && npm run test_buildonly && npm run cover",
"build_docs": "npm run build_es6 && npm run tests2png && esdoc -c esdoc.json",
"build_docs": "npm run build_es6 && npm run build_global && npm run tests2png && esdoc -c esdoc.json",
"publish_docs": "./publish_docs.sh",
"lint_perf": "eslint perf/",
"lint_spec": "tslint -c tslint.json spec/*.ts spec/**/*.ts spec/**/**/*.ts",
Expand Down

0 comments on commit 98e183d

Please sign in to comment.