$ init
To start building a project outside of the platform, you can initiate the starting folders and files that BLDR needs to track, create, and update files. This allows you to set up nested folders and initiate any content blocks or emails needed for your project.
Currently, project initiation is only supported in Content Builder and Data Extensions.
flags | description |
---|---|
--cb | Initiate Content Builder Project |
--de | Initiate Data Extension |
--env-only | Setup Environment Variables for Project |
--update-env-keys | Update .sfmc.env.json keys found in content |
Initiate Project
During project initiation, you will be asked to provide a project name that will be used for your root folder name and be asked if you need a configuration file.
bldr init <context flag>
$ bldr init --cb
? Project Name: Welcome Emails
? Does your project need environment variables? (Y/n): n
What Gets Created
- Folders
- Root Context Folder
- Subfolder for Project
- Files
- .local.manifest.json
- .sfmc.env.json [optional with environment variables => Y]
- template.sfmc.env.json [optional with environment variables => Y]
- .gitignore [optional with environment variables => Y]
If you do not see .local.manifest.json, .sfmc.env.json, .gitignore
after running the command
On Mac: Open Finder, press Command + Shift + .(period)
On Windows: Open File Explorer, select View > Show > Hidden Items
File Definitions
.local.manifest.json
is the source of truth for your project that maps your assets to the assets in SFMC including folder paths and content..sfmc.env.json
is used to store keys/values that you don't want saved to version control and your compiled packages.template.sfmc.env.json
is used when you are using the configurations and is saved to version control and your compiled package. This file should be a mirror of.sfmc.env.json
without the values..gitignore
tells git to ignore specific files when pushing updates to your git provider.
Initiate Configuration Only
bldr init --env-only
Update Files With Config Keys
bldr init --update-env-keys
For full Environment Variable details, see Environment Variables