Create SiteVision WebApps and RESTApps
To create a new app:
npx @sitevision/create-sitevision-app my-new-appnpx is a package runner tool (useful when you don't want to pollute global installations)
The command will create a directory with a basic project structure (you will be prompted to enter if you are creating a WebApp or RESTApp as well as information about your SiteVision environment).
The project will depend on @sitevision/sitevision-scripts, which gives the project access to utility scripts for deployment.
Creates an addon with the name configured in the setup task.
Compresses /src into /dist. The generated zip file is your app that will be used when deploying or signing.
Uploads the app (zip file in /dist) to the configured addon.
Use npm run deploy force to overwrite an existing app.
Invokes the signing endpoint of the SiteVision developer REST API. A signed version of the app will be created in /dist.
Deploys a signed app to a production environment.
@sitevision/sitevision-scripts assumes communication over https. To disable certificate verification when developing locally you should utilize the NODE_TLS_REJECT_UNAUTHORIZED=0 flag.
The option can be entered via CLI:
NODE_TLS_REJECT_UNAUTHORIZED=0 npm run deployOR by modifying package.json:
”deploy”: ”NODE_TLS_REJECT_UNAUTHORIZED=0 sitevision-scripts deploy”Thanks to @albinohrn for helping with this project.