Ryan Graham
5ac6f4de13
doc: improve module documentation
Expands on when to use module.exports vs. exports. This is a recurring
question on mailing list and continues to confuse new devs.
11 years ago
Ryan Graham
1deeab29f2
doc: improve exports/module.exports consistency
While they reference the same object, they are only interchangeable
for updates, not assignment.
12 years ago
Ryan Graham
93391ae9cb
doc: clarify exports and module.exports
When exporting a single function you must use `module.exports` instead
of the `exports` convenience reference.
12 years ago
Trent Mick
196207c228
node: remove unused flags and files
Drop vestigial `process.installPrefix`, `node --vars`, NODE_CFLAGS and
NODE_PREFIX.
Also removed unused node_config.h.in (replaced with config.gypi a while back).
13 years ago
isaacs
2d44dcc8be
doc: Add stability indicators to documentation
13 years ago
isaacs
e88a1ba74a
doc refactor: modules
13 years ago
isaacs
0cf7156f08
doc refactor: modules
13 years ago
Nathan Rajlich
ec11525d33
docs: Add docs for MODULE_NOT_FOUND error.
13 years ago
kyle@dontkry.com
34f34e4411
docs: fix typo
Fixes #2193 .
13 years ago
koichik
1b55010a04
docs: added .json modules.
13 years ago
isaacs
4f91b72dbe
Fix #1851 Correct X/index doc
13 years ago
isaacs
ff942c6b39
Fix #1851 Correct X/index doc
13 years ago
isaacs
dc8f4eed53
Fix #1694 Document require() cycles
13 years ago
isaacs
703a1ffe52
Revert "AMD compatibility for node"
This reverts commit 9967c369c9
.
Conflicts:
test/simple/test-module-loading.js
14 years ago
isaacs
bf0802402d
Note that require.paths is gone in 0.5
Rather than say it "may disappear", let's just be clear that it *has*
disappeared, and exactly how long it'll be supported for.
14 years ago
koichik
3eb246485a
Doc improvements
14 years ago
isaacs
448eab2587
Close #1349 Delimit NODE_PATH with ; on Windows
14 years ago
isaacs
7f0047c2d5
Close #1348 Remove require.paths
Module.globalPaths is still set to a read-only copy of the global
include paths pulled off of the NODE_PATH environment variable.
It's important to be able to inspect this, but modifying it no longer
has any effect.
14 years ago
isaacs
ebc4d5cd29
Remove duplicate docs about main module
14 years ago
isaacs
9b5098f509
Close #1281 Make require a public member of module
Reviewed by @felixge
14 years ago
koichik
432d54900e
Remove duplicate section in modules.markdown
Fixes #1263
14 years ago
Mathias Buus
39246f65df
Closes #1177 remove one node_modules optimization
to better support certain project structures.
14 years ago
isaacs
9967c369c9
AMD compatibility for node, with docs and tests
Closes #1173
Closes #1170
14 years ago
Trevor Burnham
f46811633c
Documenting `require.main`, fixing #997
14 years ago
isaacs
249361cab7
Close #1054 More clear documentation for module system
14 years ago
Trevor Burnham
31ed87b0a9
Documenting `require.main`, fixing #997
14 years ago
Ryan Dahl
d2298d225c
Add documentation around module.exports and scope of global objects
Closes GH-852.
14 years ago
Ryan Dahl
ffb3ee6084
Remove reference to CommonJS in documentation
14 years ago
isaacs
3599c71dae
Closes GH-690 node_modules folders should be highest priority
14 years ago
Ryan Dahl
839fb8e19b
typos
14 years ago
Ryan Dahl
daeb5c9e8f
fix doc
thanks Toshihiro
14 years ago
Ryan Dahl
43bc1d7ec8
Edit module docs
14 years ago
isaacs
ff39d413a3
Document module loading
14 years ago
isaacs
46513483cd
node_modules module lookup, +docs and test.
14 years ago
Ryan Dahl
a98d0717e8
Remove incorrect doc about node_modules
14 years ago
isaacs
da2f4b2dc4
support for package.json
This adds basic support for situations where there is a package.json
with a "main" field. That "main" module is used as the code that is
loaded when the package folder is required.
14 years ago
Ryan Dahl
8f23583d10
A few spelling fixes.
Thanks Bjarki. Closes GH-561.
14 years ago
Silas Sewell
11b2ee7632
Various doc tweaks (2-spaces vs tabs, EOL-whitespace, repl prompt, "world" vs "World", etc...)
14 years ago
Micheil Smith
e190c9616e
Splitting documentation
14 years ago