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

@spscommerce/colors

v3.1.0

Published

Design sanctioned colors for SPS Commerce libraries and applications compiled into various formats.

Downloads

3

Readme

@spscommerce/colors

Design approved colors distributed in various formats

SPS Commerce Version

I want to use existing colors, see availabe colors, or add or change colors.

Using Existing Colors

Ensure you have access to and have configured our private jFrog Artifactory npm registry.

npm install --save @spscommerce/colors

# OR

yarn add @spscommerce/colors

Finally, make sure that your CI environment is set up to be able to install from JFrog Artifactory. Your Jenkins user must have JFrog Artifactory permissions. Additionally you should have GH_TOKEN set in your jenkins so that builds can be pushed back to github. In order to do this we recommend setting up a github bot account. Make sure that the jenkins bot or jenkins bot group is added to all your new repos with write access. An example group is the Github group commerce-platform-bot-writable which contains a github user called jenkins-identity-service. This is required for it to create releases and to tag those releases back on Github. You can see our Dockerfile, run-build.sh (build a simple docker file), run-ci.sh (runs releases). We use semantic-release to release our builds. Other things to make sure that you do:

Add always-auth=true to your .npmrc file.

Here is our CI build step:

echo "About to remove old .npmrc file"
rm ~/.npmrc

# Dont show secrets in logs
set +x
JFROG_NPM_USERNAME='INSERT_JFROG_USER_HERE'
JFROG_NPM_PASSWORD='INSERT_JFROG_PASSWORD_HERE'
JFROG_NPM_EMAIL='[email protected]'
JFROG_NPM_PASSWORD_BASE64=$(echo $JFROG_NPM_PASSWORD | base64)
echo "Printing jfrog base64 pass"
echo $JFROG_NPM_PASSWORD_BASE64
GH_TOKEN="INSERT_GH_TOKEN_HERE"
cat >~/.npmrc <<EOL
init.author.name=SPS Commerce
[email protected]
init.author.url=https://www.spscommerce.com
init.license=UNLICENSED
always-auth=true
@spscommerce:registry=https://spscommerceinc.jfrog.io/spscommerceinc/api/npm/npm/
//spscommerceinc.jfrog.io/spscommerceinc/api/npm/npm/:_password=${JFROG_NPM_PASSWORD_BASE64}
//spscommerceinc.jfrog.io/spscommerceinc/api/npm/npm/:username=${JFROG_NPM_USERNAME}
//spscommerceinc.jfrog.io/spscommerceinc/api/npm/npm/:email=${JFROG_NPM_EMAIL}
//spscommerceinc.jfrog.io/spscommerceinc/api/npm/npm/:always-auth=true"
EOL
set -x
echo "Finished writing new .npmrc file"
./other/build-ci.sh
./other/run-ci.sh $GH_TOKEN $JFROG_NPM_USERNAME $JFROG_NPM_EMAIL

Note we don't pass any --build-arg or use the docker ENV directive because that would be stored in the docker history which is not good from a security perspective. The downside is that our build steps are a bit more complex.

Reusable instructions for your users

Before you actually use any color format in your package or application you will probably want to help developers understand how to use colors or add or change colors. You can do so by including the following instructions about @spscommerce/colors in your README.md:

### @spscommerce packages

This package uses the SPS Commerce private jFrog Artifactory NPM repository. You should make sure that you [have it configured](https://atlassian.spscommerce.com/wiki/display/STM/Getting+started+with+private+NPM+packages+in+jFrog+Artifactory) before using this package.

### Using colors

Colors in this project are sourced from [@spscommerce/colors](https://github.com/SPSCommerce/colors). See the [available colors](https://github.com/SPSCommerce/colors#available-colors).

### Adding or changing colors

If you would like to add or change a color then please follow the [@spscommerce/colors instructions](https://github.com/SPSCommerce/colors#adding-or-changing-colors). Once your color has been approved and @spscommerce/colors has been released to our private jFrog Artifactory NPM then come back here and upgrade to the latest version of @spscommerce/colors using `npm install --save @spscommerce/colors@latest` or `yarn add @spscommerce/colors@latest`. 

Now choose a format that you'd like to use. The following formats are available:

If you want more formats please open a pull request.

CommonJS

const colors, { red100 } = require('@spscommerce/colors');
console.log(colors.red100); // > #ffeaec
console.log(red100); // > #ffeaec

CSS Variables

@import 'path/to/node_modules/@spscommerce/colors/dist/colors.css';

.myclass {
    color: var(--gray400);
}

JSON

ln -s path/to/node_modules/@spscommerce/colors/dist/colors.json colors.json

Less

@import 'path/to/node_modules/@spscommerce/colors/dist/colors';

.myclass {
    color: @gray400;
}

SCSS

@import 'path/to/node_modules/@spscommerce/colors/dist/colors';

.myclass {
    color: $gray400;
}

YAML

ln -s path/to/node_modules/@spscommerce/colors/dist/colors.yml colors.yml

View this package on jFrog Artifactory on jFrog Artifactory

Available colors

white

white: #ffffff

black

black: #000000

gray100

gray100: #f6f6f6

gray200

gray200: #e8e9e9

gray300

gray300: #d2d4d5

gray400

gray400: #a5a9ab

gray500

gray500: #62686b

gray600

gray600: #1f282c

blue100

blue100: #d9f0fa

blue200

blue200: #00aae5

blue300

blue300: #0077aa

orange100

orange100: #fff4ea

orange200

orange200: #ff9632

orange300

orange300: #bf7025

yellow100

yellow100: #fff8e0

yellow200

yellow200: #fff0b3

yellow300

yellow300: #ffcc00

purple100

purple100: #f1e8ef

purple200

purple200: #883673

purple300

purple300: #743865

green100

green100: #eaf8f0

green200

green200: #32be6f

green300

green300: #258f53

red100

red100: #fce5ea

red200

red200: #eb0032

red300

red300: #b00025

Adding or Changing Colors

You can add a color using these steps:

  1. Fork and clone this repo then cd into it
  2. yarn or npm install
  3. Edit src/colors.json to add your color.
  4. Run yarn build or npm run build.
  5. You should now commit your changes using commitizen or the conventional-commit guidelines.
  6. Put in a pull request against the main repo. A new version of @spscommerce/colors should be released on merge.
  7. Finally, put in a new pull request to SPS-Styles to upgrade @spscommerce/colors to the latest version and to place the color in a color-group (if you added a new color).
  8. A new version should be released when your PR is merged into master. Voila!

Commands

yarn build  # Build files from src/ into dist/ and copies a markdown
            # representation of the colors into README.md's colors
            # section. You should commit README.md after this change.

yarn clean  # Delete all files in dist/