pacx webresources init - neronotte/Greg.Xrm.Command GitHub Wiki
Set-up the folder that will host the Dataverse WebResources
Aliases
pacx wr init
Usage
This command can be used to set-up the folder that will contain the WebResources used by your solution.
The command will create a .wr.pacx file in the specified folder. That file will be used as placeholder to identify the root folder for the WebResources. It supports 2 main ways to initialize the folder:
- From scratch, assuming no WebResource is already present in your solution
- By synchronizing the folder with the WebResources in a given solution (using the --remote argument)
If starting from scratch, the command will create the following folder structure:
- publisher prefix with underscore: the folder that will contain the WebResources organized by publisher prefix (e.g. new_, fabrikam_, etc)
- images: the folder that will contain the images (png, svg, etc) used by your solution
- scripts: the folder that will contain the JavaScript files for Forms or Ribbons
- pages: the folder that will contain the custom HTML webresources
If starting from a remote solution, it will create a folder structure reflecting the one in the solution.
In both cases, a remote solution must be present and set as default solution for the environment (or provided using the --solution argument), because it is needed to determine the publisher prefix to set as root folder.
Examples
Initialize the current folder from scratch, taking the publisher from the default solution set on the current environment:
pacx webresources init
pacx wr init
Initialize the .\webresources subfolder from scratch, taking the publisher from the default solution set on the current environment:
pacx webresources init --folder .\webresources
pacx wr init -f .\webresources
Initialize the current folder from the remote solution set as default for the current environment:
pacx webresources init --remote
pacx wr init -r
Initialize the current folder from the specified remote solution:
pacx webresources init --remote --solution my_solution
pacx wr init -r -s my_solution
Initialize the .\webresources folder from the remote solution set as default for the current environment:
pacx webresources init --remote --folder .\webresources
pacx wr init -r -f .\webresources
Initialize the .\webresources folder from the specified remote solution:
pacx webresources init --remote --solution my_solution --folder .\webresources
pacx wr init -r -s my_solution -f .\webresources
Arguments
| Long Name | Short Name | Required? | Description | Default value | Valid values |
|---|---|---|---|---|---|
folder |
f |
N | The folder where the webresources will be stored. If not provided, the current folder will be used. | - | String |
remote |
r |
N | Indicates that the folder will be set-up synchronizing the webresources from the Dataverse environment | - | true, false |
solution |
s |
N | In case you want to init the folder from the contents of a solution that is not the default one for the current environment, specifies the name of the solution to take as source | - | String |