COMMONIZE(1)

πŸ“¦
version 0.15.2+~0.10.8 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute

πŸ’– 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 @providesModules pragma 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 is utf8 ✨
  • --output-charset <utf8 | win1252 | ...> β€” charset of the output. default is also utf8 πŸŽ€
  • -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