{"id":21164712,"url":"https://github.com/chiefbiiko/ballify","last_synced_at":"2025-07-23T17:32:19.823Z","repository":{"id":129103464,"uuid":"115534975","full_name":"chiefbiiko/ballify","owner":"chiefbiiko","description":"bundle all frontend assets of your single page app into one ball :8ball: :basketball: :baseball: :football:","archived":false,"fork":false,"pushed_at":"2018-01-16T15:59:20.000Z","size":1271,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-14T16:42:19.506Z","etag":null,"topics":["ball","ballify","build-tool","devops","frontend-assets","simple","single-page-app","spa","utility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chiefbiiko.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-27T15:40:25.000Z","updated_at":"2019-11-22T11:06:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"4faf6f8e-ac30-4ce7-8c67-eb1b50a4aafd","html_url":"https://github.com/chiefbiiko/ballify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chiefbiiko/ballify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiefbiiko%2Fballify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiefbiiko%2Fballify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiefbiiko%2Fballify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiefbiiko%2Fballify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chiefbiiko","download_url":"https://codeload.github.com/chiefbiiko/ballify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiefbiiko%2Fballify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266719789,"owners_count":23973835,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ball","ballify","build-tool","devops","frontend-assets","simple","single-page-app","spa","utility"],"created_at":"2024-11-20T14:09:52.711Z","updated_at":"2025-07-23T17:32:19.800Z","avatar_url":"https://github.com/chiefbiiko.png","language":"JavaScript","readme":"# ballify\n\n[![build status](http://img.shields.io/travis/chiefbiiko/ballify.svg?style=flat)](http://travis-ci.org/chiefbiiko/ballify) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/chiefbiiko/ballify?branch=master\u0026svg=true)](https://ci.appveyor.com/project/chiefbiiko/ballify)\n\n***\n\nPack all frontend assets of a single page app into a single **_ball_**.\n\n`ballify` bundles all assets that are linked into a `HTML` file and concatenates them into one big *ball*, yet another `HTML` file (`brotli`-compressed by default). It packs scripts (empty ones with no innerText/code), stylesheets, images (`jpg`, `gif`, `png`, `svg`), and Google Fonts (loaded via a `link` element). Assets can be read from local or remote sources.\n\n`ballify` is designed to be used with single page apps that are built with ordinary web technologies and do not require toooo many frontend assets.\n\n***\n\n## Get it!\n\nFor programmatic usage do:\n\n```\nnpm install --save-dev ballify\n```\n\nInstall it globally if you are gonna use the command line interface:\n\n```\nnpm install --global ballify\n```\n\n***\n\n## Usage\n\n### CLI\n\nSimply bundle up all assets that are linked into `index.html` and write that to `ball.html.br`:\n\n```\nballify index.html -o ball.html.br\n```\n\nBallify your single page app and spin up a local devserver @ `localhost:419`:\n\n```\nballify index.html --live\n```\n\nYou can set all options from the command line. Make sure 2 check out `ballify --help`.\n\n### `node`\n\n``` js\nvar ballify = require('ballify')\n\nballify('index.html', function (err, ball) {\n  if (err) return console.error(err)\n  console.log(ball) // ball is a buffer\n})\n```\n\nThe *ball* is `brotli`-compressed by default. Set `opts.brotli` to `false` to prevent compression, see below.\n\n***\n\n## API\n\n### `ballify(file[, opts], callback)`\n\nBallify a `HTML` file. The callback has the signature `callback(err, ball)`, with the *ball* being a buffer. Options default to:\n\n``` js\n{\n  brotli: true // compress the ball with brotli?\n  gzip: false, // gzip the ball?\n  base64Images: true, // convert image references to base64 data uris?\n  base64GoogleFonts: true, // convert Google Font links to base64 inline fonts?\n  minifyCSS: true, // remove unnecessary whitespace from CSS?\n  mergeCSS: true, // merge recurring selectors within CSS?\n  crunchHTML: true // remove unnecessary whitespace from HTML?\n}\n```\n\nNote that `ballify` treats `opts.brotli` and `opts.gzip` as mutually exclusive, meaning you can either use one or the other but not both.\n\nIf `opts.base64Images` is `true` image urls are converted to base64 data uris within `HTML`, `CSS`, and `JS` files. Google Fonts are only converted to inline fonts if they are loaded via an ordinary `link` element.\n\n***\n\n## Why\n\nTo keep things simple. To serve all frontend assets in one response.\n\nGo ahead and use `ballify` if you are into single page apps and ready to **_ball_** up!.\n\n***\n\n## License\n\n[MIT](./license.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiefbiiko%2Fballify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchiefbiiko%2Fballify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiefbiiko%2Fballify/lists"}