{"id":22004275,"url":"https://github.com/huasofoundries/backbone_es6","last_synced_at":"2025-07-22T20:04:16.523Z","repository":{"id":48310421,"uuid":"79113072","full_name":"HuasoFoundries/backbone_es6","owner":"HuasoFoundries","description":"An ES6 build of Backbone, allowing for tree shaking","archived":false,"fork":false,"pushed_at":"2021-08-02T09:13:04.000Z","size":1664,"stargazers_count":8,"open_issues_count":6,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-09T13:55:39.779Z","etag":null,"topics":["backbone","backbone-es6","es6","javascript","jquery","jspm","underscore"],"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/HuasoFoundries.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":"2017-01-16T11:44:58.000Z","updated_at":"2023-02-08T04:19:16.000Z","dependencies_parsed_at":"2022-09-01T12:11:22.517Z","dependency_job_id":null,"html_url":"https://github.com/HuasoFoundries/backbone_es6","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/HuasoFoundries/backbone_es6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuasoFoundries%2Fbackbone_es6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuasoFoundries%2Fbackbone_es6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuasoFoundries%2Fbackbone_es6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuasoFoundries%2Fbackbone_es6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HuasoFoundries","download_url":"https://codeload.github.com/HuasoFoundries/backbone_es6/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuasoFoundries%2Fbackbone_es6/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"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-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["backbone","backbone-es6","es6","javascript","jquery","jspm","underscore"],"created_at":"2024-11-30T00:13:51.160Z","updated_at":"2025-07-22T20:04:16.497Z","avatar_url":"https://github.com/HuasoFoundries.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Backbone ES6\n\n[![npm](https://img.shields.io/npm/dm/backbone_es6.svg?style=plastic)](https://www.npmjs.com/package/backbone_es6) [![Travis CI](https://travis-ci.org/HuasoFoundries/backbone_es6.svg?branch=master)](https://travis-ci.org/HuasoFoundries/backbone_es6) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HuasoFoundries/backbone_es6/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/HuasoFoundries/backbone_es6/?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/1fd6d39caced49a4bfb9d65439ee491c)](https://www.codacy.com/app/amenadiel/backbone_es6?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=HuasoFoundries/backbone_es6\u0026amp;utm_campaign=Badge_Grade)\n\nThis repo contains an ES6 version of [Backbone.js]((https://github.com/jashkenas/backbone)) allowing for imports and **tree shaking**.\n\nThis package is made by deconstructing Backbone sources, separating it into modules and reassembling them using [Rollup](https://github.com/rollup/rollup).\n\n## Tree Shaking?\n\nTree shaking allows you to include just the code you need instead of a whole library. Say, for example, your app needs to use just Backbone's router, you can import just that part, resulting in a smaller build size overall.\n\n\n## Dependencies\n\nTo use this library, your project sould already have\n\n- [jQuery](https://jquery.com/)\n- [Underscore](http://underscorejs.org/)\n\nThey aren't explicitly listed as dependencies in `package.json` (for npm nor jspm), because you might want to use other drop in replacements for these dependencies\n(for example, [lodash@^3](https://www.npmjs.com/package/lodash) instead of Underscore, or jquery.slim.js build instead of jquery.min.js).\n\n\n## Installation\n\n\n### Including it with a script tag\n\nInclude this package in your HTML file directly with a script tag  using [unpkg](https://unpkg.com/#/) or [jsdelivr](https://www.jsdelivr.com/)\n\n```html\n\u003cscript src=\"https://unpkg.com/backbone_es6/dist/backbone.min.js\"\u003e\u003c/script\u003e\n```\n\n\n**or**\n\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/backbone_es6/dist/backbone.min.js\"\u003e\u003c/script\u003e\n```\n\n\n\n### Using npm\n\nInstall this package with npm with\n\n```sh\nnpm install --save backbone_es6\n```\n\n### Using [JSPM](https://github.com/jspm/jspm-cli)\n\n```sh\njspm install npm:backbone_es6\n```\n\n\n## Can I use this as a drop-in replacement of Backbone?\n\n**Yes you can**. Under the `dist` folder you can find scripts `backbone.js` and `backbone.min.js` that are in UMD format and can be used as a drop-in replacement for goold old vanilla Backbone. The minified version is listed as the `main` property in `package.json` so it's what you'll use by default.\n\nThese scripts are also used to run the tests. Said tests are the same as the ones in the [official Backbone repo](https://github.com/jashkenas/backbone), to ensure full Backbone ES6's compatibility with its parent framework.\n\n\n### Using it with AMD\n\nIf you use AMD, CommonJS or want to load Backbone ES6 with a script tag, make sure you use `dist/backbone.js` or `dist/backbone.min.js`. E.g. AMD usage of our umd version is as follows:\n\n```js\ndefine([\n  './node_modules/backbone_es6/dist/backbone.js'\n],function(Backbone) {\n\n  ...your code...\n\n});\n```\n\nWhereas, using ES6 syntax, you would use\n\n```js\nimport {Backbone} from './node_modules/backbone_es6/dist/backbone.es6.js';\n```\n\n`package.json` declares `dist/backbone.es6.js` as the `jsnext:main` and `module` script properties.\n\n\n\n### Using it with [JSPM](https://github.com/jspm/jspm-cli)\n\nIf you installed Backbone ES6 with jspm, `backbone_es6` will be mapped automatically to `dist/backbone.es6.js`. If you're tranpiling (using [plugin-babel](https://github.com/systemjs/plugin-babel)) you can import the module as:\n\n\n```js\nimport {Backbone} from 'backbone_es6';\n```\n\nor you could use AMD syntax as:\n\n\n```js\ndefine([\n  'backbone_es6'\n],function(Backbone) {\n\n  // Please note that you need to check for the \"default\" export\n  Backbone = 'default' in Backbone ? Backbone.default : Backbone;\n\n  ...your code...\n\n});\n```\n\n\nIf you are **not using a transpiler** and want to use the AMD build, use:\n\n\n```js\ndefine([\n  'backbone_es6/backbone.min.js'\n],function(Backbone) {\n\n  ...your code...\n\n});\n```\n\n\n\n## Can I use classes?\n\nNope. The inner working of Backbone entities and the way they extend is kept as-is. This project is only a POC to do imports and tree shaking. No more, no less.\n\n\n## Documentation\n\nAs this library is meant to be a full drop-in replacement of Backbone.js, the same [docs](http://backbonejs.org/) apply.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuasofoundries%2Fbackbone_es6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuasofoundries%2Fbackbone_es6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuasofoundries%2Fbackbone_es6/lists"}