To install or update, you just need to run:
npm i
The gulp file will run automatically as a post-installation script, copying assets
from the package, and custom test pages from ./testpages/
to ./public/custom
Run local server with:
npm start
The server will be accessible at http://localhost:5001/
If you have no changes to make to the test files, just run the build hook using the value stored in 1passord
as Netlify build hook for coveo-test-search
:
curl --request POST 'https://api.netlify.com/build_hooks/************************'
This will build the beta version by default, or whatever version is set as the environment variable
SEARCH_UI_VERSION in Netlify (See Building a search-ui version other than 'beta'
below).
If you need to change anything in the repo, Netlify will build when you merge your PR.
If you make changes to files in ./public/custom
or add new ones, these will be
local changes. They will be visible immediately on your local server, but will not be
tracked by git. They may be overwritten next time you run the server.
If you make changes to files in ./testpages
, these changes will be tracked
by git. In order to see the changes locally, you can re-run npm start
.
The gulpfile looks for the environment variable SEARCH_UI_VERSION. If it doesn't find one,
it defaults to building the version with the beta
tag. This overrides any value you put
in coveo-search-ui
value you set in the package.json
dependencies.
See here for versions: https://www.npmjs.com/package/coveo-search-ui?activeTab=versions
SEARCH_UI_VERSION accepts a specific version such as '2.10107.0', or a tag such as 'latest'
-
Browse to this page on the Netlify console (requires log-in): https://app.netlify.com/sites/coveo-test-search/settings/env
-
Set a specific version here as a string, such as '2.10107.0', or a tag, such as 'latest'.
-
Remember to set it back to an empty value or 'beta' when you're done testing the version.
- If you don't have the Netlify CLI installed, run:
npm install netlify-cli -g
- From inside this repository, run this command with the version you want:
netlify env:set SEARCH_UI_VERSION 2.10106.1
You will be redirected to the browser to authenticate.
-
Run the build hook (see instructions above)
-
When you're done, set the version back to
beta
:
netlify env:set SEARCH_UI_VERSION beta
(It is not possible to set it back to a null value in the CLI without deleting the variable)
On Mac/Linux
SEARCH_UI_VERSION=2.10106.1 npm i
On Windows:
cmd /C "set SEARCH_UI_VERSION=2.10106.1 && npm i"