{"id":20514490,"url":"https://github.com/rollup/rollup-starter-project","last_synced_at":"2025-04-06T04:08:11.431Z","repository":{"id":36801638,"uuid":"41108463","full_name":"rollup/rollup-starter-project","owner":"rollup","description":"Sample project for packages built using rollup.","archived":false,"fork":false,"pushed_at":"2017-11-17T16:24:31.000Z","size":41,"stargazers_count":325,"open_issues_count":5,"forks_count":65,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-25T18:21:51.315Z","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/rollup.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":"2015-08-20T17:04:06.000Z","updated_at":"2024-02-10T18:29:06.000Z","dependencies_parsed_at":"2022-09-04T04:20:37.768Z","dependency_job_id":null,"html_url":"https://github.com/rollup/rollup-starter-project","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/rollup%2Frollup-starter-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-starter-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-starter-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollup%2Frollup-starter-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rollup","download_url":"https://codeload.github.com/rollup/rollup-starter-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430869,"owners_count":20937874,"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-11-15T21:16:51.759Z","updated_at":"2025-04-06T04:08:11.316Z","avatar_url":"https://github.com/rollup.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# See [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app) for a simpler, up-to-date example of how to create a library or application with Rollup\n\n---\n\n# rollup-starter-project\n\nThis package shows how to get started with [rollup][rollup] (and [babel][babel]) for writing\nnpm packages using ES6 modules. Writing npm packages with a [jsnext:main][jsnext:main] allows\nusers of your package to choose whether they use it using the traditional\n`require` function understood by node.js, or using the `import` statement added\nin ES6 which can result in smaller bundles through live-code inclusion static\nanalysis.\n\n[babel]: https://github.com/babel/babel\n[jsnext:main]: https://github.com/rollup/rollup/wiki/jsnext:main\n[rollup]: https://github.com/rollup/rollup\n\n## Usage\n\nYou can simply use this project as inspiration for how to configure your own,\nor clone it and edit the metadata files when starting your own project (i.e.\nREADME.md, package.json, and LICENSE).\n\n### lib/index.js\n\nThis is the main source file in your application, and the main file you'll start\nediting to implement the functionality of your package. As shown in this\nexample, you can `import` other files from this file similarly to how you would\n`require` packages typically (e.g. `lib/utils.js`).\n\n### test/index_test.js\n\nThis is the starting point for tests in your package. You should import the\ncode to test from `lib/` as shown in the example. The project is already\nconfigured to use mocha when you run `npm test`.\n\n### dist/rollup-starter-project.js\n\nThis is the `main` file of the package and includes all the code needed to run\nyour package. It is in UMD format, meaning it can be used in most JavaScript\nruntime environments. If your package has dependencies you do not want bundled,\nbe sure to configure rollup to exclude them by marking them as `external`. By\ndefault all `dependencies` entries in your `package.json` will be `external`.\n\n### dist/rollup-starter-project.mjs\n\nThis is the `jsnext:main` file of the package and includes all the code needed\nto run your package. Compared to the UMD version, this one preserves ES6 imports\nand exports at the package boundary for tools that support it (such as rollup).\nIf your package has dependencies you do not want bundled, be sure to configure\nrollup to exclude them by marking them as `external`. By default all\n`dependencies` entries in your `package.json` will be `external`.\n\n### .eslintrc\n\nThis controls how the package is linted and starts off with the recommended set\nof rules from eslint itself. It also uses `babel-eslint` to parse your code,\nallowing syntax that the standard eslint parser may not understand (e.g. type\nannotations).\n\n## Dependencies\n\nThis section explains what all the dependencies are and what they're for, so\nyou can decide which ones you actually need.\n\n### babel-eslint\n\nEnables eslint to understand all JavaScript syntax that\n[babel](http://babeljs.io) understands, and adds a few rules for linting ES2015\ncode. This can be removed if you plan not to use babel to transform ES2015 code\nto ES5 or if you plan not to use eslint.\n\n### babel-plugin-external-helpers\n\nEnsures that only one copy of each babel helper is included in the bundle when\nused with rollup. This can be removed if you plan not to use babel to transform\nES2015 code to ES5.\n\n### babel-preset-es2015\n\nUsed when babel is used without rollup, and referenced by the `.babelrc` file.\nThis can be removed if you plan not to use babel to transform ES2015 code to ES5\nor you plan to specify all the babel plugins manually.\n\n### babel-register\n\nProvides on-demand transpilation via babel so no precompilation is required.\nThis is used in the tests to allow running them without compiling first, and is\nreferenced in `test/mocha.opts`.\n\n### babelrc-rollup\n\nHandles transforming the babel config from `.babelrc` to one suitable for use\nwith `rollup-plugin-babel`, where you don't want to use any module plugins.\n\n### eslint\n\n[eslint](http://eslint.org) checks your code for common errors and ensures it\nadheres to the style you configure in `.eslintrc`. You can remove this if you\nplan not to lint your code or if you're using another linter, such as\n[jshint](http://jshint.com) or [jscs](http://jscs.info).\n\n### mocha\n\n[mocha](https://mochajs.org) is a test runner. You can remove this if you plan\nnot to write tests (don't do that!) or if you plan to use another test runner\nsuch as [Jasmine](http://jasmine.github.io).\n\n### istanbul\n\n[istanbul](https://github.com/gotwarlost/istanbul) is a code coverage tool that \ncomputes statement, line, function and branch coverage with module loader hooks \nto transparently add coverage when running tests. You can remove this dependency \nif you won't be writing tests or you don't care about code coverage.\n\nYou'll also have to change the `test/mocha.opts` file and remove the custom \nreporter option `--reporter test/istanbul.reporter.js`. After that you can safely \ndelete the `test/istanbul.reporter.js` file.\n\n### rollup\n\n[rollup](http://rollupjs.org) is a JavaScript module bundler and the reason\nyou're looking at this project in the first place, so you probably don't want\nto remove this dependency.\n\n### rollup-plugin-babel\n\nThis plugin enables support for [babel](http://babeljs.io), which transforms\nES2015 code to ES5. You can remove this if you plan not to use ES2015 code.\n\n### rollup-plugin-istanbul\n\nThis plugin provides seamless integration between Rollup and \n[Istanbul](https://github.com/gotwarlost/istanbul) to generate code coverage\nreports of your project. If you don't plan to write tests or simply don't care \nabout code coverage, you can safely remove this along with Istanbul.\n\nJust like with the Istanbul dependency, you should change the `test/mocha.opts`\nfile. Read the above instructions for removing Istanbul.\n\n## Contributing\n\nIf you think a project built with rollup should be set up differently, open an\nissue to discuss it or create a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollup%2Frollup-starter-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frollup%2Frollup-starter-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollup%2Frollup-starter-project/lists"}