{"id":20438326,"url":"https://github.com/seebigs/bundl-pack","last_synced_at":"2026-01-08T00:42:52.220Z","repository":{"id":57191513,"uuid":"78239578","full_name":"seebigs/bundl-pack","owner":"seebigs","description":"Pack project dependencies into one JS file. Easily include external HTML and CSS files as strings. Pre-process LESS, SASS, CoffeeScript, and more...","archived":false,"fork":false,"pushed_at":"2018-11-17T22:03:53.000Z","size":134,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-10T06:09:06.226Z","etag":null,"topics":["bundles","dependencies","pack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/seebigs.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":"2017-01-06T21:18:57.000Z","updated_at":"2019-07-02T18:11:12.000Z","dependencies_parsed_at":"2022-09-01T06:02:00.687Z","dependency_job_id":null,"html_url":"https://github.com/seebigs/bundl-pack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seebigs%2Fbundl-pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seebigs%2Fbundl-pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seebigs%2Fbundl-pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seebigs%2Fbundl-pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seebigs","download_url":"https://codeload.github.com/seebigs/bundl-pack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246280874,"owners_count":20752202,"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":["bundles","dependencies","pack"],"created_at":"2024-11-15T09:10:25.952Z","updated_at":"2026-01-08T00:42:52.172Z","avatar_url":"https://github.com/seebigs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bundl-pack\n\n*Pack project dependencies into one JS file. Easily include external HTML and CSS files as strings. Pre-process LESS, SASS, CoffeeScript, and more...*\n\n*Supports ES6 imports via [bundl-pack-babel](https://github.com/seebigs/bundl-pack-babel)*\n\nDefault processors automatically handle the requiring/importing of the following extensions. (Default behavior can be modified or overridden, and [plugins already exist](https://github.com/seebigs/bundl/wiki/Popular-Plugins#modules--dependencies) to allow easy importing of many other popular file types)\n* js\n* json\n* css\n* html\n\n---\n\n# Use as a plugin\n\n```\n$ npm install --save-dev bundl-pack\n```\n\n```js\nvar Bundl = require('bundl');\nvar pack = require('bundl-pack');\nvar write = require('bundl-write');\n\nvar packOptions = {\n    paths: ['/src/javascripts'],\n};\n\nnew Bundl('entry.js')\n    .then(pack(packOptions))\n    .then(write())\n    .go();\n```\n\n# Use standalone\n\nIf you want to just pass a String of contents and return the packaged result, you can do the following:\n\n```js\nvar pack = require('bundl-pack');\nvar fileContents = '...';\npack.create(fileContents, options, function (packed) {\n    console.log(packed);\n});\n```\n\n---\n\n# Options\n\n## .allowCircular\nBy default, circular dependencies will throw an error. Set this option to `true` to suppress this error and continue packaging anyways.\n```js\n{\n    allowCircular: true,\n}\n```\n\n## .exitProcessOnError\nA message will always be printed if a syntax error is encountered while packing. This option controls whether to halt the process or continue. Defaults to `true`.\n```js\n{\n    exitProcessOnError: false,\n}\n```\n\n## .leadingComments\nDisplay a comment at the top of every module showing the full module path. Defaults to `true`.\n```js\n{\n    leadingComments: false,\n}\n```\n\n## .obscure\nHide relative path names from require statements (`require('../path/file.js')` becomes `require(2)`)\n```js\n{\n    obscure: true,\n}\n```\n\n## .paths\nAn array of paths to use when resolving required/imported files\n```js\n{\n    paths: [\n        'src/javascripts',\n        'src/stylesheets',\n    ]\n}\n```\n\n## .[extension]\nDefine processors and options for files of any type. See [plugins](https://github.com/seebigs/bundl/wiki/Popular-Plugins#modules--dependencies)\n```js\nvar babelProcessor = require('bundl-pack-babel');\nvar lessProcessor = require('bundl-pack-less');\n\n{\n    css: {\n        compatibility: 'ie8',\n        autoInject: false,\n    },\n    html: {\n        removeComments: false,\n    },\n    json: {\n        autoInject: false,\n    },\n    less: lessProcessor({\n        relativeUrls: false,\n    }),\n    js: babelProcessor({\n        presets: ['es2015'],\n    }),\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseebigs%2Fbundl-pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseebigs%2Fbundl-pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseebigs%2Fbundl-pack/lists"}