From 4b8376986a821f7978580284132293e107a83f74 Mon Sep 17 00:00:00 2001 From: Robert Jefe Lindstaedt Date: Thu, 21 Apr 2016 00:12:40 +0200 Subject: [PATCH] doc: git mv to .md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc: rename .markdown references in content * doc: rename to .md in tools * doc: rename to .md in CONTRIBUTING.md PR-URL: https://github.com/nodejs/node/pull/4747 Reviewed-By: Myles Borins Reviewed-By: techjeffharris Reviewed-By: Johan Bergström Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- CONTRIBUTING.md | 2 +- Makefile | 12 +++++----- doc/api/{_toc.markdown => _toc.md} | 0 doc/api/{addons.markdown => addons.md} | 0 doc/api/{all.markdown => all.md} | 0 doc/api/{assert.markdown => assert.md} | 0 doc/api/{buffer.markdown => buffer.md} | 0 ...hild_process.markdown => child_process.md} | 0 doc/api/{cli.markdown => cli.md} | 0 doc/api/{cluster.markdown => cluster.md} | 0 doc/api/{console.markdown => console.md} | 0 doc/api/{crypto.markdown => crypto.md} | 0 doc/api/{debugger.markdown => debugger.md} | 0 doc/api/{dgram.markdown => dgram.md} | 0 doc/api/{dns.markdown => dns.md} | 0 ...ocumentation.markdown => documentation.md} | 2 +- doc/api/{domain.markdown => domain.md} | 0 doc/api/{errors.markdown => errors.md} | 0 doc/api/{events.markdown => events.md} | 0 doc/api/{fs.markdown => fs.md} | 0 doc/api/{globals.markdown => globals.md} | 0 doc/api/{http.markdown => http.md} | 0 doc/api/{https.markdown => https.md} | 0 doc/api/index.markdown | 1 - doc/api/index.md | 1 + doc/api/{modules.markdown => modules.md} | 0 doc/api/{net.markdown => net.md} | 0 doc/api/{os.markdown => os.md} | 0 doc/api/{path.markdown => path.md} | 0 doc/api/{process.markdown => process.md} | 24 +++++++++---------- doc/api/{punycode.markdown => punycode.md} | 0 .../{querystring.markdown => querystring.md} | 0 doc/api/{readline.markdown => readline.md} | 0 doc/api/{repl.markdown => repl.md} | 0 doc/api/{stream.markdown => stream.md} | 0 ...ing_decoder.markdown => string_decoder.md} | 0 doc/api/{synopsis.markdown => synopsis.md} | 0 doc/api/{timers.markdown => timers.md} | 0 doc/api/{tls.markdown => tls.md} | 0 doc/api/{tty.markdown => tty.md} | 0 doc/api/{url.markdown => url.md} | 0 doc/api/{util.markdown => util.md} | 0 doc/api/{v8.markdown => v8.md} | 0 doc/api/{vm.markdown => vm.md} | 0 doc/api/{zlib.markdown => zlib.md} | 0 src/node.cc | 2 +- tools/doc/README.md | 2 +- tools/doc/addon-verify.js | 2 +- tools/doc/html.js | 4 ++-- tools/doc/preprocess.js | 2 +- 50 files changed, 27 insertions(+), 27 deletions(-) rename doc/api/{_toc.markdown => _toc.md} (100%) rename doc/api/{addons.markdown => addons.md} (100%) rename doc/api/{all.markdown => all.md} (100%) rename doc/api/{assert.markdown => assert.md} (100%) rename doc/api/{buffer.markdown => buffer.md} (100%) rename doc/api/{child_process.markdown => child_process.md} (100%) rename doc/api/{cli.markdown => cli.md} (100%) rename doc/api/{cluster.markdown => cluster.md} (100%) rename doc/api/{console.markdown => console.md} (100%) rename doc/api/{crypto.markdown => crypto.md} (100%) rename doc/api/{debugger.markdown => debugger.md} (100%) rename doc/api/{dgram.markdown => dgram.md} (100%) rename doc/api/{dns.markdown => dns.md} (100%) rename doc/api/{documentation.markdown => documentation.md} (97%) rename doc/api/{domain.markdown => domain.md} (100%) rename doc/api/{errors.markdown => errors.md} (100%) rename doc/api/{events.markdown => events.md} (100%) rename doc/api/{fs.markdown => fs.md} (100%) rename doc/api/{globals.markdown => globals.md} (100%) rename doc/api/{http.markdown => http.md} (100%) rename doc/api/{https.markdown => https.md} (100%) delete mode 100644 doc/api/index.markdown create mode 100644 doc/api/index.md rename doc/api/{modules.markdown => modules.md} (100%) rename doc/api/{net.markdown => net.md} (100%) rename doc/api/{os.markdown => os.md} (100%) rename doc/api/{path.markdown => path.md} (100%) rename doc/api/{process.markdown => process.md} (99%) rename doc/api/{punycode.markdown => punycode.md} (100%) rename doc/api/{querystring.markdown => querystring.md} (100%) rename doc/api/{readline.markdown => readline.md} (100%) rename doc/api/{repl.markdown => repl.md} (100%) rename doc/api/{stream.markdown => stream.md} (100%) rename doc/api/{string_decoder.markdown => string_decoder.md} (100%) rename doc/api/{synopsis.markdown => synopsis.md} (100%) rename doc/api/{timers.markdown => timers.md} (100%) rename doc/api/{tls.markdown => tls.md} (100%) rename doc/api/{tty.markdown => tty.md} (100%) rename doc/api/{url.markdown => url.md} (100%) rename doc/api/{util.markdown => util.md} (100%) rename doc/api/{v8.markdown => v8.md} (100%) rename doc/api/{vm.markdown => vm.md} (100%) rename doc/api/{zlib.markdown => zlib.md} (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 842149249b4408..bce91a3603cbed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ and built upon. #### Respect the stability index The rules for the master branch are less strict; consult the -[stability index](./doc/api/documentation.markdown#stability-index) for details. +[stability index](./doc/api/documentation..md#stability-index) for details. In a nutshell, modules are at varying levels of API stability. Bug fixes are always welcome but API or behavioral changes to modules at stability level 3 diff --git a/Makefile b/Makefile index b12e9484e1e6d9..c01b10f14a8a23 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE) --nodedir="$(shell pwd)" # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. -test/addons/.docbuildstamp: doc/api/addons.markdown +test/addons/.docbuildstamp: doc/api/addons.md $(RM) -r test/addons/??_*/ $(NODE) tools/doc/addon-verify.js touch $@ @@ -239,9 +239,9 @@ test-v8-benchmarks: test-v8-all: test-v8 test-v8-intl test-v8-benchmarks # runs all v8 tests -apidoc_sources = $(wildcard doc/api/*.markdown) -apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \ - $(addprefix out/,$(apidoc_sources:.markdown=.json)) +apidoc_sources = $(wildcard doc/api/*.md) +apidocs = $(addprefix out/,$(apidoc_sources:.md=.html)) \ + $(addprefix out/,$(apidoc_sources:.md=.json)) apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets @@ -258,10 +258,10 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/ out/doc/%: doc/% cp -r $< $@ -out/doc/api/%.json: doc/api/%.markdown $(NODE_EXE) +out/doc/api/%.json: doc/api/%.md $(NODE_EXE) $(NODE) tools/doc/generate.js --format=json $< > $@ -out/doc/api/%.html: doc/api/%.markdown $(NODE_EXE) +out/doc/api/%.html: doc/api/%.md $(NODE_EXE) $(NODE) tools/doc/generate.js --format=html --template=doc/template.html $< > $@ docopen: out/doc/api/all.html diff --git a/doc/api/_toc.markdown b/doc/api/_toc.md similarity index 100% rename from doc/api/_toc.markdown rename to doc/api/_toc.md diff --git a/doc/api/addons.markdown b/doc/api/addons.md similarity index 100% rename from doc/api/addons.markdown rename to doc/api/addons.md diff --git a/doc/api/all.markdown b/doc/api/all.md similarity index 100% rename from doc/api/all.markdown rename to doc/api/all.md diff --git a/doc/api/assert.markdown b/doc/api/assert.md similarity index 100% rename from doc/api/assert.markdown rename to doc/api/assert.md diff --git a/doc/api/buffer.markdown b/doc/api/buffer.md similarity index 100% rename from doc/api/buffer.markdown rename to doc/api/buffer.md diff --git a/doc/api/child_process.markdown b/doc/api/child_process.md similarity index 100% rename from doc/api/child_process.markdown rename to doc/api/child_process.md diff --git a/doc/api/cli.markdown b/doc/api/cli.md similarity index 100% rename from doc/api/cli.markdown rename to doc/api/cli.md diff --git a/doc/api/cluster.markdown b/doc/api/cluster.md similarity index 100% rename from doc/api/cluster.markdown rename to doc/api/cluster.md diff --git a/doc/api/console.markdown b/doc/api/console.md similarity index 100% rename from doc/api/console.markdown rename to doc/api/console.md diff --git a/doc/api/crypto.markdown b/doc/api/crypto.md similarity index 100% rename from doc/api/crypto.markdown rename to doc/api/crypto.md diff --git a/doc/api/debugger.markdown b/doc/api/debugger.md similarity index 100% rename from doc/api/debugger.markdown rename to doc/api/debugger.md diff --git a/doc/api/dgram.markdown b/doc/api/dgram.md similarity index 100% rename from doc/api/dgram.markdown rename to doc/api/dgram.md diff --git a/doc/api/dns.markdown b/doc/api/dns.md similarity index 100% rename from doc/api/dns.markdown rename to doc/api/dns.md diff --git a/doc/api/documentation.markdown b/doc/api/documentation.md similarity index 97% rename from doc/api/documentation.markdown rename to doc/api/documentation.md index 4d357e39efab37..e39dc8f001696a 100644 --- a/doc/api/documentation.markdown +++ b/doc/api/documentation.md @@ -16,7 +16,7 @@ experimental, and added for the benefit of IDEs and other utilities that wish to do programmatic things with the documentation. Every `.html` and `.json` file is generated based on the corresponding -`.markdown` file in the `doc/api/` folder in Node.js's source tree. The +`.md` file in the `doc/api/` folder in Node.js's source tree. The documentation is generated using the `tools/doc/generate.js` program. The HTML template is located at `doc/template.html`. diff --git a/doc/api/domain.markdown b/doc/api/domain.md similarity index 100% rename from doc/api/domain.markdown rename to doc/api/domain.md diff --git a/doc/api/errors.markdown b/doc/api/errors.md similarity index 100% rename from doc/api/errors.markdown rename to doc/api/errors.md diff --git a/doc/api/events.markdown b/doc/api/events.md similarity index 100% rename from doc/api/events.markdown rename to doc/api/events.md diff --git a/doc/api/fs.markdown b/doc/api/fs.md similarity index 100% rename from doc/api/fs.markdown rename to doc/api/fs.md diff --git a/doc/api/globals.markdown b/doc/api/globals.md similarity index 100% rename from doc/api/globals.markdown rename to doc/api/globals.md diff --git a/doc/api/http.markdown b/doc/api/http.md similarity index 100% rename from doc/api/http.markdown rename to doc/api/http.md diff --git a/doc/api/https.markdown b/doc/api/https.md similarity index 100% rename from doc/api/https.markdown rename to doc/api/https.md diff --git a/doc/api/index.markdown b/doc/api/index.markdown deleted file mode 100644 index 1a774507aef098..00000000000000 --- a/doc/api/index.markdown +++ /dev/null @@ -1 +0,0 @@ -@include _toc.markdown diff --git a/doc/api/index.md b/doc/api/index.md new file mode 100644 index 00000000000000..400faf6e5ed34a --- /dev/null +++ b/doc/api/index.md @@ -0,0 +1 @@ +@include _toc.md diff --git a/doc/api/modules.markdown b/doc/api/modules.md similarity index 100% rename from doc/api/modules.markdown rename to doc/api/modules.md diff --git a/doc/api/net.markdown b/doc/api/net.md similarity index 100% rename from doc/api/net.markdown rename to doc/api/net.md diff --git a/doc/api/os.markdown b/doc/api/os.md similarity index 100% rename from doc/api/os.markdown rename to doc/api/os.md diff --git a/doc/api/path.markdown b/doc/api/path.md similarity index 100% rename from doc/api/path.markdown rename to doc/api/path.md diff --git a/doc/api/process.markdown b/doc/api/process.md similarity index 99% rename from doc/api/process.markdown rename to doc/api/process.md index a19d710e37d411..99827e3b05451b 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.md @@ -7,12 +7,12 @@ It is an instance of [`EventEmitter`][]. ## Event: 'beforeExit' -This event is emitted when Node.js empties its event loop and has nothing else -to schedule. Normally, Node.js exits when there is no work scheduled, but a -listener for `'beforeExit'` can make asynchronous calls, and cause Node.js to +This event is emitted when Node.js empties its event loop and has nothing else +to schedule. Normally, Node.js exits when there is no work scheduled, but a +listener for `'beforeExit'` can make asynchronous calls, and cause Node.js to continue. -`'beforeExit'` is not emitted for conditions causing explicit termination, such +`'beforeExit'` is not emitted for conditions causing explicit termination, such as [`process.exit()`][] or uncaught exceptions, and should not be used as an alternative to the `'exit'` event unless the intention is to schedule more work. @@ -93,7 +93,7 @@ indefinitely) or upon process exit (more convenient for scripts). ## Event: 'uncaughtException' The `'uncaughtException'` event is emitted when an exception bubbles all the -way back to the event loop. By default, Node.js handles such exceptions by +way back to the event loop. By default, Node.js handles such exceptions by printing the stack trace to stderr and exiting. Adding a handler for the `'uncaughtException'` event overrides this default behavior. @@ -145,7 +145,7 @@ a promise chain. This event is useful for detecting and keeping track of promises that were rejected whose rejections were not handled yet. This event is emitted with the following arguments: - - `reason` the object with which the promise was rejected (usually an + - `reason` the object with which the promise was rejected (usually an [`Error`][] instance). - `p` the promise that was rejected. @@ -257,9 +257,9 @@ Note: - `SIGUSR1` is reserved by Node.js to start the debugger. It's possible to install a listener but that won't stop the debugger from starting. -- `SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that - resets the terminal mode before exiting with code `128 + signal number`. If - one of these signals has a listener installed, its default behavior will be +- `SIGTERM` and `SIGINT` have default handlers on non-Windows platforms that + resets the terminal mode before exiting with code `128 + signal number`. If + one of these signals has a listener installed, its default behavior will be removed (Node.js will no longer exit). - `SIGPIPE` is ignored by default. It can have a listener installed. - `SIGHUP` is generated on Windows when the console window is closed, and on other @@ -272,11 +272,11 @@ Note: - `SIGINT` from the terminal is supported on all platforms, and can usually be generated with `CTRL+C` (though this may be configurable). It is not generated when terminal raw mode is enabled. -- `SIGBREAK` is delivered on Windows when `CTRL+BREAK` is pressed, on +- `SIGBREAK` is delivered on Windows when `CTRL+BREAK` is pressed, on non-Windows platforms it can be listened on, but there is no way to send or generate it. -- `SIGWINCH` is delivered when the console has been resized. On Windows, this - will only happen on write to the console when the cursor is being moved, or +- `SIGWINCH` is delivered when the console has been resized. On Windows, this + will only happen on write to the console when the cursor is being moved, or when a readable tty is used in raw mode. - `SIGKILL` cannot have a listener installed, it will unconditionally terminate Node.js on all platforms. diff --git a/doc/api/punycode.markdown b/doc/api/punycode.md similarity index 100% rename from doc/api/punycode.markdown rename to doc/api/punycode.md diff --git a/doc/api/querystring.markdown b/doc/api/querystring.md similarity index 100% rename from doc/api/querystring.markdown rename to doc/api/querystring.md diff --git a/doc/api/readline.markdown b/doc/api/readline.md similarity index 100% rename from doc/api/readline.markdown rename to doc/api/readline.md diff --git a/doc/api/repl.markdown b/doc/api/repl.md similarity index 100% rename from doc/api/repl.markdown rename to doc/api/repl.md diff --git a/doc/api/stream.markdown b/doc/api/stream.md similarity index 100% rename from doc/api/stream.markdown rename to doc/api/stream.md diff --git a/doc/api/string_decoder.markdown b/doc/api/string_decoder.md similarity index 100% rename from doc/api/string_decoder.markdown rename to doc/api/string_decoder.md diff --git a/doc/api/synopsis.markdown b/doc/api/synopsis.md similarity index 100% rename from doc/api/synopsis.markdown rename to doc/api/synopsis.md diff --git a/doc/api/timers.markdown b/doc/api/timers.md similarity index 100% rename from doc/api/timers.markdown rename to doc/api/timers.md diff --git a/doc/api/tls.markdown b/doc/api/tls.md similarity index 100% rename from doc/api/tls.markdown rename to doc/api/tls.md diff --git a/doc/api/tty.markdown b/doc/api/tty.md similarity index 100% rename from doc/api/tty.markdown rename to doc/api/tty.md diff --git a/doc/api/url.markdown b/doc/api/url.md similarity index 100% rename from doc/api/url.markdown rename to doc/api/url.md diff --git a/doc/api/util.markdown b/doc/api/util.md similarity index 100% rename from doc/api/util.markdown rename to doc/api/util.md diff --git a/doc/api/v8.markdown b/doc/api/v8.md similarity index 100% rename from doc/api/v8.markdown rename to doc/api/v8.md diff --git a/doc/api/vm.markdown b/doc/api/vm.md similarity index 100% rename from doc/api/vm.markdown rename to doc/api/vm.md diff --git a/doc/api/zlib.markdown b/doc/api/zlib.md similarity index 100% rename from doc/api/zlib.markdown rename to doc/api/zlib.md diff --git a/src/node.cc b/src/node.cc index 612a11524e5f61..32f45e633b2d98 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3309,7 +3309,7 @@ static bool ParseDebugOpt(const char* arg) { static void PrintHelp() { // XXX: If you add an option here, please also add it to doc/node.1 and - // doc/api/cli.markdown + // doc/api/cli.md printf("Usage: node [options] [ -e script | script.js ] [arguments] \n" " node debug script.js [arguments] \n" "\n" diff --git a/tools/doc/README.md b/tools/doc/README.md index 0e8d48fbcb5544..fd041f001e6931 100644 --- a/tools/doc/README.md +++ b/tools/doc/README.md @@ -1,6 +1,6 @@ Here's how the node docs work. -1:1 relationship from `lib/.js` to `doc/api/.markdown` +1:1 relationship from `lib/.js` to `doc/api/.md` Each type of heading has a description block. diff --git a/tools/doc/addon-verify.js b/tools/doc/addon-verify.js index 5ff12d342c78b0..a6dca436383231 100644 --- a/tools/doc/addon-verify.js +++ b/tools/doc/addon-verify.js @@ -5,7 +5,7 @@ const path = require('path'); const marked = require('marked'); const rootDir = path.resolve(__dirname, '..', '..'); -const doc = path.resolve(rootDir, 'doc', 'api', 'addons.markdown'); +const doc = path.resolve(rootDir, 'doc', 'api', 'addons.md'); const verifyDir = path.resolve(rootDir, 'test', 'addons'); const contents = fs.readFileSync(doc).toString(); diff --git a/tools/doc/html.js b/tools/doc/html.js index feb99cd810415c..99a8cbf21a014b 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -15,7 +15,7 @@ var gtocPath = path.resolve(path.join( '..', 'doc', 'api', - '_toc.markdown' + '_toc.md' )); var gtocLoading = null; var gtocData = null; @@ -75,7 +75,7 @@ function render(lexed, filename, template, cb) { // get the section var section = getSection(lexed); - filename = path.basename(filename, '.markdown'); + filename = path.basename(filename, '.md'); parseText(lexed); lexed = parseLists(lexed); diff --git a/tools/doc/preprocess.js b/tools/doc/preprocess.js index 8f802714bcb126..295737a2a53aee 100644 --- a/tools/doc/preprocess.js +++ b/tools/doc/preprocess.js @@ -30,7 +30,7 @@ function processIncludes(inputFile, input, cb) { if (incCount === 0) cb(null, input); includes.forEach(function(include) { var fname = include.replace(/^@include\s+/, ''); - if (!fname.match(/\.markdown$/)) fname += '.markdown'; + if (!fname.match(/\.md$/)) fname += '.md'; if (includeData.hasOwnProperty(fname)) { input = input.split(include).join(includeData[fname]);