Giter Site home page Giter Site logo

sfcc-deploy's Introduction

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-%EF%B8%8F)
stepText The text of the step

License

MIT © 2021 Jens Simon

sfcc-deploy's People

Contributors

jenssimon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.