A command line tool to generate Apex templates based on the Apex Enterprise Patterns (FFLIB)
Table of content:
wget -O ~/.local/bin/sft https://github.com/wimvelzeboer/fflib-templates/releases/download/v0.1.2/sft
chmod +x ~/.local/bin/sft
wget -O /usr/local/bin/sft https://github.com/wimvelzeboer/fflib-templates/releases/download/v0.1.2/sft-macos
chmod +x /usr/local/bin/sft
https://github.com/wimvelzeboer/fflib-templates/releases/download/v0.1.2/sft.exe
Download the file to a folder that is either added in the PATH or add the folder to it.
Usage:
sft create domain [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>
Options:
-a, --api <API_VERSION> Sets the api version, defaults to: 62.0
-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)
-t, --type Sets the (S)ObjectType
-s, --suffix Sets an optional suffix for the class name
-p, --prefix Sets an optional prefix for the class name
-h, --help Print help
Example:
sft create domain --name Accounts --type Account
This creates the following files:
- Accounts.cls
- Accounts.cls-meta.xml
- IAccounts.cls
- IAccounts.cls-meta.xml
- AccountsTest.cls
- AccountsTest.cls-meta.xml
Usage:
sft create selector [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>
Options:
-a, --api <API_VERSION> Sets the api version, defaults to: 62.0
-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)
-t, --type Sets the (S)ObjectType
-s, --suffix Sets an optional suffix for the class name
-p, --prefix Sets an optional prefix for the class name
-h, --help Print help
Example:
sft create selector --name Accounts --type Account
This creates the following files:
- AccountsSelector.cls
- AccountsSelector.cls-meta.xml
- IAccountsSelector.cls
- IAccountsSelector.cls-meta.xml
- AccountsSelectorTest.cls
- AccountsSelectorTest.cls-meta.xml
Usage:
sft create service [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>
Options:
-a, --api <API_VERSION> Sets the api version, defaults to: 62.0
-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)
-t, --type Sets the (S)ObjectType
-s, --suffix Sets an optional suffix for the class name
-p, --prefix Sets an optional prefix for the class name
-h, --help Print help
Example:
sft create service --name Accounts --type Account
This creates the following files:
- AccountsService.cls
- AccountsService.cls-meta.xml
- IAccountsService.cls
- IAccountsService.cls-meta.xml
- AccountsServiceImpl.cls
- AccountsServiceImpl.cls-meta.xml
- AccountsServiceTest.cls
- AccountsServiceTest.cls-meta.xml
- AccountsServiceImplTest.cls
- AccountsServiceImplTest.cls-meta.xml
Usage:
sft create base [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>
Options:
-a, --api <API_VERSION> Sets the api version, defaults to: 62.0
-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)
-t, --type Sets the (S)ObjectType
-s, --suffix Sets an optional suffix for the class name
-p, --prefix Sets an optional prefix for the class name
-h, --help Print help
Example:
sft create base --name Accounts --type Account