{"id":28356749,"url":"https://github.com/trulia/grunt-multibundle-requirejs","last_synced_at":"2025-07-29T11:07:02.185Z","repository":{"id":57255407,"uuid":"42273126","full_name":"trulia/grunt-multibundle-requirejs","owner":"trulia","description":"Grunt task for handling multi-bundle requirejs setup","archived":false,"fork":false,"pushed_at":"2016-02-02T18:44:52.000Z","size":135,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-28T12:00:18.070Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/grunt-multibundle-requirejs","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/trulia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-10T22:05:19.000Z","updated_at":"2020-06-06T18:52:47.000Z","dependencies_parsed_at":"2022-09-04T14:54:23.698Z","dependency_job_id":null,"html_url":"https://github.com/trulia/grunt-multibundle-requirejs","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/trulia/grunt-multibundle-requirejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trulia%2Fgrunt-multibundle-requirejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trulia%2Fgrunt-multibundle-requirejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trulia%2Fgrunt-multibundle-requirejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trulia%2Fgrunt-multibundle-requirejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trulia","download_url":"https://codeload.github.com/trulia/grunt-multibundle-requirejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trulia%2Fgrunt-multibundle-requirejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267677093,"owners_count":24126309,"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-29T02:00:12.549Z","response_time":2574,"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":"2025-05-28T07:09:27.518Z","updated_at":"2025-07-29T11:07:02.177Z","avatar_url":"https://github.com/trulia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-multibundle-requirejs\n\n\u003e Grunt task for handling multi-bundle requirejs setup\n\n[![Build Status](https://img.shields.io/travis/trulia/grunt-multibundle-requirejs.svg)](https://travis-ci.org/trulia/grunt-multibundle-requirejs)\n[![bitHound Overall Score](https://www.bithound.io/github/trulia/grunt-multibundle-requirejs/badges/score.svg)](https://www.bithound.io/github/trulia/grunt-multibundle-requirejs)\n[![Join the chat at https://gitter.im/trulia/grunt-multibundle-requirejs](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/trulia/grunt-multibundle-requirejs)\n\n## Getting Started\nThis plugin requires Grunt `^0.4.5`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-multibundle-requirejs --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-multibundle-requirejs');\n```\n\n## The \"multibundle_requirejs\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `multibundle_requirejs` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  'multibundle-requirejs': {\n    options: {\n      _config: {\n        // task \"global\" options\n      },\n\n      bundle_one: [\n        // bundle specific config go here\n      ],\n\n      bundle_two: [\n        // bundle specific config go here\n      ]\n    }\n  },\n});\n```\n\n### Options\n\nExample file with all the options could be found here [Gruntfile.js](Gruntfile.js).\n\n#### options._config\nType: `Object`\n\n\"Global\" config object for the task\n\n#### options.[bundle_name]\nType: `Array`\n\nList of modules to bundle into [bundle_name].\n\n### _config object\n\n#### _config.logLevel\nType: `Number`\nDefault value: `1`\n\nControls log level of the task and requirejs bundler, `4` being silent.\n\n#### _config.destination\nType: `String`\nDefault value: `undefined`\n\nOutput folder for the bundles.\n\n#### _config.sharedBundles\nType: `Array`\nDefault value: `undefined`\n\nDefines list of the shared bundles (order matters), all the modules included in the shared bundles,\nwill be excluded from other modules.\n\n#### _config.hashFiles\nType: `Boolean|Function`\nDefault value: `undefined`\n\nIf enabled adds md5 hash (over bundle's content) to the bundle's filename.\nCould be a function (`hashFiles(output, componentOptions)`), then it will be responsible for producing content hash.\n\n#### _config.handleMapping\nType: `Function`\n\nAccepts two arguments `options` - options object passed to the grunt task,\nand `grunt` - grunt instance itself.\n\nExpected to return mapper instance, either `WriteStream` or a function,\nthat will be called after each bundle creation with respective `buildObject`,\nto allow modules-bundle mapping. Will be called one extra time with no arguments\nafter all the bundles processed. In case of WriteStream, bundler's ReadStream will piped into it.\nFor example of the mapping write stream, see [multibundle-mapper](https://www.npmjs.com/package/multibundle-mapper).\n\n#### _config.baseUrl\nType: `String`\nDefault value: `undefined`\n\nThe root path to use for all module lookups. Passed to r.js. Also used as destination if `_config.destination` is omitted.\n\n#### _config.optimize\nType: `String`\nDefault value: `none`\n\nMinifier option, passed to r.js.\n\n#### _config.paths\nType: `Object`\nDefault value: `undefined`\n\nPath mappings for module names not found directly under baseUrl. Passed to r.js.\n\n#### _config.preserveLicenseComments\nType: `Boolean`\nDefault value: `false`\n\nControls preseces of the license comments in the minified files. Passed to r.js.\n\n### [bundle] list\n\n#### [bundle].[filepath]\nType: `String`\nExample: `'app/lib/my_module.js'`\n\nAdds specified file to the parent bundle.\n\n#### [bundle].[glob_mask]\nType: `String`\nExample: `'app/lib/**/*.js'`\n\nAdds all the files matched the pattern to the parent bundle.\n\n#### [bundle].[simple_object]\nType: `Object`\nExample: `{'main': 'assets/js/public/main'}`\n\nAdds named module from specified filepath to the parent bundle.\n\n#### [bundle].[feature_object]\nType: `Object`\nExample: `{'backbone': {src: 'node_modules/backbone/backbone.js', deps: ['jquery', 'underscore'], exports: 'Backbone', insertRequire: true}}`\n\nAdds named module from specified source to the parent bundle, with explicitly set dependencies.\nand creates shim to make it AMD-compatible by exporting global object. Also adds require call to execute module in-place.\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 before committing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrulia%2Fgrunt-multibundle-requirejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrulia%2Fgrunt-multibundle-requirejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrulia%2Fgrunt-multibundle-requirejs/lists"}