A command line interface for HOP
The HOP CLI creates, manages, builds and runs your HOP-based projects. The idea behind it was from Angular-CLI which helps developers create and manage their projects in no time. I created this project so you can easily install a HOP instance with your desired config with just one command.
Both the CLI and generated project have dependencies that require Node 10 or higher, together with NPM 5.5.1 or higher. It is recommended to update your node Node and NPM to latest version before running this application. Running the application using lower versions of Node and NPM has not been tested yet; It might work, but you might face some warnings about the experimental features of Node API.
BEFORE YOU INSTALL: please read the prerequisites
npm install -g @hbbtv/hop-cli
npm install @hbbtv/hop-cli
To run a locally installed version of the hop-cli, you can call hop
commands directly by adding the .bin
folder within your local node_modules
folder to your PATH. The node_modules
and .bin
folders are created in the directory where npm install @hbbtv/hop-cli
was run upon completion of the install command.
hop new PROJECT-NAME
cd PROJECT-NAME
hop serve
Navigate to http://localhost:3000/
. The app will automatically reload if you change any of the source files.
You can use the hop module
command to generate HOP modules:
hop module my-new-module
# your module will be generated in src/modules/my-new-module
To update HOP CLI to a new version, you must update both the global package and your project's local package.
Global package:
npm uninstall -g @hbbtv/hop-cli
npm cache verify
# if npm version is < 5 then use `npm cache clean`
npm install -g @hbbtv/hop-cli@latest
You can use the hop build
command to build your HOP application:
hop build
# your built app will be in dist folder
After building your application, you can copy contents of dist
folder to your web-server root folder and use the URL in AIT table of transponder.