npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mschauer5/spfx-cli

v1.0.12

Published

CLI for SPFx projects

Downloads

683

Readme

CLI for SPFx projects

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' )

 

add-env

lf add-env

adds new .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-fast command.

 

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

Adds a new .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