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 🙏

© 2026 – Pkg Stats / Ryan Hefner

profile-boot

v0.2.6

Published

Enables profiles in node js environments and on the browser when bundled with babel or typescript compiler

Downloads

72

Readme

profile-boot!

Enables profiles in node js environments and on the browser when bundled with babel or typescript compiler

Whats the goal?

Setting up different profiles can be challenging when creating an app for different clients

Install

npm i profile-boot

Setting up your profiles

To create a profile, create a profiles folder in your application root directory and create a file using this convention profileName.json. e.g local.json
Note that the inherit key is reserved and it allows you import another profile into the current active profile

Sample profile

{
  "inherit":"base", // this will look for a base.json file and inherit its profile
    "name": "hello",
    "port": 8080,
    "serverHost": "http://localhost:8080",
    "clientHost":"http://localhost:3000",
    "laptop": "windows"}

Usage

To use this library, you have to execute just three steps

  1. have at least one profile
  2. run npx profile-boot with the necessary options. the profile option is important, then you start your application. e.g npx profile-boot -profile local && node server.js.
  3. depending on your setup, you can get the active profile by using any of the following
es5 javascript

// this will contain the data of the current active profile
const activeProfile = require("profile-boot").activeProfile
typescript / es6
// this will contain the data of the current active profile
import {activeProfile} from "profile-boot";

Whats in activeProfile ?

activeProfile will contain the data of the profile you have set in your options but with an additional profile field which holds the name of the active profile

Options

the only required field in options is the profile property which tells profile boot which profile it should set active.
options can be set through cmdLine args or through a profile-boot.json file \

  • cmsLine args hold preference over profile-boot.json file
interface  Options {
	profile:  string;
	//name of the active profile
	showLogs?:  boolean;
	//show profile-boot execution logs. note that error logs will still show even when this field is false
	writeTo?:  string;
	// path to write the active profile to, incase you need to see or log it

}

Setting options with cmdLine args

npx profile-boot -profile local -showLogs true 

Setting options with cmdLine profile.json file

{
    "writeTo": "./src/profile.json",
    "profile":"local",

    "showLogs":true

}

Sample usage for your angular and react projects , just call npx profile-boot before you start and build your application. Then proceed to import {activeProfile} in your application. e.g

package.json

   
    { ...
		
		"scripts": {
    
    "build": "npx profile-boot -profile heroku && react-scripts build",
	"start": "npx profile-boot -profile heroku && react-scripts start",
	 "start-dev": "npx profile-boot -profile local && react-scripts start"
  }}