{"id":13775356,"url":"https://github.com/chrisprice/grunt-rollup","last_synced_at":"2025-08-20T22:30:54.634Z","repository":{"id":1353217,"uuid":"42399112","full_name":"chrisprice/grunt-rollup","owner":"chrisprice","description":"Grunt plugin for rollup - next-generation ES6 module bundler","archived":false,"fork":false,"pushed_at":"2023-02-11T10:12:31.000Z","size":1327,"stargazers_count":21,"open_issues_count":7,"forks_count":27,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-26T22:42:34.770Z","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/chrisprice.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":".github/funding.yml","license":"license","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"gmartigny","tidelift":"npm/grunt-rollup"}},"created_at":"2015-09-13T14:36:28.000Z","updated_at":"2022-01-23T14:46:04.000Z","dependencies_parsed_at":"2023-02-18T03:45:49.018Z","dependency_job_id":null,"html_url":"https://github.com/chrisprice/grunt-rollup","commit_stats":{"total_commits":142,"total_committers":20,"mean_commits":7.1,"dds":0.676056338028169,"last_synced_commit":"d0820eb60329ee07bfa609f75d539d3908fd1b24"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisprice%2Fgrunt-rollup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisprice%2Fgrunt-rollup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisprice%2Fgrunt-rollup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisprice%2Fgrunt-rollup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisprice","download_url":"https://codeload.github.com/chrisprice/grunt-rollup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230462906,"owners_count":18229864,"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-03T17:01:37.348Z","updated_at":"2024-12-19T16:10:39.506Z","avatar_url":"https://github.com/chrisprice.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gmartigny","https://tidelift.com/funding/github/npm/grunt-rollup"],"categories":["Packages"],"sub_categories":["Community Packages"],"readme":"# grunt-rollup\n[![Build Status](https://badgen.net/travis/chrisprice/grunt-rollup/master)](https://travis-ci.org/chrisprice/grunt-rollup)\n[![Plugin size](https://badgen.net/packagephobia/publish/grunt-rollup)](https://packagephobia.now.sh/result?p=grunt-rollup)\n\n\u003e Grunt plugin for [rollup](https://github.com/rollup/rollup) - next-generation ES6 module bundler\n\n## Getting Started\nThis plugin requires Grunt `\u003e=0.4.0` and node `\u003e=8.6.0`.\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-rollup --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-rollup');\n```\n\n## The \"rollup\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `rollup` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  rollup: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n});\n```\n\n### Options\n\nSupports all the options from [rollup's JavaScript API](https://rollupjs.org/guide/en/#javascript-api).\n\n\n### Sourcemaps\n\nA value of `true` for `sourceMap` will output the map to a file with the same name as the JavaScript with `.map` appended. A value of `inline` for `sourceMap` will inline the sourcemap into the source file.\n\n### Usage Examples\n\n```js\ngrunt.initConfig({\n  rollup: {\n    options: {},\n    files: {\n      'dest/bundle.js': 'src/entry.js',\n    },\n  },\n});\n```\n\n### Usage with Plugins\n\n```js\nvar babel = require('@rollup/plugin-babel').default;\n\ngrunt.initConfig({\n  rollup: {\n    options: {\n      plugins: [\n        babel({\n          exclude: './node_modules/**'\n        })\n      ]\n    },\n    files: {\n      'dest/bundle.js': 'src/entry.js',\n    },\n  },\n});\n```\n\n#### Plugin getter\n\nSome plugins are stateful and this doesn't play nice with multiple bundles.\nFor example the `rollup-plugin-babel` plugin keeps a track of used `babel` helpers, and passing the configured plugin only once will cause the helpers to leak from one bundle to another.\nTo prevent that, pass a function that returns an array of plugins, like this:\n\n```js\nvar babel = require('rollup-plugin-babel');\n\ngrunt.initConfig({\n  rollup: {\n    options: {\n      plugins: function() {\n        return [\n          babel({\n            exclude: './node_modules/**'\n          })\n        ];\n      }\n    },\n    files: {\n      'dest/bundle.js': 'src/entry.js',\n      'dest/bundle2.js': 'src/entry2.js',\n    },\n  },\n});\n```\n\nThis way the plugin will be refreshed for each bundle.\n\n## Contributing\nAny contributions is welcomed. Make sure to read [the contributing manual](contributing.md) for more information.\n\n### Contributors\n| [![chrisprice](https://github.com/chrisprice.png?size=99)\u003cbr\u003e\u003cb\u003echrisprice\u003c/b\u003e](https://github.com/chrisprice) | [![GMartigny](https://github.com/GMartigny.png?size=99)\u003cbr\u003e\u003cb\u003eGMartigny\u003c/b\u003e](https://github.com/GMartigny) | [![scythianfuego](https://github.com/scythianfuego.png?size=99)\u003cbr\u003e\u003cb\u003escythianfuego\u003c/b\u003e](https://github.com/scythianfuego) |\n| --- | --- | --- |\n\u003e All contributions are valued, you can add yourself to this list (or request to be added) whatever your contribution is.\n\u003c!--\nUse this pattern to add yourself:\n[![FULL NAME or USERNAME](https://github.com/USERNAME.png?size=99)\u003cbr\u003e\u003cb\u003eUSERNAME\u003c/b\u003e](https://github.com/USERNAME)\n--\u003e\n\n## License \n\n[MIT](license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisprice%2Fgrunt-rollup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisprice%2Fgrunt-rollup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisprice%2Fgrunt-rollup/lists"}