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

@hloth/scaffold

v1.0.7

Published

NPX tool for me to easily scaffold new project, containing TypeScript config for modern ES, eslint with my favorite code style and Jest tests with ts support

Downloads

9

Readme

Scaffold

NPX tool for me to easily scaffold new project, containing TypeScript config for modern ES, eslint with my favorite code style and Jest tests with TS support.

Moreover, this tool was scaffolded with itself! It tests itself automatically with Jest after each build by creating simple test project and testing Jest with Jest's test.

This project is mostly for demonstrating which defaults I use, it is not intended to be used by anyone, simply because everyone has it's own preferences, so don't judge me for using X here. Though I'm still accepting any criticism that may help me improve this setup to work faster and better :)

Size of generated project is just 142 MB with all dependencies

I think there is a better alternatives to some things I use here, so suggest me alternative tools in the Issues tab if you know:

  • ~~Append .js extension to imports during build~~
    • ~~Currently is done using external @zoltu/typescript-transformer-append-js-extension plugin with ttypescript~~
  • ~~Build replacing process~~
    • ~~Currently ./out dir is removed via external del-cli package and then files are copied via cpy-cli which may pose threat with security vulnerabilities. Maybe change to native commands such as rm and cp?~~
  • Add support for Yarn when installing dependencies

Tool usage

npx @hloth/scaffold project-name --tests

or

git clone https://github.com/VityaSchel/scaffold && cd scaffold && npm i && npm run set && sf project-name

Generated project usage

Project structure

.
├── src
│   ├── .env.ts
│   └── index.ts
├── out
├── test
│   └── index.test.ts
├── .env
├── babel.config.cjs
├── jest.config.js
├── tsconfig.json
├── .swcrc
├── LICENSE.md
├── package.json
└── package-lock.json

Scripts

Build: npm run build Run: npm start or node out/index.js Test (with TypeScript): npm test

Building

Previusly building was done with ttsc which is a postprocessor for Typescript with plugins support. In v1.0.1 it was replaced with esbuild and then swc. swc was faster, so now we're using it.