Skip to content

devopsgroup-io/veeva

Repository files navigation

Veeva

NPM version

A CLI and templating toolkit to streamline development of Veeva CLM Presentations.

If you're developing and managing multiple Veeva CLM projects, it can be time-consuming to manage consistent code and workflows. This package centralizes core functionality for building and deploying Veeva CLM Presentations.


✨ Features

  • πŸ“ Centralized configuration via configuration.yml
  • 🧩 Template and partial support using Handlebars
  • 🎨 Sass compilation (minified and unminified)
  • πŸ”— Relative link conversion to veeva: protocol links
  • πŸ–ΌοΈ Automatic screenshot, thumbnail, and zip generation
  • 🧾 iRep control file generator
  • πŸ“„ Vault Multichannel Loader CSV file generator
  • πŸ” Development mode with live reload and file watching

πŸ“˜ Table of Contents

  1. Getting Started
  2. File Structure
  3. Working with Source Files
  4. Configuration Options
  5. CLI Tasks & Workflow
  6. Troubleshooting & FAQ

πŸš€ Getting Started

Prerequisites

Ensure the following dependencies are installed:

Installation

npm install veeva --save

πŸ“ File Structure

Place the following structure in your project root directory:

root/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”œβ”€β”€ scss/
β”‚   β”‚   └── js/
β”‚   └── templates/
β”‚       β”œβ”€β”€ data/
β”‚       β”‚   └── clm.yml
β”‚       β”œβ”€β”€ includes/
β”‚       β”œβ”€β”€ layouts/
β”‚       └── pages/
β”‚           β”œβ”€β”€ shared/
β”‚           β”‚   β”œβ”€β”€ fonts/
β”‚           β”‚   β”œβ”€β”€ images/
β”‚           β”‚   β”œβ”€β”€ isi.hbs
β”‚           β”‚   └── terms.hbs
β”‚           β”œβ”€β”€ home/
β”‚           β”œβ”€β”€ overview/
β”‚           β”œβ”€β”€ resources/
β”‚           └── sitemap/
β”œβ”€β”€ configuration.yml
└── package.json

Key Message naming convention: product-name-key-message-name


πŸ§‘β€πŸ’» Working with Source Files

Sass

  • Located in app/assets/scss
  • Compiles to minified and unminified CSS

JavaScript

  • Located in app/assets/js

Handlebars Templates


βš™οΈ Configuration Options

configuration.yml

Define Key Messages under the clm node:

clm:
  product:
    name: 'Product-Name'
    suffix: '-'
  primary:
    name: 'CLM-Presentation-ID'
    key_messages:
      - key_message: 'home'
        description: 'Home'
        display_order: '0'
        slides:
          - slide: 'home'
            id: '0'
      - key_message: 'overview'
        description: 'Veeva Test Overview'
        display_order: '1'
        slides:
          - slide: 'Veeva Test Overview'
            id: '2-0'
      - key_message: 'sitemap'
        description: 'Sitemap'
        display_order: '2'
        slides:
          - slide: 'Sitemap'
            id: '0-1'

Custom Paths

Update paths in configuration.yml as needed:

paths:
  src: "app"
  dist: "build"
  deploy: "deploy"
  tmp: "build/.tmp"
  pages: "app/templates/pages"
  layouts: "app/templates/layouts"

πŸ’‘ Tip: YAML files must use spaces (not tabs).


πŸ› οΈ CLI Tasks & Workflow

Usage

veeva --help

Common Tasks

Command Description
veeva Starts dev mode: builds, watches, reloads
veeva build Production build: compiles/minifies everything
veeva stage Builds + generates zip/ctl files per Key Message
veeva deploy Uploads zip/ctl files via FTP (requires config)
veeva vault-stage Generates Vault Multichannel CSV file

Options

Option Description
-a, --all-key-messages Include hidden Key Messages
-c, --config Show merged configuration
-d, --dry-run Preview commands without execution
-e, --debug Output error tracebacks
-h, --help Print help message
-k, --key-message Run tasks for a single Key Message
-v, --version Show version number
-V, --verbose Enable verbose output

πŸ§ͺ Troubleshooting & FAQ

  • Make sure you're using a compatible Node.js version (check package.json)
  • Ensure configuration.yml is valid YAML (use a linter if needed)
  • Screenshots only process .html files; static assets like .pdf require manual thumbnails

Need Help?

Submit issues or feature requests via GitHub Issues.


πŸ“„ License

MIT


πŸ™Œ Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.

For more examples, see the CLM Example Project.