jameswomack / snorepack

the boringest pack tool in the alpha quadrant™

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snorepack

💤💤💤 the boringest javascript pack tool in the alpha quadrant™ 💤💤💤

hey folks! jimmy womack here... are you tired of javascript pack tools that pretend they're doing all sorts of magic 🪄 when all they're really doing is unnecessary bullshit that only 2% of the userbase needs? want a pack tool that'll do the bare minimum and be honest about it for a change? well do i have something for you 👉

snorepack goes where no build tool has gone before—to a 💤restful💤 place where good folk build meaningless npm packages that waste your time... but are honest about it. snorepack promises to put up a snoretastic spinner up for 2h... then merely wrap your javascript modules in an iife & optionally execute the result in the node context. now don't worry folks—good ol' snorey will find all your requires|imports and pack those for ya too! snorepack puts everyone to sleep whether they use esm or commonjs—i guarantee it 💰

guaranteed baby

commands for snoretastic development

git clone git@github.com:jameswomack/snorepack.git && cd snorepack
npm i && npm link # local testing pre-npm publish—npm has banned me from the bldg for building packages like this
snorepack ./example/esm.js --preview-output --snore-duration=10000 # override default 2h snore duration
npm t
npm run lint

previews to dream about

w/ this as an entrypoint

esm-entrypoint

& this as one of its imports

console-esm

snorepack will start snoring like so

example-snoring

& output the results of the packed project like so

example-output-preview

💤 let's go from boring to snoring everyone! 💤

after running these cmds, see .snore/ output for results*

converting a commonjs module

snorepack ./example/cjs.js

converting an esm module

snorepack ./example/esm.js

converting a module & auto-executing the result in node

snorepack ./example/esm.js --preview-output

converting a module w/ the default test snore/spinner duration (i.e. reduced from 2h to 5s)

snorepack ./example/esm.js --snore-duration=test

converting a module w/ a specific other snore/spinner duration

snorepack ./example/esm.js --snore-duration=1000

print required command format

snorepack --help

About

the boringest pack tool in the alpha quadrant™

License:MIT License


Languages

Language:JavaScript 92.6%Language:Shell 7.4%