{"id":19816741,"url":"https://github.com/welldone-software/gulp-bundle-file","last_synced_at":"2026-06-08T13:31:10.170Z","repository":{"id":19987253,"uuid":"23254460","full_name":"welldone-software/gulp-bundle-file","owner":"welldone-software","description":"Creates a simple bundle file that reference other css/js resources","archived":false,"fork":false,"pushed_at":"2014-08-24T02:58:41.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T07:21:22.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/welldone-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-23T11:38:58.000Z","updated_at":"2014-08-24T02:27:36.000Z","dependencies_parsed_at":"2022-08-21T16:00:59.874Z","dependency_job_id":null,"html_url":"https://github.com/welldone-software/gulp-bundle-file","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/welldone-software/gulp-bundle-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-bundle-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-bundle-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-bundle-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-bundle-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welldone-software","download_url":"https://codeload.github.com/welldone-software/gulp-bundle-file/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welldone-software%2Fgulp-bundle-file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34065347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-11-12T10:10:29.429Z","updated_at":"2026-06-08T13:31:08.134Z","avatar_url":"https://github.com/welldone-software.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-bundle-file\n\n\u003e A [Gulp](http://gulpjs.com/) plugin for bundling js and css resources as an external reference.\n\n## Overview\n\nThe plugin is minimalistic and simple. It generates the bundle file on the fly and adds it to the stream of files passing through it.\n\nFor example, the following folder structure:\n\n```\n+ src\n    - file1.js\n    + fldr\n        - file1.js\n        - file2.js\n```\n\nAnd gulp task: \n\n```js\ngulp.task('bundle.js', function() {\n    return gulp.src('src/**/*.js')\n        .pipe(bundle('bundle.js', {\n            type: 'js', //can be ommited, it is the default\n            base: 'src'\n        }))\n        .pipe(gulp.dest('dst'));\n});\n```\n\nResults in a directory like so:\n\n```\n+ dst\n    - bundle.js\n    - file1.js\n    + fldr\n        - file1.js\n        - file2.js\n```\n\n\nAnd a bundle.js content like so:\n\n```js\ndocument.write('\u003cscript src=\"file1.js\"\u003e\u003c/script\u003e');\ndocument.write('\u003cscript src=\"fldr/file1.js\"\u003e\u003c/script\u003e');\ndocument.write('\u003cscript src=\"fldr/file2.js\"\u003e\u003c/script\u003e');\n```\n\nA css bundling task is similar and looks like this:\n\n```js\ngulp.task('bundle.css', function() {\n    return gulp.src('src/**/*.css')\n        .pipe(bundle('bundle.css', {\n            type: 'css',\n            base: 'src'\n        }))\n        .pipe(gulp.dest('dst'));\n});\n```\n\nThe content of the bundle.css is the following:\n\n```css\n@import url(file1.css);\n@import url(fldr/file1.css);\n@import url(fldr/file2.css);\n```\n\n\n## Parameters\n\n`bundle(bundleName, options)`\n\n### bundleName\nType: `String`\n\nThe name of the bundle file. \nThis file is added to the stream of files passing through the plugin. It is a gulp only file, and must be saved using `gulp.dest` or a similar facility to be available in the file system. \n\n### options\n\n#### options.emitInputFiles\nType: `Boolean`\nDefault value: `true`\n\nBy default, the plugin emits all input files before it emits the bundle file, so it add one file to the stream of files. Setting this option to `false`, will cause the plugin to filter out all input files and only emit the bundle file.\n\n#### options.type\nType: `String`\nDefault value: `'js'`\n\nEither 'js' or 'css'. Determine the type of the bundle file i.e wether it uses `\u003cscript src=\"\"\u003e` or `\u003clink rel=\"\"\u003e` tag to reference the external files.\n\n#### options.base\nType: `String`\n\nThe base to use for the bundle file and the input file. Determines the relative path used for the href and src attributes.\n\n\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Gulp](http://gulpjs.com/).\n\n## Release History\n - 1.0.0 - Basic features.\n\n## License\n[MIT](https://github.com/welldone-software/gulp-bundle-file/blob/master/LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelldone-software%2Fgulp-bundle-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelldone-software%2Fgulp-bundle-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelldone-software%2Fgulp-bundle-file/lists"}