Package Exports
- node-amd
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-amd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-amd
Aim of this project is to make AMD modules usable in nodejs. Useful for reusing client-side data model code on the server-side.
Why do you not use amdefine?
amdefine forces one to add this -> if (typeof define !== 'function') { var define = require('amdefine')(module) } to each module, which is inconvenient. node-amd declares globals.
Usage
require('./node-amd.js');
requirejs.config({
baseUrl: '../../http-dev/',
paths: {
jquery: 'lib/jquery/dist/jquery'
}
});
define(['web/model/BaseModel', 'jquery'], function (BaseModel, $) {
//...
});Not supported yet
- requirejs() function.
- http/https URLs in dependencies.
- Windows support.
- CommonJS Wrapper style.