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

xtsz

v0.0.8

Published

TypeScript & Node.js runner with ESM, CJS, and HTTP/S imports support.

Downloads

6

Readme

NOTE: youmust be on Node.js LTS (v18) or higher

This is like tsx but with https imports support + ability to run external files directly from CLI + only 1 dependency: esbuild

If file is .js, .cjs, .mjs, .ts, .cts, or .mts, it will bundled with esbuild on the fly then executed with Node.js.

If the file is css, txt, md, html, svg, xml, yaml, yml, toml, csv, sql, graphql, or gql it will be read and printed to the console.

xtsz

Install

# pnpm
pnpm add --global xtsz@latest
# yarn
yarn global add xtsz@latest
# npm
npm install --global xtsz@latest

Run

xtsz ./path/to/file.ts

as a devDependency

# install
pnpm add --save-dev xtsz@latest
# run
pnpm dlx xtsz ./path/to/file.ts
# or
xtsz https://gist.githubusercontent.com/o-az/e8ed1e89fde52af306099ed28e297cae/raw/f997df001ee197f638af14d09309eb3c060240b0/sample-iife.js
xtsz is a TypeScript and JavaScript (Node.js) file runner that supports https-imports and running external files directly from CLI.
It can run ESM and CJS: .ts, .js, .cjs, .mjs.

Usage:
  $ xtsz <filepath>
  $ xtsz <url>

Options:
  -f, --file  The file to run. Can be passed as a flag or as the only argument with no other flags.
  -u, --url   The url to run. Can be passed as a flag or as the only argument with no other flags.
  -h, --help  Show this help message.

Examples:
  $ xtsz ./src/index.ts
  $ xtsz --file ./src/index.cjs

  $ xtsz https://gist.githubusercontent.com/o-az/e8ed1e89fde52af306099ed28e297cae/raw/f997df001ee197f638af14d09309eb3c060240b0/sample-iife.js

  $ xtsz help, --help, -h

  - "What is https imports?"
  See https://nodejs.org/api/esm.html#https-and-http-imports

  - "How does this package work?"
  It uses a custom esbuild plugin to handle https imports and uses Node.js to run TypeScript & ESM.

    BUGS
  https://github.com/o-az/xtsz/issues