Davos - Your trusty WebDav companion.
Davos is a WebDav client which is well suited to upload and sync your Cloud Commerce Digital projects. It fully mimics the usage of Eclipse Demandware server configurations featuring profiles and synchronization on file change.
npm i -g davos-cli
In order to use davos you must first provide a
davos.json file which essentially contains a JSON array with profiles.
You can use
davos-cli to interactively create this file and manage profiles.
To create the configuration file you can run 'davos-cli create'.
You could easily insert profiles (dev01, dev02, development etc.) by running the 'davos-cli insert'.
Running the 'davos-cli list' command will display a list of your profiles and will show which profile is active now.
To switch your active profile you can run 'davos-cli switch [name of profile]'.
Upload and watch cartridges
Now that you have a configuration you could upload your cartridges or watch for changes:
- Run the 'davos-cli upload:cartridges' command to upload all your cartridges.
- Run the 'davos-cli upload:cartridges --cartridge [name of cartridge]' command to upload a single cartridge of your wish.
- Run the 'davos-cli watch' command to watch all your cartridges for changes.
- Run the 'davos-cli watch --cartridge [name of cartridge]' command to watch a single cartridge of your wish for changes.
Upload and import meta
Davos can upload and import your entire sites meta or separate metadata files of your choice.
davos-cli upload:sitesto upload and import your entire sites directory.
davos-cli upload:meta --pattern *.xmlto upload and import only the files mattching your pattern from your
Davos can create bundles from multiple xml files or split bundles into separate files. At this point you can merge any type of xml files sharing the same root element but can only split meta and library files. This functionality will be expanded in the future.
davos-cli merge [pattern] --out bundle.xmlto merge all files matching
patternfrom within the
bundle.xmlin your cwd.
davos-cli split:meta [path/to/bundle.xml] --out dir/for/chunksto split all custom and system type extensions and definitions into separate xml files.
davos-cli split:lib [path/to/bundle.xml] --out dir/for/chunksto split all
contentelements of a library bundle.
Configuration file specification
table 1. Profile
|active||Boolean||The active profile will be used by davos. There should only be one active profile at a time.|
|profile||String||The name of the profile.|
|config||Object||The profile configuration object, see table 2.|
table 2. Profile configuration
|hostname||String||The sandbox' hostname|
|codeVersion||String||The code version to which to deploy your cartridges|
|tmpDir||String||A directory where temporary files and archives will be stored. This is optional and defaults to "tmp"|
|projectID||String||The project name/ID|
|metaDir||String||The base directory for the sites files. This is optional, defaults to "sites".|