{"id":13726784,"url":"https://github.com/vitali2y/pax","last_synced_at":"2025-06-17T15:09:20.196Z","repository":{"id":48190344,"uuid":"249205013","full_name":"vitali2y/pax","owner":"vitali2y","description":"nathan/pax recovered from Rust cache and Google cache","archived":false,"fork":false,"pushed_at":"2020-12-06T16:34:18.000Z","size":513,"stargazers_count":20,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T22:35:07.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitali2y.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-22T14:49:22.000Z","updated_at":"2025-01-16T14:17:16.000Z","dependencies_parsed_at":"2022-09-13T12:41:20.221Z","dependency_job_id":null,"html_url":"https://github.com/vitali2y/pax","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vitali2y/pax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitali2y%2Fpax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitali2y%2Fpax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitali2y%2Fpax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitali2y%2Fpax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitali2y","download_url":"https://codeload.github.com/vitali2y/pax/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitali2y%2Fpax/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260385227,"owners_count":23001014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:03:21.927Z","updated_at":"2025-06-17T15:09:15.187Z","avatar_url":"https://github.com/vitali2y.png","language":"Rust","funding_links":[],"categories":["Bundlers","Rust"],"sub_categories":[],"readme":"# Pax\n\nThe [fastest](#is-it-fast) JavaScript bundler in the galaxy. Fully supports ECMAScript module syntax (`import`/`export`) in addition to CommonJS `require(\u003cstring\u003e)`.\n\n- [Why do I need it?](#why-do-i-need-it)\n- [How do I get it?](#how-do-i-get-it)\n- [How do I use it?](#how-do-i-use-it)\n- [Does it do source maps?](#does-it-do-source-maps)\n- [Modules?](#modules)\n- [What are the options?](#what-are-the-options)\n- [Is it fast?](#is-it-fast)\n\n# Why do I need it?\n\nBecause your bundler is **too slow**.\n\nYou know the feeling. You make that tweak, hit \u003ckbd\u003e⌘S\u003c/kbd\u003e \u003ckbd\u003e⌘Tab\u003c/kbd\u003e \u003ckbd\u003e⌘R\u003c/kbd\u003e, and… **nothing changes**. You get the old version. You beat the bundler. You wait a few seconds, hit \u003ckbd\u003e⌘R\u003c/kbd\u003e again, and your changes finally show up. But it’s too late—**you’ve lost momentum.** It’s the wrong shade of pink. You spelled “menu” with a z. The bug still happens sometimes.\n\nRinse. Repeat. Ten cycles later, things are looking good. It’s time to `git commit`. But you spent **more time waiting than working**. And it’s your bundler’s fault.\n\nPax is a bundler. But you’ll never beat it. Why?\n\n- It’s parallelized. It makes the most of your cores.\n- It’s minimal. It isn’t bogged down by features you don’t need.\n- It knows exactly enough about JavaScript to handle dependency resolution. It doesn’t even bother parsing most of your source code.\n\nDon’t waste time waiting for your bundler to do its thing. Use Pax while you’re developing, and **iterate to your heart’s content**. Use your super-cool, magical, slow-as-molasses bundler for releases, when you don’t care how long it takes to run.\n\n# How do I get it?\n\n```sh\n\u003e cargo install pax\n```\n\nIf you don’t have `cargo`, install it with [https://rustup.rs](https://rustup.rs/).\n\n# How do I use it?\n\n```js\n// index.js:\nconst itt = require('itt')\nconst math = require('./math')\nconsole.log(itt.range(10).map(math.square).join(' '))\n\n// math.js:\nexports.square = x =\u003e x * x\n```\n\n```sh\n\u003e px index.js bundle.js\n```\n\nSlap on a `\u003cscript src=bundle.js\u003e`, and you’re ready to go. Pass `-w` to rebuild whenever you change a file.\n\n```sh\n\u003e px -w index.js bundle.js\n ready bundle.js in 1 ms\nupdate bundle.js in 1 ms\n...\n```\n\n# Does it do source maps?\n\nOf course!\n\n```sh\n# bundle.js and bundle.js.map\n\u003e px index.js bundle.js\n\n# bundle.js with inline map\n\u003e px --map-inline index.js bundle.js\n\n# bundle.js with no source map\n\u003e px index.js \u003ebundle.js\n# or\n\u003e px --no-map index.js bundle.js\n```\n\n# Modules?\n\nThat’s technically not a question. But yes.\n\n```js\n// index.mjs\nimport itt from 'itt'\nimport { square, cube } from './math'\n\nconsole.log(itt.range(10).map(square).join(' '))\nconsole.log(itt.range(10).map(cube).join(' '))\n\n// math.mjs\nexport const square = x =\u003e x * x, cube = x =\u003e x * x * x\n```\n\n```\n\u003e px -e index.mjs bundle.js\n```\n\nIf you need your modules to be in `.js` files for some reason, use `-E` (`--es-syntax-everywhere`) instead of `-e` (`--es-syntax`).\n\n# What are the options?\n\n```\n\u003e px --help\npax v0.4.1\n\nUsage:\n    px [options] \u003cinput\u003e [output]\n    px [-h | --help]\n\nOptions:\n    -i, --input \u003cinput\u003e\n        Use \u003cinput\u003e as the main module.\n\n    -o, --output \u003coutput\u003e\n        Write bundle to \u003coutput\u003e and source map to \u003coutput\u003e.map.\n        Default: '-' for stdout.\n\n    -m, --map \u003cmap\u003e\n        Output source map to \u003cmap\u003e.\n\n    -I, --map-inline\n        Output source map inline as data: URI.\n\n    -M, --no-map\n        Suppress source map output when it would normally be implied.\n\n    -w, --watch\n        Watch for changes to \u003cinput\u003e and its dependencies.\n\n    -W, --quiet-watch\n        Don't emit a bell character for errors that occur while watching.\n        Implies --watch.\n\n    -e, --es-syntax\n        Support .mjs files with ECMAScript module syntax:\n\n            import itt from 'itt'\n            export const greeting = 'Hello, world!'\n\n        Instead of CommonJS require syntax:\n\n            const itt = require('itt')\n            exports.greeting = 'Hello, world!'\n\n        .mjs (ESM) files can import .js (CJS) files, in which case the\n        namespace object has a single `default` binding which reflects the\n        value of `module.exports`. CJS files can require ESM files, in which\n        case the resultant object is the namespace object.\n\n    -E, --es-syntax-everywhere\n        Implies --es-syntax. Allow ECMAScript module syntax in .js files.\n        CJS-style `require()` calls are also allowed.\n\n    -x, --external \u003cmodule1,module2,...\u003e\n        Don't resolve or include modules named \u003cmodule1\u003e, \u003cmodule2\u003e, etc.;\n        leave them as require('\u003cmodule\u003e') references in the bundle. Specifying\n        a path instead of a module name does nothing.\n\n    --external-core\n        Ignore references to node.js core modules like 'events' and leave them\n        as require('\u003cmodule\u003e') references in the bundle.\n\n    -h, --help\n        Print this message.\n\n    -v, --version\n        Print version information.\n```\n\n# Is it fast?\n\nUmm…\n\nYes.\n\n```sh\n\u003e time browserify index.js \u003ebrowserify.js\nreal    0m0.225s\nuser    0m0.197s\nsys     0m0.031s\n\u003e time node fuse-box.js\nreal    0m0.373s\nuser    0m0.324s\nsys     0m0.051s\n\u003e time px index.js \u003ebundle.js\nreal    0m0.010s\nuser    0m0.005s\nsys     0m0.006s\n\n# on a larger project\n\u003e time browserify src/main.js \u003ebrowserify.js\nreal    0m2.385s\nuser    0m2.459s\nsys     0m0.416s\n\u003e time px src/main.js \u003ebundle.js\nreal    0m0.037s\nuser    0m0.071s\nsys     0m0.019s\n\n# want source maps?\n\u003e time browserify -d src/main.js -o bundle.js\nreal    0m3.142s\nuser    0m3.060s\nsys     0m0.483s\n\u003e time px src/main.js bundle.js\nreal    0m0.046s\nuser    0m0.077s\nsys     0m0.026s\n\n# realtime!\n\u003e px -w examples/simple bundle.js\n ready bundle.js in 2 ms\nupdate bundle.js in 2 ms\nupdate bundle.js in 2 ms\nupdate bundle.js in 1 ms\nupdate bundle.js in 2 ms\nupdate bundle.js in 1 ms\nupdate bundle.js in 3 ms\n^C\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitali2y%2Fpax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitali2y%2Fpax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitali2y%2Fpax/lists"}