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

web-standard

v1.1.3

Published

Standardize all DSC repos with files in this repository.

Downloads

3

Readme





Installing and Adding To a Repository

Within a repository's npm package.json file, add

// add `web-standard` to {devDependencies}
"web-standard": "git+ssh://[email protected]/dollarshaveclub/web-standard"

Now, when developers run npm i:

  • Access is provided to template configuration files found here.
  • Key commands can be used to standardize a repository: web-standarize (see: scripts/standardize.js)

To standardize, add a script that standardizes the repository accordingly.

View the Project Type Arguments to write the appropriate npm script.

It is recommended that the npm script be called standardize.

// in example
// add `standardize` script to {script}
"standardize": "web-standard docker-ember private-git-dependencies"

The script nomenclature works as follows

# without arguments
web-standard
# with arguments
web-standard [project_type_args](#project-type-arguments)

Read more about setting up environments for new repositories.


Script Arguments

private-git-dependencies

Projects that use private GitHub dependencies and needs SSH keys.

docker-ember

Ember apps deployed with docker

react

Server-side rendered react apps. See https://github.com/dollarshaveclub/react-runtime for commands and configurations that are added.

node-server

Node microservices that are not Ember/React/etc.

node

Node scripts that aren't servers.


Standardized configuration files are important throughout a code base that uses many repositories so that the code is written in consistent patterns as much as possible. This is what Web Standard provides.

An example of a Web Standard configuration file is .eslintrc.js.

  • Web Standard provides a base .eslintrc.js that is consistent across repositories.

* Repository specific configuration can still be added by adding an additional .eslintrc.js that extends or overwrites Web Standard configuration.

Scripts

The scripts folder contains helper scripts to do common DSC Web Standard Engineer tasks.

Update a repository with update-repo.sh

When this script is run, a specified repository dependency creates a pull request to update a specified dependent repository.

update-repo.sh takes 2 arguments:

  1. A repository to be updated from
  2. A repository to be updated to

Running update-repo.sh will:

  • takes the 1st argument's (The repo that is being updated from) lastest tag
  • makes a branch with the name the update-[from]-[tag] for 2nd argument's (The repo that is being updated to)
  • updates npm within that branch
  • then, submits a pull request with the update

Code Example

Within the web-standard repo, run:

cd code web-standard; . scripts/update-repo.sh tracksuit face-assets