Skip to content

New command: generate SPFx package #2367

@waldekmastykarz

Description

@waldekmastykarz

Original idea by @wobba

Usage

spfx package generate [options]

Description

Generates SharePoint Framework solution package with a no-framework web part rendering the specified HTML snippet.

Options

Option Description
-t, --webPartTitle <webPartTitle> Title of the generated web part. Displayed in the web part toolbox
-d, --webPartDescription <webPartDescription> Description of the generated web part. Displayed in the web part toolbox
-n, --packageName <packageName> Name of the generated .sppkg file
--html <html> HTML to render in the web part
--enableForTeams [enableForTeams] Determines if the web part should be available as a Teams app. Allowed values tab, personalApp, all
--developerName [developerName] Name of your organization. Defaults to Contoso
--developerPrivacyUrl [developerPrivacyUrl] Privacy URL. Defaults to https://contoso.com/privacy
--developerTermsOfUseUrl [developerTermsOfUseUrl] Terms of use URL. Defaults to https://contoso.com/terms-of-use
--developerWebsiteUrl [developerWebsiteUrl] Website URL. Defaults to https://contoso.com/my-app
--developerMpnId [developerMpnId] Microsoft Partner ID. Defaults to 000000

Additional Information

This command is meant to quickly generate a SharePoint Framework solution package with a web part that renders the specified HTML fragment. It's meant for cases, when you want to embed a piece of HTML in Microsoft Teams or your SharePoint portal but don't want to create a whole SharePoint Framework project.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions