@mschauer5/spfx-cli v1.0.30
CLI for SPFx projects
In Development - Not ready for use
Install
npm install -g @mschauer5/spfx-cliCommands
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 -aadds / 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/devadds / 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 serveruns 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/devruns 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 buildthis command will build the project by runing pnpm|npm run build based on the package manager you are using in the project.
bundle
lf bundlethis 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-solutionthis 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 vsthis 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 project1this command will set project1 as the default project in visual studio code
lf vs-add project1 /path/to/project1this command will add project1 to the list of projects in visual studio code
lf vs-delete project1this command will delete project1 from the list of projects in visual studio code
lf vs-listthis command will list all projects in visual studio code
Version
lf vthis command will list the version of package.json and package-solution.json
lf v-syncthis command will sync the package.json version to package-solution.json version
lf v-incrementthis command will increment patch # in package.json and then replace package-solution.json version with updated package.json version
lf v-increment major|minor|patchthis 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
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
2 years ago