We already had PowerApps PowerShell for a while. Yesterday, the PowerApps CLI was released.
Installation Steps
Table of Contents
Following the steps on the Microsoft PowerApps CLI page. You will need to install some prerequisites:
To use PowerApps CLI you will need the following:
Install Npm(comes with Node.js) or install Node.js (comes with npm). We recommend LTS (Long Term Support) version 10.15.3 LTS as it seems to be most stable.
If you don’t already have Visual Studio 2017 or later, follow one of the options below:
- Option 1: Install Visual Studio 2017 or later
- Option 2: Install .NET Core 2.2 SDK and install Visual Studio Code
Install Microsoft PowerApps CLI from here
Starting the PowerApps CLI
Now you will need to start the Developer Command Prompt for VS 2017
Then within the command prompt you can create a folder. You could do this using explorer if you prefer.
Getting starting with the CLI
Before I create a new component some useful commands:
pac help
This shows you the important bits. Note that you can update the CLI with the install parameter.
Creating a new component
Now to create a new component we can run the following command:
pac pcf init --namespace --name --template
The namespace and the component name are easy, but what are the available templates? The CLI has actually been implemented really well. as you ‘forget’ to supply details you get proper help pages.
The template options available are currently field and dataset.
This has now created a component file structure for me.
Now you will still need to install all the dependencies. To do this run npm install.
This will now create the node_modules folder with many of the files needed by the project. SharePoint SPFx developers will recognise this kind of structure
By the way does anybody remember yesterday’s post about Are Microsoft Flow and PowerApps really only for citizen developers?
Are you ready to start developing the custom component?
In my next post I will look at building some custom component.