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

frontwerk

v2.1.4

Published

A collection of frontend-friendly scripts for linting, testing and building apps bundled as a CLI

Downloads

2

Readme

Frontwerk

Frontwerk

Build status Node Version Npm version Npm downloads License

CLI toolbox for common scripts for frontend projects that includes:

Coming soon:

The problem

Working on multiple frontend projects where you need to set up the same tools and processes and then maintain them across all of them is a tideous job.

This solution

Frontwerk is a CLI that abstracts away all those processes and configuration and exposes the same API that you can use across all your projects.

You can pick and choose which tools to use (i.e. if you don't want to format your JS with prettier, you don't have to).

Inspiration

This is heavily inspired by kcd-scripts by the amazing Kent C. Dodds (you should definitely follow him on Twitter by the way) and react-scripts.

So why not just use kcd-scripts? You absolutely should! We're not in a zero-sum game here. I basically wanted to learn how he created everything without even knowing I'd get this far!

Installation and usage

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

npm install --save-dev frontwerk

or with yarn:

yarn add --dev frontwerk

Usage

This is a CLI and exposes a bin called frontwerk. You can run

frontwerk

with no arguments to show a list of available commands. Or simply checkout the src/scripts directory for all the available scripts.

Then simply ammend your package.json scripts property to include the scripts you want to use:

{
  "scripts": {
    "lint:js": "frontwerk lint",
    "lint:css": "frontwerk stylelint",
    "test": "frontwerk test --no-watch",
    "test:watch": "frontwerk test",
    "build": "frontwerk build",
    "format": "frontwerk format"
  }
}

Overriding the configuration

Although it works out of the box, Frontwerk allows you to specify your own config for the various scripts, either by extending the config provided or just by using your own, depending on the script. Frontwerk respects the convention used by each of its underlying tools (eslint, stylelint, etc.). Basically, if it's possible with that tool, it's possible with frontwerk.

Example with ESLint

{
  "extends": "./node_modules/frontwerk/eslint.js",
  "rules": {}
}

or, simply start with your own config to pass to ESLint:

{
  "extends": "google"
}

Note that eslintignore is coincidentally ignored, so until this issue is resolved, please pass the eslint ignore as allowed by eslint's configuration.

Documentation

You can find more extensive documentation about each tool on the website.

LICENSE

MIT