COMMONIZE(1)
π COMMONIZE(1) π
okay bestie, gather round, because this is commonize, the JavaScript transpiler that turns your code into Node-compatible CommonJS. she's a user command, she's 0.10.8, and she is literally here to make your modules make sense. no cap. β¨
πΈ NAME πΈ
commonize β JavaScript transpiler to Node-compatible CommonJS π¦
π SYNOPSIS π
commonize [options] <source directory> <output directory> [<module ID>
[<module ID> ...]]
so you give her a source directory, you give her an output directory, and if you're feeling extra you can hand her one or more <module ID>s too. main character energy fr fr. π
β¨ OPTIONS β¨
-V,--versionβ spits out the version number. that's it, that's the whole job π-c,--config [file]β a JSON configuration file. if you give her no file, or you literally just pass-, she reads from STDIN. versatile queen π-w,--watchβ continually rebuild. she just. keeps. going. obsessed with her stamina honestly π₯-x,--extension <js | coffee | ...>β the file extension she assumes when resolving module identifiers. tell her what flavor your files are π--relativizeβ rewrites all module identifiers to be relative. all of them. every single one. no exceptions π--follow-requiresβ scans modules for required dependencies, like a lil detective with a clipboard πβ¨--use-provides-moduleβ respects the@providesModulespragma in files. she respects it π«Ά--cache-dir <directory>β alternate directory to use for the disk cache. put your cache somewhere else if you want π--no-cache-dirβ disables the disk cache entirely. no cache, no problem, we die like legends π--source-charset <utf8 | win1252 | ...>β charset of the source. default isutf8β¨--output-charset <utf8 | win1252 | ...>β charset of the output. default is alsoutf8π-h,--helpβ displays help for the command. she'll explain herself, she's not shy π
lowkey important: both charset options default to utf8, so if you don't say anything she just assumes utf8 on the way in and on the way out. that's the vibe. π
and that's the whole page, bestie!! go forth and commonize your little heart out π§
this was commonize version 0.10.8, dated October 2023 β mwah, love that for her ππ
π¦ where this page comes from
- debian trixie: node-commoner 0.15.2+~0.10.8-1 Β· MIT
- ubuntu noble: node-commoner 0.15.2+~0.10.8-1 Β· MIT
- ubuntu resolute: node-commoner 0.15.2+~0.10.8-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms