Add a dependency
This topic describes how to add a dependency to your Optimizely Connect Platform (OCP) application.
To add a dependency to your Optimizely Connect Platform (OCP) app, on the command line, run the following command:
npm install <package-name> [--save-prod]
Manually Editing the package.json File
To add dependencies to a package.json
file, in a text editor, add an attribute called "dependencies" that references the name and semantic version of each dependency:
{
"name": "my_package",
"version": "1.0.0",
"dependencies": {
"my_dep": "^1.0.0",
"another_dep": "~2.2.0"
}
}
Updated about 1 year ago