├── .babelrc ├── .gitignore ├── .npmignore ├── README.md ├── package.json └── src └── githubby.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # authoring-es6-module-example 2 | 3 | An example of how to author modules in ES6 and publish as ES5 through Babel. 4 | 5 | This module gets consumed in [this sample jspm application](https://github.com/jackfranklin/consuming-es6-module-example). 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jf-fowa-test2", 3 | "version": "1.0.1", 4 | "description": "", 5 | "main": "lib/githubby.js", 6 | "scripts": { 7 | "prepublish": "babel -d lib src/" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "babel-cli": "^6.1.2", 13 | "babel-preset-es2015": "^6.1.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/githubby.js: -------------------------------------------------------------------------------- 1 | export function getReposForUser(username) { 2 | let url = `https://api.github.com/users/${username}/repos`; 3 | 4 | return fetch(url).then((response) => response.json()); 5 | } 6 | --------------------------------------------------------------------------------