Sweet.apex

  • Docs
  • Tutorials
Docs Menu
  • Sweet.apex Core
    • Transpilation
    • Grammar
    • Command
    • Config
  • Features
    • Action
    • Apex Doc
    • Array Creation
    • Aspect
    • Cast
    • Default Value
    • Enum
    • File
    • Function
    • Identity
    • Injection
    • Lambda
    • Log
    • Mod
    • Not Null
    • Operator
    • Optional
    • Reflection
    • Rethrow
    • Switch
    • Template String
    • Template
    • Script
    • Tagged String
    • Annotation
    • Nullable
    • Var
    • Val
    • Map Access
    • Constructor
    • Transaction
    • Destructure
    • Import Static
    • Pipeline
    • Varargs
    • Patch
    • Import As
  • Plugin Development
    • Feature
    • Test Case

Command Guide

Command

Command

The main entry of Sweet.apex is a node.js command line tool. And you run it like this:

node transpile.js  

Command Arguments

The transpile.js expects three optional arguments.

node transpile.js [srcDir] [destDir] [features]
Argument NameDescription
srcDirThe source directory or the single file name, using './resources' by default
destDirThe destination directory, using './build' by default
featuresThe list of features enabled, separated by comma, using all features by default

Command Options

You can specify command options.

Option NameDescription
-vShow debug information
--perfShow performance information
-sSilent mode, disabling all prints
-cClean mode, removing all cache
-iIgnore errors, continuing even if a file fails
-hShow command line help
-eEmpty the generated class comment
-jGenerate JavaScript instead of Apex classes, for development purpose only

Contribute on Github! Edit this section.