-
Notifications
You must be signed in to change notification settings - Fork 1
3) In File Configurations
Oğuzhan edited this page Jul 20, 2022
·
2 revisions
In-File configurations are a set of information like in config.json
.
You can assign values to spesific keys using this and use those values.
Let's start with an example by showing how an example in-file config looks like in JSON: In-File Config:
// Hello this is a comment and won't affect your code!
// @variable this is a variable because it starts with @!
/**
* This is a comment too!
This is a comment too!
* You can do these which will be valid:
* @myVar hello
@mySecondVar hello2
@myThirdVar hello3
*********** @myFourthVar hello4
*/
JSON:
{
"variable": "this is a variable because it starts with @!",
"myVar": "hello",
"mySecondVar": "hello2",
"myThirdVar": "hello3"
}
Let's give an example that has every mechanic of it:
In-File Config:
/**
* @myVariable hello world!
* @myOtherVariable Is this a variable?
* @emptyHuh
* @thinking true
* @notThinking false
* @iAmNumber 1
* @notNumber NaN
* @zeroInGerman null
* @amINotDefined undefined
*/
JSON:
{
"myVariable": "hello world!",
"myOtherVariable": "Is this a variable",
"emptyHuh": true,
"thinking": true,
"notThinking": false,
"iAmNumber": 1,
"notNumber": NaN,
"zeroInGerman": null,
"amINotDefined": undefined
}