Skip to content

Commit 1e3eedf

Browse files
committed
Init
1 parent 4a4a934 commit 1e3eedf

31 files changed

+552
-1
lines changed

.eslintignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**/lwc/**/*.css
2+
**/lwc/**/*.html
3+
**/lwc/**/*.json
4+
**/lwc/**/*.svg
5+
**/lwc/**/*.xml
6+
**/aura/**/*.auradoc
7+
**/aura/**/*.cmp
8+
**/aura/**/*.css
9+
**/aura/**/*.design
10+
**/aura/**/*.evt
11+
**/aura/**/*.json
12+
**/aura/**/*.svg
13+
**/aura/**/*.tokens
14+
**/aura/**/*.xml
15+
**/aura/**/*.app
16+
.sfdx

.forceignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2+
# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3+
#
4+
5+
package.xml
6+
7+
# LWC configuration files
8+
**/jsconfig.json
9+
**/.eslintrc.json
10+
11+
# LWC Jest
12+
**/__tests__/**

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This file is used for Git repositories to specify intentionally untracked files that Git should ignore.
2+
# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore
3+
# For useful gitignore templates see: https://github.com/github/gitignore
4+
5+
# Salesforce cache
6+
.sf/
7+
.sfdx/
8+
.localdevserver/
9+
deploy-options.json
10+
11+
# LWC VSCode autocomplete
12+
**/lwc/jsconfig.json
13+
14+
# LWC Jest coverage reports
15+
coverage/
16+
17+
# Logs
18+
logs
19+
*.log
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# Dependency directories
25+
node_modules/
26+
27+
# Eslint cache
28+
.eslintcache
29+
30+
# MacOS system files
31+
.DS_Store
32+
33+
# Windows system files
34+
Thumbs.db
35+
ehthumbs.db
36+
[Dd]esktop.ini
37+
$RECYCLE.BIN/
38+
39+
# Local environment variables
40+
.env

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run precommit

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# List files or directories below to ignore them when running prettier
2+
# More information: https://prettier.io/docs/en/ignore.html
3+
#
4+
5+
**/staticresources/**
6+
.localdevserver
7+
.sfdx
8+
.vscode
9+
10+
coverage/

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"trailingComma": "none",
3+
"overrides": [
4+
{
5+
"files": "**/lwc/**/*.html",
6+
"options": { "parser": "lwc" }
7+
},
8+
{
9+
"files": "*.{cmp,page,component}",
10+
"options": { "parser": "html" }
11+
}
12+
]
13+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"salesforce.salesforcedx-vscode",
4+
"redhat.vscode-xml",
5+
"dbaeumer.vscode-eslint",
6+
"esbenp.prettier-vscode",
7+
"financialforce.lana"
8+
]
9+
}

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch Apex Replay Debugger",
9+
"type": "apex-replay",
10+
"request": "launch",
11+
"logFile": "${command:AskForLogFileName}",
12+
"stopOnEntry": true,
13+
"trace": true
14+
}
15+
]
16+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"search.exclude": {
3+
"**/node_modules": true,
4+
"**/bower_components": true,
5+
"**/.sfdx": true
6+
}
7+
}

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1-
# apex-consts
1+
[More details TBD]
2+
3+
# Consts
4+
5+
The framework that allows keeping your apex's consts in an ordered way.
6+
7+
## How it works?
8+
9+
All concrete classes are created as a *singleton*, so each class is initialized once during the transaction. To decrease heap size getters and setters are in use. It means that class will be *initialized on demand*, not always. e.g execution of `Consts.ACCOUNT.TYPE.PROSPECT` will create instance of `AccountConsts` only, without creating `ContactConsts`.
10+
11+
Code Architecture is following *Open/Close* and *Single Responsibility Principle*. It means that code is easy to extend, and each class is responsible only for specific set of consts.
12+
13+
## How to use?
14+
15+
```java
16+
System.debug(Consts.ACCOUNT.TYPE.PROSPECT); // 'Prospect'
17+
System.debug(Consts.ACCOUNT.RATING.HOT); // 'Hit'
18+
19+
System.debug(Consts.CONTACT.API_NAME); // 'Contact'
20+
System.debug(Consts.CONTACT.LEAD_SOURCE.WEB); // 'Web'
21+
22+
System.debug(Consts.OPPORTUNITY.TYPE.EXISTING_CUSTOMER_DOWNGRADE); // 'Existing Customer - Downgrade'
23+
```

0 commit comments

Comments
 (0)