Comments (7)
Notes on tools: there have been two attempts to unbundle the existing doc tool from the core repo.
- I pulled out the tool from io.js at one point.
- @robertkowalski pulled it out of joyent/node.
I'm unconvinced that we can continue the "hand one file to the doctool, get one file back" approach — we should be checking things in a cross-document fashion (like including table of contents, whether links are broken, canonical named links, etc.) Additionally, the existing tool makes assumptions about the one-to-one-ness of module ⬌ documentation, which we're abandoning here.
from docs.
from docs.
Also
from docs.
@bnb It shouldn't add much complexity. It's just a bit of extra bookkeeping for internal links. I'm not sure how I feel about checking external links, but even that would be pretty simple (it might take a bit longer to run, though!)
from docs.
I'd pass on external links. Or, at most, make it a separate build task that only warns--other websites will go down, and it's not in our power to know or control exactly when that may happen.
from docs.
IMO we should have a thorough JSON structure in the first place. I just realized that the JSON docs generator actually parses the markdown, which is kind of nice, I guess, but how about having a good JSON structure in the first place?
I would like to have things such as inherits
key, that alone will improve the docs dramatically, because you will be able to navigate easily through out the class hierarchy.
What type of object each method is returning, again it should be easy to navigate the hierarchy from there.
What type of object each event receives, same as above.
Also in case a method is accepting a map of options I would like to have each option with its default value and type (just search for "name": "request",
in the generated JSON and see for yourself - currently all of it is tossed under the desc
key)
Having a thorough JSON structure will allow us to generate markdown, html or just about any other visualization we might think of. The only remaining issue would be how to hook the non machine friendly parts of the docs to that structure (such as text and code examples).
EDIT
{
"classes": {
"net.Server": {
"inherits": "events.EventEmitter",
"methods": {
"listed": {
}
}
}
},
"utils": {
"net.createServer": {
"returns": "net.Server",
"arguments": {
"options": {
"allowHalfOpen": {
"type": "Boolean",
"default": false,
},
"pauseOnConnect": {
"type": "Boolean",
"default": false,
},
"required": false
},
"connectionListener": {
"type": "Function",
"event": {
"type": "net.Server",
"name": "connection"
},
"arguments": {
"socket": {
"type": "net.Socket"
}
},
"required": false
}
}
},
"net.connect": {
"returns": "net.Socket",
"arguments": [
{
"port": {
"type": "Number",
"required": true
},
"host": {
"type": "String",
"default": "localhost",
"required": false
},
"localAddress": {
"type": "String",
"required": false
},
"localPort": {
"type": "Number",
"required": false
},
"family": {
"type": "Number",
"default": 4,
"required": false
},
"connectionListener": {
"type": "Function",
"event": {
"type": "net.Socket",
"name": "connect"
}
}
}
]
}
}
}
Wow this took me 10+ minutes, too much work even for writing it in JSON. My idea was to use the type
and inherits
keys for cross linking between modules. Anyway.
from docs.
Closing this in favor of #61
from docs.
Related Issues (20)
- Node v6.3.1 docs: net.Socket HOT 1
- StackOverflow Documentation for Node.js HOT 5
- Circular reference for OS Constants HOT 3
- http ClientRequest documentation unclear about inheritance when visually scanning HOT 2
- .read() stream not fully explained HOT 9
- Rough Meeting Notes (2016-12-01 @ NINA) HOT 8
- What errors can be thrown?
- Async meetings HOT 6
- How-to use LetsEncrypt Guide HOT 13
- Meeting #1 HOT 33
- Add @vsemozhetbyt? HOT 4
- Meeting #2 HOT 2
- descriptions of "The module Object"'s property are not clear HOT 1
- clarity on asynchronous methods throwing exceptions HOT 2
- http.ClientRequest is missing some methods HOT 3
- Package documentation (how to intl) HOT 1
- Decharter this Working Group? HOT 8
- Better wording for modules_all_together HOT 3
- Suggestion: Return type in function declaration & possible option to view types by clicking HOT 2
- Improve the words usage in socket.setTimeout() definition HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.