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

weldable

v3.2.2

Published

A webpack configuration tool.

Downloads

528

Readme

weldable

Build coverage License

Default webpack development and production configuration.

The goal of weldable is to make it easier to install webpack build packages and be up and running with a basic development or production build with minimal preferences.

weldable is intended...

  • To be quickly used for basic webpack development and production builds.
  • To purposefully not include webpack configurations for JS frameworks beyond basic JS and exposing basic related NPM loader packages.
  • To purposefully not include webpack configurations for linting and styling aspects beyond basic webpack capabilities.
  • To be designed with the expectation that you can expand on the weldable base using the CLI extend option. -x ./webpack.exampleConfig.js.
  • To be used as a single build resource with exposed webpack plugins/addons. And without the need to reinstall available webpack packages (or at least the ones weldable uses).

If weldable doesn't work for you, you can always go back to the webpack project init command

Requirements

The basic requirements:

  • NodeJS version 18.12.0+
  • NPM

    There appear to be dependency mapping issues with Yarn v1.x.x lock files, Typescript and webpack, and specific dependencies using ES modules. If you do decide to use Yarn use the latest version.

Install CLI and package

NPM install...

  $ npm i weldable --save-dev

or Yarn

  $ yarn add weldable --dev

How to use

For in-depth use of weldable see our DOCS.

Basic CLI use

  $ weldable --help
  Use a webpack configuration for development and production.

  Usage: weldable [options]

  Options:
  -e, --env           Use a default configuration type if NODE_ENV is not set to the available choices.
                                                                                          [string] [choices: "development", "production"] [default: "production"]
  -l, --loader        Preprocess loader, use the classic JS (babel-loader), TS (ts-loader), or "none" to use webpack defaults, or a different loader.
                                                                                                           [string] [choices: "none", "js", "ts"] [default: "js"]
  -s, --stats         Stats output level for NodeJS API
                          [string] [choices: "errors-only", "errors-warnings", "minimal", "none", "normal", "verbose", "detailed", "summary"] [default: "normal"]
      --standalone    Standalone webpack configuration. Output weldable webpack config functions and update package.json so you can do whatever you want.
                                                                                                                                       [boolean] [default: false]
      --statsFile     Output JSON webpack bundle stats. Use the default, or a relative project path and filename [./stats.json]                          [string]
      --tsconfig      Generate a base tsconfig from NPM @tsconfig/[base]. An existing tsconfig.json will override this option, see tsconfig-opt. This option can
                      be run without running webpack.  [string] [choices: "", "create-react-app", "node18", "node20", "react-native", "recommended", "strictest"]
      --tsconfig-opt  Regenerate or merge a tsconfig                                                                         [string] [choices: "merge", "regen"]
  -x, --extend        Extend, or override, the default configs with your own relative path webpack configs using webpack merge.                           [array]
  -h, --help          Show help                                                                                                                         [boolean]
  -v, --version       Show version number                                                                                                               [boolean]

Example NPM scripts

A basic development start, and production build, using your own op

"scripts": {
  "start": "weldable -e development",
  "build": "weldable"
}

A development start, and production build, using your own webpack configurations merged with the defaults.

"scripts": {
  "start": "weldable -e development -x ./webpack.yourCustomBuild.js -x ./webpack.developmentBuild.js",
  "build": "weldable -x ./webpack.yourCustomBuild.js -x ./webpack.productionBuild.js"
}

Basic lib use

The lib aspect of weldable is exported as CommonJS and is intended to be run as part of your build process without the need to install many additional packages.

Two primary things are exposed through weldable...

  • packages, such as webpack-merge
  • and weldable "helper" functions

Example packages use...

const packages = require('weldable/lib/packages');

const aPackage = packages.[PACKAGE_NAME];

Example helper function use...

const { dotenv } = require('weldable');

const dotenvFunc = dotenv.[FUNC];

A listing of exposed packages and weldable functions can be found under our DOCS or package.json dependencies.

Credit

This project is influenced by Create React App and other packaging tools.

Contributing

Contributing? Guidelines can be found here CONTRIBUTING.md.