Node JS => 8.0
- Fork / clone the repository.
npm installat the top of the repository.
npm run buildat the top of the repository.
./bin/Index.htmlin a browser. You should get a working search page with a big
Hello Worldmessage at the top of the search page.
pagesfolder, you have a working search page. At build time, it is copied to the
srcfolder, you have all the typescript source code.
src/ui/HelloWorld.tsfile is a sample/demo component
src/Index.tsfile is the starting point of the application.
sassfolder, you have all the css for the extension.
testsfolder, you have all the tests for the custom components.
This project is also used in the Search UI tutorial. You are invited to consult this tutorial if you are unfamilar with Coveo. The last few steps of the tutorial explains an advanced integration with a custom component written in Typescript. It explains how to transform the Hello World component into something useful.
npm run setupwill copy the needed ressources (
templates, etc.) in the
npm run csswill build the sass files into a css file in the
npm run buildwill run the
csstask, then compile the typescript code.
Then, anytime you hit save in a typescript file, the server will reload your application.
npm run testwill execute the tests one time and give you the report
npm run watchTestwill watch changes and reexecute the tests and coverage when saving a file.
Useful Visual Studio Code Extensions
If you are using Visual Studio Code, you can install the following extensions:
Shows inline linter problems in the code based on the
tslint.json file. This will ensure that you are consistent with the formatting standards.