Create Sitevision WebApps and RESTApps
To create a new app:
npx @sitevision/create-sitevision-app my-new-app
npx 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 building and deployment.
You might run in to issues creating a new app if you have an old version of @sitevision/create-sitevision-app
installed globally. To fix this, run: npx @sitevision/create-sitevision-app@3 your-app
to update to the latest version.
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. If you use babel to transpile your code (opt-in in the setup task), this target will compress a transpiled version of your /src
Runs the build task and deploys to the addon configured in the setup task
Runs the build task and deploys with the possibility to overwrite an existing app
Watches files for changes and runs build force-deploy
on save
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.
Creates .dev-properties.json with information about the development environment
@sitevision/sitevision-scripts assumes communication over https. To disable certificate verification when developing locally you could utilize the NODE_TLS_REJECT_UNAUTHORIZED=0
flag.
The option can be entered via CLI:
NODE_TLS_REJECT_UNAUTHORIZED=0 npm run deploy
OR by modifying package.json:
”deploy”: ”NODE_TLS_REJECT_UNAUTHORIZED=0 sitevision-scripts deploy”
Other targets that might need prefixing: create-addon
, force-deploy
, dev
.
It is possible to use (unsafe) http for local deployments by adding property "useHTTPForDevDeploy": true
to .dev_properties.