pcf-scripts

    1.3.6 • Public • Published
    PCF Build Scipts

    Overview

    This package contains the scripts required to build a custom PowerApps Component Framework (PCF) control for Microsoft PowerApps. The scripts are designed to be used in conjunction with the Microsoft PowerApps CLI tool, which is separately available via an MSI installer.

    Please visit the publicly available documentation for the Microsoft PowerApps CLI tool to learn more. You can also install the PowerApps CLI via its MSI installer.

    Without Microsoft PowerApps CLI tool this package should only be used for reference purposes.

    Build, Debug and Test

    Inner developer loop

    • do a clean build:
    cd src\pcf\pcf-scripts
    npm run rebuild
    
    • do a normal inner loop build:
    npm run build
    
    • run all mocha tests
    // you have to build pcf-scripts before running updated tests
    npm test
    
    • run a single test file or a single unit test
    mocha out\test\[test_file].js
    mocha out\test\[test_file].js -g "[unit test name]"
    
    • pack the new bits to drop folder at drop\pcf\pcf-scripts
    // a build is required before running pack
    npm run pack
    

    Local E2E testing with a real PCF project

    • use CLI to create a PCF project
    pac pcf init -ns testnamespace -n testcontrol -t field
    
    • point pcf-scripts dependency to local build outputs

      • open package.json at the root of the PCF project
      • Inside devDependencies field, change the version of pcf-scripts to "file:[repos]/PowerPlatform-ISVEx-ToolsCore/drop/pcf/pcf-scripts"
    • Install dependencies including local pcf-scripts

    cd [controls/root/directory]
    npm install
    
    • Executing/testing local pcf-scripts on the PCF project
    cd [controls/root/directory]
    npm run build
    // or any command that executes pcf-scripts
    

    Add a new string for localization

    • edit the file src\diagnosticMessages.json
    • build the project by doing npm run build
    • start using added localized string in code:
    import { strings } from './diagnosticMessages.generated';
    

    Release Notes:

    1.3.6:

    • Allow 'hidden' as a PCF property attribute

    1.3.5:

    • Add 'File' to the list of allowed property datatypes
    • Support for 'common-property' in ControlManifest and test harness
    • Propagate changes in the width & height in the top container to changes in the underlying properties

    1.3.1:

    • Virtual control disabled for PCF controls, not fully supported yet

    1.2.6:

    • Localization updates
    • Enable virtual controls development
    • Added functionality to have a template override one of the "parent" files; for virtual controls, that is the package.json file
    • Control manifest:
      • Support boolean attribute "hidden"
      • Support external-service-usage element which declares whether this is a premium PCF control
    • Updated the version of PCF shipped

    1.1.6:

    • Improved code validation on users control source code that helps avoiding runtime errors

    1.0.6:

    • Production builds that generate bundle sizes larger than 5 MB will result in a build failure
    • Properties defined in ControlManifest.Input.xml must now define the 'usage' attribute

    0.4.3:

    • Added anonymous telemetry to pcf; to opt out use PowerApps CLI, see: PowerApps CLI telemetry
    • Bug fixes:
      • Fix webpack build error when using TS path mappings based module resolution

    0.3.4:

    • Improved manifest validation for controls with datasets
    • Fixed issue with preserving nested subfolder structure for control resources in the output folder

    0.2.71:

    • React is no longer treated as an external library. Now tooling can bundle it directly with the custom component source code.
    • When building, relative paths used in the manifest are now preserved when generating the control output folder. For example, if a resource file is located in a control folder\css\subfolder, this subfolder path will be created in the output folder during build.
    • In support for future library sharing capabilities, we are removing the need for library definition in the ControlManifest.Input.xml. This will impact previously created components using library tag (please remove all libraries from the ControlManifest.Input.xml and replace them with an import statement in the index.ts).
    • Control author can include a preview image by setting the preview-image attribute in manifest's <control> node.
    • PCF UI is localized for: English, French, German, Japanese, Spanish

    0.2.59:

    • PCF build output enhancements include:
      • Colorization
      • Timestamps
      • Formatting updates
      • PCF build now produces formal error codes in conjunction with error messages

    0.1:

    • Initial set of capabilities for custom control development using the PowerApps Component Framework (PCF).

    Install

    npm i pcf-scripts@1.3.6

    Version

    1.3.6

    License

    See License in LICENSE

    Unpacked Size

    453 kB

    Total Files

    77

    Last publish

    Collaborators

    • powerapps-admin