DOKK / manpages / debian 11 / node-umd / umd.1.en
umd(1) General Commands Manual umd(1)

umdUniversal Module Definition for use in automated build systems

umd [-c] name

umd (Universal Module Definition) is a common pattern used in javascript programming allowing one to write once a loader working in different context (server, browser). This loader is compatible with different API like RequireJS, AMD or CommonJs. This command provides simple synchronous wrapping of a string, return style module support, CommonJS support and support preventing internal UMDs from conflicting. Required parameter name is used for exporting module.

--commonJS
Use CommonJS module format

umd -c my-module < my-module.js > my-module.umd
cat my-module.js | umd my-module | uglifyjs > my-module.umd.min.js

nodejs(1)

10/4/17