Repository navigation
pacx webresources push
Push web resources from a local folder to the target environment
pacx wr pushThis command is basically a simple Command Line based replacement for XrmToolbox WebResource Manager
--- work in progress ---
To deploy all the webresources that are in the current folder to the target environment, you can use the following command:
pacx webresources pushThe command will:
- Connect to the target environment
- Compare the the list of files in the current folder with the list of webresources in the target environment
- Upload the webresources that are missing in the target environment
- Update the webresources that are different in the target environment
- Add the webresources to the solution (if not already added previously)
- Publish the webresources
If you want to deploy a specific webresource file, you can specify the path to the file:
pacx webresources push --path "C:\path\to\file.js"
pacx webresources push --path "file.js"If you used pacx wr init to initialize the webresource project, you can use the $ special token to refer to the nearest project root folder, navigating up from the current folder.
It will take only the files that are below <project root folder>/<current solution publisher prefix>_.
For example, imagine to have the following project structure:
Webresources/
new_/
scripts/
account.js
pages/
home/
home.css
home.js
home.html
home_react_source/
src/
...
.wr.pacxAnd you are placed under the Webresources/home_react_source/src folder, by typing:
pacx webresources push -p $It will:
- Navigate up from the current folder until it comes to the folder containing the
.wr.pacxfile - From there, navigates under the
new_folder (assuming thatnewis the customization prefix of the current solution publisher) - Recourse all the folders under
new_, take all the files to deploy them to the target environment
You can also use the $ to target a specific subfolder:
pacx webresources push -p $\scriptsYou can also use the * wildcard in the file name to match for files with a specific extension. For example, the following command will deploy all the files with the .js extension from the current folder:
pacx webresources push -p *.jsIf you want to deploy the webresources without publishing them, you can use the following command:
pacx webresources push --no-publish
pacx webresources push -npPLEASE NOTE: by default, all files with *.data.xml extensions are excluded from the upload, because it is assumed that those file may come from a
pac solution clonecommand (or similar).
If you have set some webresources as references for the current webresource project (via pacx webresources addReference, you can use the --reference (or -r) option to include them in the deployment. The following example:
pacx webresources push --reference allPushes all the webresources in the current folder, plus all the web resources set as references in the current web resource project.
If you want to push only the webresources that are set as references, but not the ones in the current folder, you can use the following command:
pacx webresources push --reference onlyIf you want to push not all, but just one or more specific webresources set as references, you can use:
pacx webresources push --reference "webresource1_name,webresource2_name"Where webresourceX_name is the unique name of the webresource once deployed, as set in the --target argument of pacx webresources addReference command.
| Long Name | Short Name | Required? | Description | Default value | Valid values |
|---|---|---|---|---|---|
path |
p |
N | The path to the folder containing the webresources to deploy, or to a specific webresource file to deploy. If not provided, the current folder will be used. | - | String |
no-publish |
np |
N | Indicates that the webresources should be published after the deployment | False |
true, false |
no-action |
nop |
N | If specified, the command will not perform any action, but it will show what it would do. | False |
true, false |
solution |
s |
N | The name of the solution that will contain the WebResources. If empty, the default solution for the current environment is used as default | - | String |
reference |
r |
N | Indicates if it should also push the webresources set as project reference. See wiki for additional details. | - | String |
verbose |
v |
N | If specified, the command will output more details about the operations performed | - | true, false |
- pacx auth
- pacx column
- pacx completion
- pacx customapi
- pacx data
- pacx forms
- pacx history
- pacx key
- pacx optionset
- pacx org
- pacx plugin
- pacx project
- pacx publish
- pacx rel
- pacx ribbon
- pacx roles
- pacx script
- pacx security
- pacx settings
- pacx solution
- pacx table
- pacx tool
- pacx unifiedrouting
- pacx user
- pacx users
- pacx usersettings
- pacx view
- pacx webresources
- pacx workflow