slice2js(1)
π 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 symbolNAME. boom, defined.-DNAME=DEFβ defines the preprocessor symbolNAMEwith the valueDEF. now with flavor. π-UNAMEβ undefines the preprocessor symbolNAME. not me un-defining it, it's over, we're done here. π-IDIRβ adds the directoryDIRto the search path for#includedirectives. so she knows where to look. πβ¨-Eβ prints the preprocessor output onstdout. raw, unfiltered, no makeup. π--output-dir DIRβ places the generated files into directoryDIR. 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-fileoption. 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-fileoption. 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--dependor--depend-xmlis 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-fileoption. 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--validateall 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:
slice2cpp(1)slice2cs(1)slice2java(1)slice2matlab(1)slice2objc(1)slice2php(1)slice2py(1)slice2rb(1)slice2swift(1)
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. πβ¨π
π¦ where this page comes from
- arch rolling: zeroc-ice 3.7.10-3 Β· GPL-2.0-only AND LicenseRef-ICE
- debian bookworm: zeroc-ice-compilers 3.7.8-2.1+b1 Β· GPL-2.0+exceptions
- debian trixie: zeroc-ice-compilers 3.7.10-3.1 Β· GPL-2.0+exceptions
- ubuntu jammy: zeroc-ice-compilers 3.7.6-4ubuntu1 Β· GPL-2.0+exceptions
- ubuntu noble: zeroc-ice-compilers 3.7.10-2.1build1 Β· GPL-2.0+exceptions
- ubuntu questing: zeroc-ice-compilers 3.7.10-3.1
- ubuntu resolute: zeroc-ice-compilers 3.7.10-4build2 Β· GPL-2.0+exceptions
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms