{"id":28490963,"url":"https://github.com/videojs/babel-config","last_synced_at":"2025-07-07T18:30:56.542Z","repository":{"id":37825332,"uuid":"300042891","full_name":"videojs/babel-config","owner":"videojs","description":"A standard babel config, so that plugins don't need the same script in every repository.","archived":false,"fork":false,"pushed_at":"2023-08-18T21:48:33.000Z","size":678,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-06-08T07:44:08.119Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/videojs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-30T19:46:55.000Z","updated_at":"2023-10-20T22:37:30.000Z","dependencies_parsed_at":"2024-06-19T01:53:38.204Z","dependency_job_id":null,"html_url":"https://github.com/videojs/babel-config","commit_stats":{"total_commits":21,"total_committers":6,"mean_commits":3.5,"dds":"0.33333333333333337","last_synced_commit":"8d0117f47f291a235dba8afd016916f87590a96a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/videojs/babel-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fbabel-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fbabel-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fbabel-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fbabel-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/videojs","download_url":"https://codeload.github.com/videojs/babel-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fbabel-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264130491,"owners_count":23562038,"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":"2025-06-08T07:30:51.655Z","updated_at":"2025-07-07T18:30:56.535Z","avatar_url":"https://github.com/videojs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @videojs/babel-config\n\n[![Build Status](https://travis-ci.org/videojs/babel-config.svg?branch=master)](https://travis-ci.org/videojs/babel-config)\n[![Greenkeeper badge](https://badges.greenkeeper.io/videojs/babel-config.svg)](https://greenkeeper.io/)\n[![Slack Status](http://slack.videojs.com/badge.svg)](http://slack.videojs.com)\n\nCurrently babel configs are the same for most plugins, and most of them are built using this babel config via babel. We have some libraries though that are should not be built using rollup for nodejs consumption, that are currently doing so. So this config while still consumed by [videojs-generate-rollup-config](https://github.com/videojs/videojs-generate-rollup-config) can also be used standalone with babel-cli.\n\nLead Maintainer: Brandon Casey [@brandonocasey](https://github.com/brandonocasey)\n\nMaintenance Status: Stable\n\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [Installation](#installation)\n- [Usage](#usage)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Installation\n\n```\n$ npm install --save-dev @babel/cli @videojs/babel-config\n```\n\n\n## Usage\n\n1. In your rollup config add a line to delete module builds:\n```js\nif (config.builds.module) {\n  delete config.builds.module;\n}\n```\n2. Add a npm scripts for cjs/es dists to your package.json:\n\n```json\n{\n  \"build:cjs\": \"babel-config-cjs -d ./cjs ./src\",\n  \"build:es\": \"babel-config-es -d ./es ./src\",\n  \"watch:cjs\": \"npm run build:cjs -- -w\",\n  \"watch:es\": \"npm run build:es -- -w\"\n}\n```\n\n3. verify that `main` in `package.json` is set to the cjs dist. Something like `cjs/index.js`\n4. verify that `module` in `package.json` is set to the es dist. Something like `es/index.js`\n5. verify that `browser` in `package.json` is set to the browser dist. Something like `dist/project-name.js`\n6. Add `es` and `cjs` to `vjsstandard.ignore` in `package.json`\n7. Make sure that `es/` and `cjs/` are in `files` in `package.json`\n8. Add `/es` and `/cjs` to `.gitignore`.\n9. Add `./es` and `./cjs` to the npm script for `clean` after `mkdir -p` and `rm -rf`.\n\n```sh\nshx rm -rf ./dist ./test/dist ./cjs ./es \u0026\u0026 shx mkdir -p ./dist ./test/dist ./cjs ./es\n```\n\n\n## Important things\n* When running through `babel-config-cjs`, `babel-config-es`, or `babel-config-run` if the `TEST_BUNDLE_ONLY` environment variable is set **nothing** will run! This is to maintain parity with [`videojs-generate-rollup-config`](https://github.com/videojs/videojs-generate-rollup-config).\n* The `babel-config-cjs` binary runs babel cli with `--verbose` and `--config-file` set to the cjs config exported here.\n* The `babel-config-es` binary runs babel cli with `--verbose` and `--config-file` set to the es config exported here.\n* The `babel-config-run` binary runs babel cli with `--verbose` but no config file.\n\n## Changing configuration\n1. require the configuration you want to use `const config = require('@videojs/babel-config/cjs.js');`\n2. Make changes to it and export: `module.export = config`.\n3. Change the build scripts to  `babel-config-run --config-file \u003cnew-config\u003e ...`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideojs%2Fbabel-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvideojs%2Fbabel-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideojs%2Fbabel-config/lists"}