11 Commits

Author SHA1 Message Date
Jeff Williams
fd5ca944d2 abolish the post-install script and template/plugin copying (#519, #612)
JSDoc has a few requirements that are somewhat unusual for a Node.js app:

1. We need `require('jsdoc/foo')` to work from any module.
2. We need `require('jsdoc/foo')` to work from external code, such as templates and plugins.

Prior to this commit, JSDoc did two separate things to meet these requirements:

1. Use an npm post-install script to create a symlink from `lib/jsdoc` to `node_modules/jsdoc`.
2. When a user runs JSDoc, copy templates and plugins into the JSDoc directory.

These fixes worked, sort of. But they also caused numerous issues with file permissions, especially on Windows.

We now use the Requizzle module, which hacks the Node.js module system to support JSDoc's use cases. There's no longer a post-install script, and there's no need for a symlink in `node_modules`.
2014-06-09 17:27:06 -07:00
Jeff Williams
597a09dd76 on Windows, don't discard the symlink error (#519) 2014-04-13 08:36:51 -07:00
Jeff Williams
63d0582516 fix error when installing dev dependencies 2013-12-25 09:37:16 -08:00
Jeff Williams
3eca4516d0 more decrufting 2013-12-24 21:21:36 -08:00
Jeff Williams
f55feb1a0e 'use strict'ify 2013-11-11 23:49:54 -08:00
Jeff Williams
8d36f92e7a fix Node.js postinstall script on Windows
should now work on Windows XP and in shells without admin privileges
2013-11-09 10:58:04 -08:00
Jeff Williams
f7256d8d07 make npm installs work correctly; misc cross-platform fixes; cleanup
includes new Rhino jar that strips hashbangs before execution:
https://github.com/jsdoc3/rhino/commit/95487737
2013-11-02 23:14:04 -07:00
Jeff Williams
de4297b20b refactor jsdoc.js; update Rhino
- Switched to a new Rhino fork: https://github.com/jsdoc3/rhino
  (currently reflects mozilla/rhino HEAD + enhancements for JSDoc)
- Removed jsdoc/util/global; new Rhino fork provides a `global` alias
  just like Node.js
- Moved most of jsdoc.js into cli.js, and refactored for clarity
2013-10-27 10:46:27 -07:00
Jeff Williams
751bea1b0a fixes for Node.js compatibility (see details)
- new Rhino .jar to help find module paths
(https://github.com/hegemonic/rhino/commit/31b70105)
- make __dirname and process.cwd() provide the current module path; use
only env.dirname for JSDoc's home dir; fix callers
- get rid of jsdoc/util/include (and update test framework accordingly)
- avoid running Rhino/Node.js tests on the wrong runtime
- remove support for global 'publish' function, which relied upon
jsdoc/util/include
- update jsdoc/util/dumper for consistency with Node.js'
JSON.stringify()
- fix jsdoc/util/runtime to detect Node.js correctly
- add Node.js versions of jsdoc/fs and jsdoc/path
- other minor cleanup
2013-10-25 23:30:56 -07:00
Jeff Williams
8847733e08 remove unused file 2013-10-21 08:56:29 -07:00
Jeff Williams
c058a60ed1 hook up node visitors; gratuitous refactor of 'runtime' module (formerly 'vm'); move runtime-specific code
includes updated Rhino jar:
https://github.com/hegemonic/rhino/commit/b63c00d5
2013-07-05 09:11:27 -07:00