Permalink
Browse files

Updated markdown files

  • Loading branch information...
1 parent baba229 commit e6a7feabeaa4f326634def372e84e674f95e4bf7 @julionc julionc committed Mar 8, 2012
Showing with 5,943 additions and 1,000 deletions.
  1. +2 −0 .gitignore
  2. +6 −12 README.md
  3. +1 −0 VERSION
  4. +18 −137 build.js
  5. +4 −5 doc/api/_toc.markdown
  6. +1 −1 doc/api/addons.markdown
  7. +9 −12 doc/api/all.markdown
  8. +13 −13 doc/api/appendix_1.markdown
  9. +12 −12 doc/api/assert.markdown
  10. +538 −32 doc/api/buffer.markdown
  11. +256 −34 doc/api/child_process.markdown
  12. +354 −0 doc/api/cluster.markdown
  13. +258 −19 doc/api/crypto.markdown
  14. +102 −34 doc/api/debugger.markdown
  15. +13 −9 doc/api/dgram.markdown
  16. +36 −13 doc/api/dns.markdown
  17. +68 −0 doc/api/documentation.markdown
  18. +11 −11 doc/api/events.markdown
  19. +48 −48 doc/api/fs.markdown
  20. +94 −20 doc/api/globals.markdown
  21. +1 −1 doc/api/http.markdown
  22. +91 −5 doc/api/https.markdown
  23. +13 −13 doc/api/modules.markdown
  24. +449 −392 doc/api/net.markdown
  25. +9 −9 doc/api/os.markdown
  26. +62 −36 doc/api/path.markdown
  27. +14 −14 doc/api/process.markdown
  28. +5 −5 doc/api/querystring.markdown
  29. +10 −8 doc/api/readline.markdown
  30. +32 −14 doc/api/repl.markdown
  31. +22 −14 doc/api/stdio.markdown
  32. +1 −1 doc/api/stream.markdown
  33. +4 −2 doc/api/synopsis.markdown
  34. +5 −5 doc/api/timers.markdown
  35. +10 −10 doc/api/tls.markdown
  36. +6 −6 doc/api/tty.markdown
  37. +3 −3 doc/api/url.markdown
  38. +122 −12 doc/api/util.markdown
  39. +67 −18 doc/api/vm.markdown
  40. +269 −0 doc/api/zlib.markdown
  41. +23 −0 doc/api_assets/sh.css
  42. +493 −0 doc/api_assets/style.css
  43. BIN doc/favicon.ico
  44. BIN doc/images/logo-light.png
  45. BIN doc/images/logo.png
  46. +423 −0 doc/net.original.markdown
  47. +68 −20 doc/template.html
  48. +96 −0 tools/doc/README.md
  49. +99 −0 tools/doc/generate.js
  50. +153 −0 tools/doc/html.js
  51. +536 −0 tools/doc/json.js
  52. +1 −0 tools/doc/node_modules/.bin/marked
  53. +2 −0 tools/doc/node_modules/marked/.npmignore
  54. +19 −0 tools/doc/node_modules/marked/LICENSE
  55. +9 −0 tools/doc/node_modules/marked/Makefile
  56. +135 −0 tools/doc/node_modules/marked/README.md
  57. +115 −0 tools/doc/node_modules/marked/bin/marked
  58. +1 −0 tools/doc/node_modules/marked/index.js
  59. +662 −0 tools/doc/node_modules/marked/lib/marked.js
  60. +39 −0 tools/doc/node_modules/marked/man/marked.1
  61. +15 −0 tools/doc/node_modules/marked/package.json
  62. +15 −0 tools/doc/package.json
