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

@growflow/babel-preset-node

v5.6.0

Published

Babel preset for GrowFlow node apps.

Downloads

6

Readme

GrowFlow Babel Preset

Shareable ESLint, Prettier, and TypeScript configuration to be used in Javascript/TypeScript applications to apply syntax and styling rules across GrowFlow projects.

Usage

You can easily install these packages and all of their peer dependencies with install-peerdeps:

npx install-peerdeps --dev @growflow/eslint-config
npx install-peerdeps --dev @growflow/prettier-config
npx install-peerdeps --dev @growflow/tsconfig

You can then create a .eslintrc.js file with content similar to the following:

module.exports = {
  extends: ['@growflow'],
  parserOptions: {
    project: 'tsconfig.json',
  },
};

Add a prettier field to your package.json to use the shared prettier config:

{
	"name": "my-cool-app",
	"version": "1.0.0",
	"prettier": "@growflow/prettier-config"
}

Add a tsconfig.json to the root of your project with contents similar to the folowing:

{
	"extends": "@growflow/tsconfig",
	"include": ["src", "test"]
}

Editor Integration

You should be able to use your favorite editor's (*cough* VS Code) ESLint and/or Prettier plugin to easily format your code on save or with the Format command.

Developing

Clone this repo and run yarn from the repository's root to install dependencies.

Creating a new package

  1. First create a new top-level folder.
  2. Copy one of the existing package's package.json to your new folder and tweak the values.
  3. Inside the root package.json file, add the new folder to the workspaces property.

Develop locally against an external app

In order for a local copy of an external frontend to use a local copy of one of these packages (e.g. @growflow/eslint-config), we have to "link" them locally.

Normally we would use yarn link to achieve this, but there are known issues that cause errors with React.

The best alternative solution is to use the utility yalc.

The below examples use @growflow/eslint-config and wholesale-frontend as an example.

First, make sure to install yalc globally on your machine:

yarn global add yalc
or
npm i yalc -g

Then,

  1. Inside the eslint folder, run yalc publish.
  2. Inside wholesale-frontend, inside the root package.json file, under the workspaces property, add a new entry .yalc/@*/* (this only needs to be done one time)
  3. Inside wholesale-frontend, run yalc link "@growflow/eslint-config" and yarn install
  4. That should be it. If something isn't right, run yarn clean and re-run yarn install
  5. When you are done developing, and before you push any changes, make sure you run yalc remove --all. This prevents yarn.lock from incorrectly thinking there is a local copy of @growflow/eslint-config instead of pulling from npm.

Publishing

This repository uses lerna to manage its packages.

Don't manage version numbers within package.json by hand. Instead, after you have made and pushed your changes, run:

yarn release

which will guide you in bumping the version and confirm what packages are about to be published. It will also auto-create tags. You can then create a release in GitHub on the generated tag to create a changelog.