Developer jq-cli
jq-cli is a command-line tool to help with development and deployment.
Warning
jq-cli works only when hosting:system_api on server in settings.json match domain
You can use jq-cli to:
Token can be saved in user environment variable and then you can use jq-cli without --token argument.
Warning you need to close all terminal windows/vs code instances and open new one to use new environment variable.
Environment variable examples :
| Text Only | |
|---|---|
How it works
jq-cli --action build performs the following steps:
1. Prepare a list of local assets
2. Send the local assets list and receive a prepared index file
If files are duplicated in the local and remote locations, the following algorithm is applied on the server side to determine which file to use let's say \css\site.css example:
- Verify if the file
\css\site.cssexists in the local development folder. - Verify if the file
\css\site.cssexists on the server. - If it exists, verify if the minified version
\css\site.min.cssis available. - Verify if the file
\css\site.cssexists in the application marked as UI. - If it exists, check if the minified version
\css\site.min.cssis available.
First time setup
1. Install jq-cli
To use jq-cli, you need to have the following dependencies installed:
7zip: Install from https://www.7-zip.org/download.html
| Bash | |
|---|---|
| Bash | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
2. Optional, setup .vscode/settings.json and .gitignore
Optional script to create .vscode/settings.json and .gitignore files.
3. Prepare token and applicationname
- Application Name -
{host}/get/apps - Token - Create an API key if you don't have one:
{host}/get/admin - If the application is connected with a repository or there are problem with proper git setup, you should clone it using the command:
| Bash | |
|---|---|
4. jq-cli reference
Arguments:
--action- action to performbuildor empty, generateindex.htmlfor live reloaddeploy- deploy local copy to remoteget- get application from remote
--host- host name- ex.
app.jetquery.io - you can save token in user environment variable - app_jetquery_io
- ex.
--appname- application name--token- token for api access