1.0.30 • Published 9 months ago

@mschauer5/spfx-cli v1.0.30

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

CLI for SPFx projects

In Development - Not ready for use

Install

npm install -g @mschauer5/spfx-cli

Commands

add alias

lf add-alias 'name'

adds a new alias for this program using the name that is provided. ( default is 'lf' )

 

env

lf env -a

adds / updates .env file to the project setting SITE_URL to pull from your environment variable of 'SPFX_SERVE_TENANT_DOMAIN'. This is required to run serve command from this program.

 

lf env -a https://contoso.sharepoint.com/sites/dev

adds / updates .env file to the project setting SITE_URL to 'https://contoso.sharepoint.com/sites/dev'. This is required to run serve-fast command.

 

serve

This requires the spfx-fast-serve package to be installed globally.

 

lf serve

runs project using spfx-fast-serve and uses the .env file in the project to launch the correct site url.

 

lf serve https://contoso.sharepoint.com/sites/dev

runs project using spfx-fast-serve and launches the site that is passed in the command and bypasses the .env file in the project.

 

build

lf build

this command will build the project by runing pnpm|npm run build based on the package manager you are using in the project.

 

bundle

lf bundle

this command will bundle the project and take the package.json version and update the SharePoint Solution Package version

 

Open folder of sppkg file location

lf open-solution

this command opens finder|windows explorer of where the solution package is located

 

Visual Studio Code Commands

requires visual studio code to be installed and having having 'code' in the terminal / command line

lf vs

this command will open the default project in visual studio code

 

lf vs .

this command will open visual studio code in the current directory

 

lf vs 'name-of-project'

this command will open visual studio code with the matching project name

 

lf vs-default project1

this command will set project1 as the default project in visual studio code

 

lf vs-add project1 /path/to/project1

this command will add project1 to the list of projects in visual studio code

 

lf vs-delete project1

this command will delete project1 from the list of projects in visual studio code

 

lf vs-list

this command will list all projects in visual studio code

 

Version

lf v

this command will list the version of package.json and package-solution.json

 

lf v-sync

this command will sync the package.json version to package-solution.json version

 

lf v-increment

this command will increment patch # in package.json and then replace package-solution.json version with updated package.json version

 

lf v-increment major|minor|patch

this command will increment patch # in package.json and then replace package-solution.json version with updated package.json version based on the argument passed in. Options are major, minor, patch major = 1.0.0 -> 2.0.0 minor = 1.0.0 -> 1.1.0 patch = 1.0.0 -> 1.0.1

1.0.30

9 months ago

1.0.29

9 months ago

1.0.27

9 months ago

1.0.26

9 months ago

1.0.25

9 months ago

1.0.24

9 months ago

1.0.23

9 months ago

1.0.22

9 months ago

1.0.21

9 months ago

1.0.20

10 months ago

1.0.19

10 months ago

1.0.18

10 months ago

1.0.17

10 months ago

1.0.16

10 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago

1.0.5

2 years ago