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

tauque

v1.5.1

Published

Tauque is a zero-configuration JS/TS bundler with serious pulling power. It's up to 100x quicker than Rollup/Webpack with Babel.

Downloads

39

Readme

Tauque logo

Tauque (pronounced /tɔːk/, like torque) is a zero-configuration JS/TS bundler with serious pulling power. It uses esbuild under the cover, meaning it transpiles up to 100x quicker than Rollup/Webpack with Babel.

Install:

npx install-tauque

Create a dist folder with bundles (no-config needed):

npm run dev

Tauque bundling example

Tauque can bundle

  • JavaScript (with optional transpilation)
  • TypeScript
  • JSX
  • CSS (files and js imports)
  • JSON

Dev mode watching for file changes and running cumulative builds, most taking around 10ms:

Tauque bundling example

Install

Install Tauque on a project that's already set up, and it'll take your entry point from package.json (or try to find it elsewhere) and automatically create a config file that's ready to run.

npx install-tauque

Ready to go!

Tauque is now ready to run. Bundles will be written to the dist folder by default. Run tauque dev mode with:

npm run dev

A single time build can also be run with:

npm run build

Alternative install

You can also Tauque without building config and readme files:

npm install tauque

Config options

A tauque.json config file will automatically be generated when you first install Tauque. This should be placed alongside package.json in your project root.

All config options, with default settings:

// Name of the final file (required)
"name": "packageName"

// Location of the entry point (required)
"source": "src/index.js",

// Package type: "module" (also "esm"); "browser" (also "iife"); "node" (also "cjs"); "all"
"type": "all",

// Global variable name of export in browser/iife packages
"global": "packageName",

// Directory for output package
"outputDir": "dist",

// Directory to watch for changes
"watchDir": "src",

// Target environment, eg: ["es2020", "chrome58", "firefox57", "node12.19.1"]
"target": ["es6"],

// Bundle imports: true, false
"bundle": true,

// Minify package: true, false
"minify": true,

// Generate separate source map file
"sourceMap": true,

// Automatically add environment variables
"useEnvVariables": true,

// Native esbuild settings to pass on (overrides Tauque)
"esbuild": {}  

Note that comments are not allowed in JSON files.


Config examples

A list of tauque.json config examples with the dist folders they create. All unset options inherit the default settings shown above.

Single output config

{
  "name": "my-package",
  "source": "src/index.js"
}
- dist/
  ¬ my-package.browser.js
  ¬ my-package.browser.js.map
  ¬ my-package.module.js
  ¬ my-package.module.js.map
  ¬ my-package.node.js
  ¬ my-package.node.js.map

Multiple output config

[
  {
    "name": "my-iife-package",
    "source": "src/index.js",
    "type": "browser"
  },
  {
    "name": "my-esm-package",
    "source": "src/index.js",
    "type": "module"
  }
]
- dist/
  ¬ my-iife-package.js
  ¬ my-iife-package.js.map
  ¬ my-esm-package.js
  ¬ my-esm-package.js.map

Multiple input/output config

[
  {
    "name": "my-client",
    "source": "src/client.js",
    "outputDir": "dist/client",
    "type": "browser"
  },
  {
    "name": "my-server",
    "source": "src/server.js",
    "outputDir": "dist/server",
    "type": "node"
  }
]
- dist/
  - client/
    ¬ my-client.js
    ¬ my-client.js.map
  - server/
    ¬ my-server.js
    ¬ my-server.js.map

Complex config

[
  {
    "name": "client",
    "source": "src/client/index.js",
    "outputDir": "build-client",
    "type": "browser",
    "sourcemap": false,
    "minify": false,
    "esbuild": {
      "banner": "/* Package made by CTNicholas */",
      "define": {
        "mode": "debug"
      }
    }
  },
  {
    "name": "client.min",
    "source": "src/client/index.js",
    "outputDir": "build-client",
    "type": "browser"
  },
  {
    "name": "server",
    "source": "src/server.js",
    "outputDir": "build-server",
    "type": "node",
    "sourcemap": false,
    "minify": false,
    "bundle": false
  }
]
- build-client/
  ¬ client.js
  ¬ client.min.js
  ¬ client.min.js.map
  
- build-server/
   ¬ server.js