1.0.7 • Published 4 months ago
ps-custom-builder v1.0.7
ps-custom-builder
ps-custom-builder
is an eGain PS-specific customizable Node.js utility package designed to simplify build process for templates based on vue.js. It enables developers to execute tasks with specific configurations and arguments, such as folder paths, CDN URLs, and tenant IDs, directly through a command-line interface.
Features
- Execute tasks with dynamic parameters.
- Predefined tasks for build and validation.
Installation
Install the package as a development dependency:
npm install --save-dev ps-custom-builder
Usage
Run the package executable from the command line with the required arguments.
Syntax
npx ps-custom-builder <task-name> --folderPath <template-type>/<template-name> --cdnUrl <cdnUrl> --tenantId <tenantId>
Example
To run a task named template:build-template
:
npx ps-custom-builder template:build-template --folderPath selfservice/oasis --cdnUrl https://cdn.example.com --tenantId tenant123
Tasks
The package includes the following tasks:
- template:build-template: Builds the template with specified configurations.
- template:validate-template: Validates the template files (e.g., linting HTML, CSS and JS).
Arguments
Argument | Description | Example |
---|---|---|
--folderPath | Path to the project folder, which includes template type and name. The template type can be one of: selfservice , chat . | selfservice/oasis |
--cdnUrl | URL for the CDN. (Optional) | https://cdn.example.com |
--tenantId | Unique identifier for the tenant. (Optional) | tenant123 |
Folder Structure
selfservice/oasis
:selfservice
is the template type.oasis
is the template name.
Valid template types include:
selfservice
chat
Prerequisites
Ensure the following are installed and available:
- Node.js: Version ^18.18.0, ^20.9.0, or >=21.1.0.
Troubleshooting
Common Errors
1. Missing Arguments
Provide all required arguments when running a task:
npx ps-custom-builder validate-template --folderPath selfservice/oasis