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

@poach/core

v0.0.3

Published

Helps transpiling, linting, and bundling node modules for the web.

Downloads

1

Readme

Poach-core

The base Poach recipe.

This recipe configures the following tools

in order to provide the following features

  • Modern javascript.
  • Code linting.
  • Dev server with live reload.
  • Ability to build your project as a static app.
  • Ability to build your project as a UMD.

We advise you get at least familiar with the mentioned tools before using this recipe.

Setup

  • Create a standard node module
mkdir your-project && cd $_ && npm init 
  • Install @poach/core as a dev dependency of your project:
npm i --save-dev @poach/core
  • Add the following to your package.json:
...
"main": "dist/umd/umd.js",
"scripts": {
    ...
    "build:app": "webpack --config webpack.app.js",
    "build:umd": "webpack --config webpack.umd.js",
    "build": "npm run build:app && npm run build:umd",
    "start": "webpack-dev-server --config webpack.dev.js"
    ...
},
...
  • Copy the content of node_modules/@poach/core/src/boilerplate in the root folder of your project.
cp -R node_modules/@poach/core/boilerplate/ .

That's it, you can now use the following scripts:

  • npm run start will start your application in development mode using src/index.js as entry point.
  • npm run build:app will bundle your code as a static web application using src/index.js as entry point and dist/app as output directory.
  • npm run build:umd will bundle your code as UMD using src/module/index.js as entry point and dist/umd/umd.js as output.
  • npm run build will start npm run build:app and npm run build:umd one after the other.

How is this different from a boilerplate project?

Notice that most of the files you just copied form node_modules/@poach/core/src/boilerplate don't do anything else but importing configuration form @poach/core.

Importing base configuration from @poach/core instead of just pasting it within your files is useful because it will give poach a chance to improve/upgrade the configuration when you upgrade the poach version in your package.json.

Copying files in your root directory is useful for the following reasons:

  • Given that these files are in the root folder of your project your IDE will be able to use them automatically.
  • You can use these files to customize the configuration coming from @poach/core if needed.

That's it, if you inspect your project there is nothing hidden from you, the project should have a simple and familiar structure.

What's next

Let's say you want to add Typescript and/or React to your project you can simply install the related recipes.

Recipes are available here.