slice2js(1)

πŸ“¦
version 3.7.10 Β· 2 versions
, in arch rolling, debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute

πŸ’– slice2js β€” the Slice to JavaScript compiler πŸ’–

okay bestie, sit down, hydrate, and let me tell you about slice2js, a certified icon from the General Commands Manual section of the slice2js(1) page. she compiles Slice files into JavaScript and she does it flawlessly, no cap. πŸ¦‹


✨ SYNOPSIS ✨

slice2js [options] [files]

that's it. that's the whole vibe. options, then your files. slay. πŸ’…


🌸 DESCRIPTION 🌸

so slice2js takes your Slice files and compiles them into JavaScript. simple as that, and honestly? iconic behavior. πŸŽ€

and listen β€” during this compilation, the macro __SLICE2JS__ gets defined. not me dropping that little detail on you, it matters, iykyk. ✨

if you want the full documentation for slice2js (the whole encyclopedia of it, the director's cut), it's available online at:

https://doc.zeroc.com/ice/3.7/language-mappings/javascript-mapping/client-side-slice-to-javascript-mapping/slice2js-command-line-options

go read it when you're done here, it's giving extra credit. πŸ“šπŸ’œ


πŸ‘‘ OPTIONS πŸ‘‘

here's the part where we go through every single flag one by one, because we do not skip. not on my watch. πŸ™ˆ

  • -h, --help β€” shows you the help message. the "hi bestie, here's what i do" of it all. 🫢
  • -v, --version β€” shows you the compiler version. know your queen's era. πŸ‘‘
  • -DNAME β€” defines the preprocessor symbol NAME. boom, defined.
  • -DNAME=DEF β€” defines the preprocessor symbol NAME with the value DEF. now with flavor. 🌈
  • -UNAME β€” undefines the preprocessor symbol NAME. not me un-defining it, it's over, we're done here. πŸ’€
  • -IDIR β€” adds the directory DIR to the search path for #include directives. so she knows where to look. πŸ”βœ¨
  • -E β€” prints the preprocessor output on stdout. raw, unfiltered, no makeup. πŸ’…
  • --output-dir DIR β€” places the generated files into directory DIR. put them in their own little home, they deserve it. πŸ πŸ’–
  • -d, --debug β€” prints debug information showing the operation of the Slice parser. the behind-the-scenes footage. πŸ”₯
  • --depend β€” prints dependency information to standard output by default, or to the file specified by the --depend-file option. no code is generated when this option is specified. so like, it's just the receipts, no actual output. 😭
  • --depend-xml β€” prints dependency information in XML format, to standard output by default, or to the file specified by the --depend-file option. again: no code is generated when this option is specified. XML girlies rise up. πŸŽ€
  • --depend-file FILE β€” directs dependency information to the specified file. the output format depends on whether --depend or --depend-xml is also specified. (or --depend-json, she's part of the family too, see below πŸ‘‡)
  • --depend-json β€” prints dependency information in JSON format to standard output by default, or to the file specified by the --depend-file option. no code is generated when this option is specified. json stans, this one's for you. πŸ“
  • --validate β€” checks the provided command-line options for correctness, and does not generate any code. a little vibe check on your flags. βœ…
  • --stdout β€” prints generated code to standard output. straight to your terminal, main character energy. 🌟
  • --typescript β€” generates TypeScript declaration files. yes bestie, we're doing types now, we're being responsible. πŸ’œ
heads up queen: --depend, --depend-xml, --depend-json, and --validate all mean no code gets generated. don't come crying to me when your output folder is empty, i warned you. 🫢

🌈 SEE ALSO 🌈

the whole friend group, fr fr:


and that's the page, bestie!! πŸŽ‰ this was slice2js(1) straight out of the General Commands Manual β€” go forth, compile your Slice, and be iconic about it. mwah. πŸ’‹βœ¨πŸŽ€