You can use the SFRA command-line upload tool to upload your code.
dw.json
file.
dw.json
file is automatically created if the
sgmf-scripts
createCartridge
build tool command is used to create the cartridge.
However, for some cartridges, such as the app_storefront_base
and
modules
cartridges provided by B2C Commerce, you must create the
dw.json
file and add it to the cartridge. Create the
dw.json
file in the top-level folder of the repository, as a sibling of
the cartridges
directory.dw.json
file contains the information required to establish a
server connection and the code version to upload your cartridges to.
{
"hostname": "yoursandbox-inside-your-realm.demandware.net",
"username": "yourusername",
"password": "yourpwd",
"code-version": "version1"
}
To upload all cartridges for the repository, use
uploadCartridge
:
npm run uploadCartridge
To upload a specific cartridge, use uploadCartridge
with the name
of the cartridge:
npm run uploadCartridge mycartridge
To upload a single file, use upload
.
npm run upload path/to/my/filename.ext
To detect changes to files in your cartridge and automatically upload them to the
server, use watch
.
app_storefront_base
cartridge,
run:npm run watch
The watch
command makes it simple to keep the code on your sandbox
instanace up-to-date.
dw.json
file.
The command-line watch
and upload
commands are wrappers
for the Dwupload project. Download the project from GitHub if you want to
contribute.
© Copyright 2000-2023, Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. |
Show URL | Submit Feedback | Privacy Policy |