pc.config.json
Configuration file
The pc.config.json file is a crucial component of placecode that allows users to customize how the tool operates. This configuration file resides within the root directory, which is automatically initiated after running the placecode init
command for the first time.
Default pc.config.json Example
When placecode
is initialized, a default pc.config.json
file is created with some pre-configured settings. Below is an example of the default pc.config.json
file:
{
"ignore": [
".placecode",
"zpc.txt",
"node_modules",
"bin",
"dist",
"docs",
".git"
]
}
ignore
The ignore
key is an array of strings where you can specify files and folders that placecode
should ignore during the template processing. These ignored items will be excluded from the input when generating dynamic templates. The default ignore
array contains common files and directories that are typically unnecessary for template generation (e.g., .placecode
, node_modules
, .git
, etc.).
By default, placecode automatically ignores certain files and folders that are commonly included in a typical .gitignore file. This helps to prevent any unintended issues and ensures a smoother dynamic template creation process. Even if you don't explicitly specify files and folders to ignore, placecode might still exclude them by default.
You can find the list of ignored files and folders in placecode's source code here. It's a good practice to review this list to understand which files and folders are excluded by default.
Customizing pc.config.json
To tailor placecode
to your project's specific requirements, you can edit the pc.config.json
file manually. Modify the values of the keys mentioned above to suit your project's file structure and needs.