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

@srsly/webpack

v1.0.0-rc.17

Published

Frontend Asset Pipeline with Webpack

Readme

Prerequisite

  1. Make sure you have installed nvm (https://github.com/creationix/nvm) to manage your node version
  2. If you have installed nvm, type nvm use to use the defined node version from .nvmrc. If your project does not have a .nvmrc file, create one!
  3. make sure you have yarn installed on your machine
  4. run yarn from your project root to install your project dependencies

Install @srsly/webpack package

Run yarn add --dev @srsly/webpack to install the webpack config as dev dependency.

Setup

Files

  1. Create index.js in theme/src
  2. Create postcss.config.js, tsconfig.json, build.config.json and .stylelintrc on your project root

Existing Project

  1. Migrate installed dependencies from theme/package.json to the package.json no your root dir.
  2. Delete theme/package.json, theme/package-lock.json, theme/gulpfile.js, theme/yarn.lock, theme/.sass-cache, theme/node_modules, src/config/* and js/vendor

postcss.config.js

module.exports = {
	plugins: {
		'autoprefixer': {}
	}
}

build.config.json

module.exports = {
    "entries": [
        "theme/src/index.js",
        "theme/src/scss/srsly.scss"
    ],
    "dist": 'theme/dist',
    "copyImage": {
        "from": "theme/src/img",
        "to": "theme/dist/img"
    },
    "favicon": {
        "title": "SRSLY Web Project",
        "background": "red",
        "icons": {
            "android": true,
            "appleIcon": true,
            "appleStartup": true,
            "coast": false,
            "favicons": true,
            "firefox": true,
            "opengraph": false,
            "twitter": false,
            "yandex": false,
            "windows": false
        }
    }
}

tsconfig.json

Create a tsconfig.json file in your project's root with the following content to extend from our typescript base config.

{
    "extends": "./node_modules/@srsly/webpack/tsconfig.json",
}

.stylelintrc

Create .stylelintrc and extend from our base config.

{
    "extends": "./node_modules/@srsly/webpack/.stylelintrc"
}

srsly.scss

Load needed bootstrap modules from from node_modules.

@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";

... more modules

Add scripts to your package.json

Add the following scripts to your package.json

  "scripts": {
    "dev": "yarn run srsly watch,
    "build": "yarn run srsly build",
    "lint:scss": "stylelint \"theme/**/*.scss\" --syntax scss",
    "lint:scss:fix": "stylelint \"theme/**/*.scss\" --fix --syntax scss",
    "prettier:check": "prettier 'theme/src/**/*.ts' --list-different",
    "prettier:fix": "prettier 'theme/src/**/*.ts' --write",
    "test": "yarn run lint:scss && yarn run prettier:check"
  },

Commands

SRSLY CLI

  • Use yarn run srsly --help so see all commands.

Installing New Dependencies

  • Use yarn add <package> to install a package from npm used as production dependency
  • Use yarn add --dev <package> to install a package from npm used as dev dependency

Development Mode

type yarn run dev to start a webpack server with HMR and source maps.

Production Mode

type yarn run build to build your assets for production. you can inspect your dependencies with yarn run build:analyze

Linting & Testing

Check your project with yarn run test

Stylelint for SCSS (https://stylelint.io/)

  • Lint files: yarn run lint:scss
  • Lint files and fix (if possible): yarn run lint:scss:fix

Prettier for Typescript (https://prettier.io/)

  • Check files yarn run prettier:check
  • Fix files yarn run prettier:fix

Publishing new versions

use npm publish to publish a new version of this config to npm. Please follow semver https://semver.org.

Todos

Srsly CLI

  • Bootstrap Command to create tsconfig.json, build.config.js, etc..

Webpack

  • Refactoring Codebase

Version Checker

  • Advanced features like autoupdate version, show installed and remote version, etc.