Wondering what’s next for npm?Check out our public roadmap! »

sfcc-deploy

2.1.0 • Public • Published

NPM version Downloads Dependencies star this repo fork this repo Build Status Code Style

sfcc-deploy

Deploy cartridges to a Salesforce Commerce Cloud (SFCC) instance.

Screenshot

Installation

$ yarn add sfcc-deploy --dev

General

Uploads a set of SFCC cartridges to an instance. Additionally you can extend it with additional tasks.

Usage

The credentials object is the same as the config for dwdav.

const sfccDeploy = require('sfcc-deploy');
 
const config = {
  hostname: 'host.name.net',
  username: 'login',
  password: 'password',
  p12: 'path/to/cert.p12', // two factor authentication
  passphrase: 'certpassphrase', // two factor authentication
};
 
const version = '0.5.1';
 
sfccDeploy({
  credentials: config,
  version,
 
  root: './dist/', // default: './dist/'
});

It's also possible to add additional tasks (executed after code upload).

const activateCodeVersion = {
  name: ({ options: { version } }) => `Activating code version: ${version}`, // also takes a simple string
  condition: 'activateCodeVersion', // the flag name needed to active the task
  emoji: 'fast_forward',
  fn: (params) => {
    // ...
  },
};
 
sfccDeploy({
  credentials: config,
  version,
 
  activateCodeVersion: true, // this flag is needed to activate the additional step
  additionalSteps: [
    activateCodeVersion,
  ],
});

The emoji name must one of the available emojis from this list. Following information are passed as object to the name and fnfunctions:

Property Description
options The config object of the sfccDeploy() call
dwdav The dwdav instance used for upload
rootDir The root directory
step The current step (see https://www.npmjs.com/package/cli-step#a-single-step-️)
stepText The text of the step

License

MIT © 2020 Jens Simon

Install

npm i sfcc-deploy

DownloadsWeekly Downloads

17

Version

2.1.0

License

MIT

Unpacked Size

37.1 kB

Total Files

5

Last publish

Collaborators

  • avatar