node-amd-require is a small script which adds AMD-style path resolution and
define support to node's
require() function. It can be used as an AMD
loader or to add path
configuration support to
npm install node-amd-require
require node-amd-require in your project's main entry point and call with
your desired AMD-style
packages. Also supports the
/* [your index.js file or similar] *///configuration frombaseUrl: '.'paths:"deferreds": "src""mout": "lib/mout";var path = ;var fs = ;//...
Or pass a path to a .json file containing your configuration:
/* [your index.js file or similar] */'/path/to/config.json';var path = ;var fs = ;//...
requirefor AMD and/or CommonJS modules
defineand RequireJS loader plugin support to
requirevia amdefine and the require.extensions mechanism.
requireon your possibly-AMD-format scripts (such as grunt and mocha). More on that is in this requirejs issue.
define(AMD module support) is only added when
requireis called into your project (any file calls `require("/file/inside/your/project.js"))
Released under the MIT License.