Skip to content

pacx webresources push

github-actions[bot] edited this page Jun 30, 2026 · 5 revisions

Push web resources from a local folder to the target environment

Aliases

pacx wr push

Usage

This command is basically a simple Command Line based replacement for XrmToolbox WebResource Manager

A bit of theory

--- work in progress ---

How to use it

To deploy all the webresources that are in the current folder to the target environment, you can use the following command:

pacx webresources push

The 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.pacx

And 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.pacx file
  • From there, navigates under the new_ folder (assuming that new is 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 $\scripts

You 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