This package provides:
This package consumes:
Unofficial Salesforce ™ Commerce Cloud B2C uploader & manager for Atom.
Atomforce is a package for Atom, that with a simple interface in the Atom Status Bar, helps you upload files and cartridges in your Sandbox via WebDAV for the B2C development.
apm install atomforce
atomforce in the search box and press EnterAs required by the standard in the various npm Salesforce packages eg: (dwupload or sgmf-scripts), Atomforce also requires a file named dw.json in the root of the project, which is needed to enable connection to the WebDAV.
In the following indexes you can find most of the examples to be able to upload your files and cartridges to Sandbox correctly.
In order to create a connection file to the WebDAV it is available with Atomforce, an integrated provider for the autocompletion of the correct properties. Create a new dw.json file in the root of your SFCC project in order to auto-complete the file correctly.

However, it's possible to consult the attributes of the properties and the mandatory fields for the right connection, here.
| Keyword | Mandatory | Type | Description |
|---|---|---|---|
hostname |
true |
string |
The Hostname of your sandbox without the https protocol. The name must end before /on/demandware.store/. |
username |
true |
string |
The username used to access on your Sandbox. The same value of the field that in "Sandbox Istance" is called login. In some sandboxes with the SFRA architecture the username, corresponds to the username used in account.demandware.com |
password |
true |
string |
The password used to access on your Sandbox. In some sandboxes with the SFRA architecture the password, corresponds to the password used in account.demandware.com |
code-version or version |
true |
string |
The version of the code active in your Sandbox. You can check the version in Administration > Site Development > Code Deployment. |
root |
false |
string |
Root option allows for path resolution of the file to upload relative to a directory. |
cartridges |
false |
array |
List of cartridges to be uploaded and viewed by the watcher filesystem. |
p12 |
false |
string |
The absolute path of p12 file necessary for two-factor authentication. If hostname key contains cert initials, this key become mandatory. |
passphrase |
false |
string |
The keyword necessary for two-factor authentication. If p12 is set, passphrase become mandatory. |
A final example of how the file should be structured.
Remember to add the
dw.jsonfile in your.gitignoreto avoid committing your Sandbox credentials!.
{
"hostname": "dev01-eu01-sample.demandware.net",
"username": "username",
"password": "mypassword",
"code-version": "version1"
}
Atomforce supports 2FA (Two-factor Authentication).
The p12 key can be added to the dw.json file, and the path of where the p12 certificate file is allocated as the value. The passphrase key is also required, where the keyword required for authentication is indicated as the value.
{
"hostname": "cert.staging.eu01.sample.demandware.net",
"username": "username",
"password": "mypassword",
"code-version": "version1",
"p12": "absolutepath/to/certificate.p12",
"passphrase": "keyword"
}
Root option allows for path resolution of the file to upload relative to a directory on WebDAV.
To better understand this option, suppose we have the following structure.
cartridges/
├── app_storefront_base/
├── plugin_ups/
├── plugin_wishlist/
└── README.md
In this structure in the WebDAV the cartridges folder will also be uploaded, to avoid this, just insert the initial path in the value of root, where the cartridges are allocated.
{
"hostname": "dev01-eu01-sample.demandware.net",
"username": "username",
"password": "mypassword",
"code-version": "version1",
"root": "cartridges"
}
If the value of root is: . the full path will be considered, so the cartridges folder will also be uploaded in the WebDAV. If the path of your cartridges is on several levels: cartridges/src just indicate the complete path. Final slash is not required.
The cartridges option allows you to stay in watch on one or more cartridges and upload these accordingly in WebDAV. If this option is not defined in the dw.json file, the watcher filesystem will listen all event (add, change and delete) to all files and folders in the project root or path indicated in the root option, and all files and folders will be uploaded.
{
"hostname": "dev01-eu01-sample.demandware.net",
"username": "username",
"password": "mypassword",
"code-version": "version1",
"root": "cartridges",
"cartridges": ["app_storefront_base", "plugin_ups"]
}
To improve the development workflow in Salesforce Commerce Cloud we recommend installing the .isml & .ds syntax, snippets and autocompletion package.
Format Files On Save enabled)Before cloning the repository, make sure you have node.js installed on your OS.
git clone https://github.com/matteobertoldo/atomforce.gitcd atomforceapm installapm linkPlease read CONTRIBUTING.md for details on code of conduct, and the process for submitting pull requests.
Atomforce is licensed under the MIT License - see the LICENSE.md file for details.