View
@@ -1,3 +1,5 @@
.DS_Store
esp.*
en.*
+*.swp
+*.log
View
@@ -1,19 +1,13 @@
-# NodeJS API DOC ES
+NodeJS API DOC ES
+===
**>> Se requiere voluntarios para actualizar la traducción de la API <<**
-Proyecto para traducir la API de NodeJS al español.
-
-Si desea colaborar. Revise la información de la [wiki](https://github.com/nodejs-es/api/wiki).
+http://nodejs-es.github.com/api/
-Colaboradores:
-* [julionc](https://github.com/julionc)
-* [carlosvillu](https://github.com/carlosvillu)
-* [otorras](https://github.com/otorras)
-* [yeraycaballero](https://github.com/yeraycaballero)
-* [antoniojrossi](https://github.com/antoniojrossi)
+Proyecto para traducir la API de NodeJS.
+Si desea colaborar. Revise la información de la [wiki](https://github.com/nodejs-es/api/wiki).
-API OnLine
+[Colaboradores](https://github.com/nodejs-es/api/contributors)
-http://nodejs-es.github.com/api/
View
@@ -0,0 +1 @@
+v0.6.12-20120304
View
155 build.js
@@ -1,142 +1,23 @@
-/*
- File: build.js
- Custom doctool.js Node documentation
- Julius (julionc at gmail dot com)
-*/
-
-var fs = require("fs"),
- path = require("path"),
- markdown = require("./markdown"),
- argv = process.argv,
- argc = argv.length;
-
-var _template = 'template.html',
- _folder = 'api/',
- _out = 'site/';
-
-var template = fs.readFileSync(_template, "utf8");
-
-
-function formatIdString(str) {
- str = str
- .replace(/\([^)}]*\)/gmi, "")
- .replace(/[^A-Za-z0-9_.]+/gmi, "_");
-
- return str.substr(0,1).toLowerCase() + str.substr(1);
-}
-
-
-function generateToc(data) {
- var last_level = 0
- , first_level = 0
- , toc = [
- '<div id="toc">',
- '<h2>Tabla de contenidos</h2>'
- ];
-
- data.replace(/(^#+)\W+([^$\n]+)/gmi, function(src, level, text) {
- level = level.length;
-
- if (first_level == 0) first_level = level;
-
- if (level <= last_level) {
- toc.push("</li>");
- }
-
- if (level > last_level) {
- toc.push("<ul>");
- } else if (level < last_level) {
- for(var c=last_level-level; 0 < c ; c-- ) {
- toc.push("</ul>");
- toc.push("</li>");
- }
- }
-
- toc.push("<li>");
- toc.push('<a href="#'+formatIdString(text)+'">'+text+'</a>');
-
- last_level = level;
- });
-
- for(var c=last_level-first_level; 0 <= c ; c-- ) {
- toc.push("</li>");
- toc.push("</ul>");
- }
-
- toc.push("<hr />")
- toc.push("</div>");
-
- return toc.join("");
-}
-
-
-var includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
-// Allow including other pages in the data.
-function loadIncludes(data, current_file) {
- return data.replace(includeExpr, function(src, name, ext) {
- try {
- var include_path = path.join(current_file, "../", name+"."+(ext || "markdown"))
- return loadIncludes(fs.readFileSync(include_path, "utf8"), current_file);
- } catch(e) {
- return "";
- }
- });
-}
-
-
-function convertData(data) {
- // Convert it to HTML from Markdown
- var html = markdown.toHTML(markdown.parse(data), {xhtml:true})
- .replace(/<hr><\/hr>/g, "<hr />")
- .replace(/(\<h[2-6])\>([^<]+)(\<\/h[1-6]\>)/gmi, function(o, ts, c, te) {
- return ts+' id="'+formatIdString(c)+'">'+c+te;
+#!/usr/bin/env node
+
+var fs = require('fs');
+var exec = require("child_process").exec;
+
+function run_node(filename) {
+ var cmd = '';
+ cmd += 'node tools/doc/generate.js --format=html --template=doc/template.html ';
+ cmd += filename + ' > out/' + filename.split('.').shift() + '.html';
+ //console.log("CMD : " + cmd);
+ return exec(cmd, function(err, stdout, stderr) {
+ if (err) throw err;
+// else console.log('¡Documentación generada!' + stdout);
});
-
- return html;
-}
-
-function generate(filename) {
- var output = template,
- html;
-
- fs.readFile(filename, "utf8", function(err, data) {
- if (err) throw err;
-
- // go recursion.
- data = loadIncludes(data, filename);
- // go markdown.
- html = convertData(data);
- filename = path.basename(filename, '.markdown');
-
- if (filename != "_toc" && filename != "index") {
- if (data) {
- html = generateToc(data) + "\n" + html;
- }
-
- output = output.replace("{{section}}", filename+" - ")
- } else {
- output = output.replace("{{section}}", "");
- output = output.replace(/<body([^>]*)>/, '<body class="'+filename+'" $1>');
- }
- if (html.length == 0) {
- html = "Sorry, this section is currently undocumented, \
-but we'll be working on it.";
- }
- output = output.replace("{{content}}", html);
- fs.writeFile(_out + filename + ".html", output);
-/* if (argc > 4) {
- //fs.writeFile(argv[4], output);
- fs.writeFile(_out + filename + ".html", output);
- } else {
- process.stdout.write(output);
- } */
- });
}
-/* build */
-files = fs.readdirSync(_folder);
+files = fs.readdirSync('doc/api');
for(var x=0, l=files.length; x<l; x++) {
- //console.log("filename: " + _folder + files[x]);
- generate(_folder + files[x]);
+ var filename = 'doc/api/' + files[x];
+ console.log("File Name: " + filename);
+ run_node(filename);
}
-console.log("Build it!");
+
View
@@ -1,5 +1,4 @@
-## Tabla de contenidos
-
+* [Acerca de la documentación](documentation.html)
* [Synopsis](synopsis.html)
* [Globals](globals.html)
* [STDIO](stdio.html)
@@ -9,8 +8,8 @@
* [Process](process.html)
* [Utilities](util.html)
* [Events](events.html)
-* [Buffers](buffers.html)
-* [Streams](streams.html)
+* [Buffer](buffer.html)
+* [Stream](stream.html)
* [Crypto](crypto.html)
* [TLS/SSL](tls.html)
* [String Decoder](string_decoder.html)
@@ -29,8 +28,8 @@
* [Child Processes](child_processes.html)
* [Assertion Testing](assert.html)
* [TTY](tty.html)
+* [ZLIB](zlib.html)
* [OS](os.html)
* [Debugger](debugger.html)
* Appendixes
* [Appendix 1: Recommended Third-party Modules](appendix_1.html)
- * [Appendix 2: Deprecated API's](appendix_2.html)
View
@@ -1,4 +1,4 @@
-## Addons
+# Addons
Addons son objetos enlazados dinamicamente. Ellos pueden ser el pegamento entre las librerias C y C++ con NodeJS. La API (en estos momentos) es algo compleja, siendo necesario el conocimiento de varias librerias.
View
@@ -1,38 +1,35 @@
-
+@include documentation
@include synopsis
@include globals
@include stdio
@include timers
@include modules
@include addons
@include process
-@include constants
@include util
-@include freelist
@include events
-@include buffers
-@include streams
+@include buffer
+@include stream
@include crypto
@include tls
@include string_decoder
@include fs
@include path
@include net
-@include dns
@include dgram
+@include dns
@include http
@include https
@include url
@include querystring
@include readline
@include repl
-@include script
-@include child_processes
+@include vm
+@include child_process
@include assert
@include tty
+@include zlib
@include os
@include debugger
-
-# Apéndices
-@include appendix_1
-@include appendix_2
+@include cluster
+@include appendix_1
@@ -1,4 +1,4 @@
-## Apéndice 1 - Módulos de terceros
+# Apéndice 1 - Módulos de terceros
Existen muchos módulos de terceros para Node. En el momento de escribir esto,
Agosto 2010, el repositorio principal de módulos es
@@ -15,30 +15,30 @@ donde sea.
- Web Framework: [Express](http://github.com/visionmedia/express)
-- Web Sockets: [Socket.IO](http://github.com/LearnBoost/Socket.IO-node)
+- Web Sockets: [Socket.IO](https://github.com/learnboost/socket.io)
- HTML Parsing: [HTML5](http://github.com/aredridel/html5)
- [mDNS/Zeroconf/Bonjour](http://github.com/agnat/node_mdns)
-- [RabbitMQ, AMQP](https://github.com/ry/node-amqp)
+- [RabbitMQ, AMQP](https://github.com/postwait/node-amqp)
-- [mysql](http://github.com/felixge/node-mysql)
+- [mysql](https://github.com/felixge/node-mysql)
-- Serialization: [msgpack](http://github.com/pgriess/node-msgpack)
+- Serialization: [msgpack](https://github.com/pgriess/node-msgpack)
-- Scraping: [Apricot](http://github.com/silentrob/Apricot)
+- Scraping: [Apricot](https://github.com/silentrob/Apricot)
-- Debugger: [ndb](http://github.com/smtlaissezfaire/ndb) is a CLI debugger
- [inspector](http://github.com/dannycoates/node-inspector) is a web based
+- Debugger: [ndb](https://github.com/smtlaissezfaire/ndb) is a CLI debugger
+ [inspector](https://github.com/dannycoates/node-inspector) is a web based
tool.
-- [pcap binding](http://github.com/mranney/node_pcap)
+- [pcap binding](https://github.com/mranney/node_pcap)
-- [ncurses](http://github.com/mscdex/node-ncurses)
+- [ncurses](https://github.com/mscdex/node-ncurses)
- Testing/TDD/BDD: [vows](http://vowsjs.org/),
- [expresso](http://github.com/visionmedia/expresso),
- [mjsunit.runner](http://github.com/tmpvar/mjsunit.runner)
+ [mocha](https://github.com/visionmedia/mocha),
+ [mjsunit.runner](https://github.com/tmpvar/mjsunit.runner)
-Parches a esta lista son bienvenidos.
+Parches a esta lista son bienvenidos.
View
@@ -1,41 +1,41 @@
-## Assert
+# Assert
Este módulo es usado para escribir pruebas unitarias de sus aplicaciones, puede
acceder con `require('assert')`.
-### assert.fail(actual, expected, message, operator)
+## assert.fail(actual, expected, message, operator)
Evalua si `actual` es igual a `expected` usando el operador provisto.
-### assert.ok(value, [message])
+## assert.ok(value, [message])
Evalua si el valor es `true`, si es equivalente a `assert.equal(true, value, message);`
-### assert.equal(actual, expected, [message])
+## assert.equal(actual, expected, [message])
Evalua la igualdad con el operador de comparación ( `==` ).
-### assert.notEqual(actual, expected, [message])
+## assert.notEqual(actual, expected, [message])
Evalua la no igualdad con el operador de comparación en negación ( `!=` ).
-### assert.deepEqual(actual, expected, [message])
+## assert.deepEqual(actual, expected, [message])
Pruebas para las pruebas de afirmación de desigualdad profunda.
-### assert.notDeepEqual(actual, expected, [message])
+## assert.notDeepEqual(actual, expected, [message])
Pruebas para cualquier desigualdad profunda.
-### assert.strictEqual(actual, expected, [message])
+## assert.strictEqual(actual, expected, [message])
Pruebas de igualdad estrictas, según lo determinado por el operador de igualdad estricto ( `===` )
-### assert.notStrictEqual(actual, expected, [message])
+## assert.notStrictEqual(actual, expected, [message])
Pruebas de no igualdad estrictas, según lo determinado por el operador de no igualdad estricto ( `!==` )
-### assert.throws(block, [error], [message])
+## assert.throws(block, [error], [message])
Se espera lanzar un `bloque`(block) de error. El `error` puede ser un constructor, expresión regular (regexp) o
una función de validación.
@@ -72,11 +72,11 @@ Error de validación personalizado:
"unexpected error"
);
-### assert.doesNotThrow(block, [error], [message])
+## assert.doesNotThrow(block, [error], [message])
Se espera un `bloque` (block) y no produzca un error, vea assert.throws para más detalles.
-### assert.ifError(value)
+## assert.ifError(value)
Comprueba si el valor no es falso, se produce un lanzamiento si el valor es verdadero. Muy útil
cuando se prueba el primer argumento, `error` en los callbacks.
Oops, something went wrong.

0 comments on commit e6a7fea

Please sign in to comment.