test-gulp-build
v1.2.3
Published
test package
Downloads
55
Readme
test-gulp-build
test-gulp-build 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 test-gulp-buildUsage
Run the package executable from the command line with the required arguments.
Syntax
npx test-gulp-build <task-name> --folderPath <template-type>/<template-name> --cdnUrl <cdnUrl> --tenantId <tenantId>Example
To run a task named template:build-template:
npx test-gulp-build template:build-template --folderPath selfservice/oasis --cdnUrl https://cdn.example.com --tenantId tenant123Tasks
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, or messagecenter. | selfservice/oasis |
| --cdnUrl | URL for the CDN. (Optional) | https://cdn.example.com |
| --tenantId | Unique identifier for the tenant. (Optional) | tenant123 |
Folder Structure
selfservice/oasis:selfserviceis the template type.oasisis the template name.
Other valid template types include:
selfservice/chatselfservice/messagecenter
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 test-gulp-build validate-template --folderPath selfservice/oasis