{"id":17789989,"url":"https://github.com/samrocksc/lol-app","last_synced_at":"2025-04-02T01:16:55.867Z","repository":{"id":69548276,"uuid":"46999333","full_name":"samrocksc/lol-app","owner":"samrocksc","description":"League of Legends App","archived":false,"fork":false,"pushed_at":"2015-11-28T16:00:35.000Z","size":328,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T16:56:21.693Z","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/samrocksc.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}},"created_at":"2015-11-27T21:07:11.000Z","updated_at":"2015-11-27T21:08:41.000Z","dependencies_parsed_at":"2023-03-11T06:09:57.418Z","dependency_job_id":null,"html_url":"https://github.com/samrocksc/lol-app","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/samrocksc%2Flol-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocksc%2Flol-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocksc%2Flol-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrocksc%2Flol-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samrocksc","download_url":"https://codeload.github.com/samrocksc/lol-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246735323,"owners_count":20825223,"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-10-27T10:39:38.947Z","updated_at":"2025-04-02T01:16:55.786Z","avatar_url":"https://github.com/samrocksc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"React Redux Starter Kit\n=======================\n\n[![Join the chat at https://gitter.im/davezuko/react-redux-starter-kit](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/davezuko/react-redux-starter-kit?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Build Status](https://travis-ci.org/davezuko/react-redux-starter-kit.svg?branch=master)](https://travis-ci.org/davezuko/react-redux-starter-kit?branch=master)\n[![dependencies](https://david-dm.org/davezuko/react-redux-starter-kit.svg)](https://david-dm.org/davezuko/react-redux-starter-kit)\n\nStarter kit to get you up and running with a bunch of awesome new front-end technologies, all on top of a configurable, feature-rich webpack build system that's already setup to provide hot reloading, sass imports with CSS extraction, unit testing, code coverage reports, bundle splitting, and a whole lot more. Check out the full feature list below!\n\nRedux, React-Router, and React are constantly releasing new API changes. If you'd like to help keep this boilerplate up to date, please contribute or create a new issue if you think this starter kit is missing something!\n\nTable of Contents\n-----------------\n1. [Requirements](#requirements)\n1. [Features](#features)\n1. [Getting Started](#getting-started)\n1. [Usage](#usage)\n1. [Structure](#structure)\n1. [Webpack](#webpack)\n1. [Styles](#styles)\n1. [Testing](#testing)\n1. [Utilities](#utilities)\n1. [Troubleshooting](#troubleshooting)\n\nRequirements\n------------\n\nNode `^4.0.0` or `^5.0.0` ([npm3](https://www.npmjs.com/package/npm3) recommended).\n\nFeatures\n--------\n\n* [React](https://github.com/facebook/react) (`^0.14.0`)\n  * Includes react-addons-test-utils (`^0.14.0`)\n* [React-Router](https://github.com/rackt/react-router) (`^1.0.0`)\n* [Redux](https://github.com/gaearon/redux) (`^3.0.0`)\n  * redux-router (`^1.0.0-beta3`)\n  * react-redux (`^4.0.0`)\n  * redux-devtools\n    * use `npm run dev:nw` to display in a separate window.\n  * redux-thunk middleware\n* [Karma](https://github.com/karma-runner/karma)\n  * Mocha w/ Chai, Sinon-Chai, and Chai-as-Promised\n  * PhantomJS\n  * Code coverage reports\n* [Babel](https://github.com/babel/babel)\n  * `react-transform-hmr` for hot reloading\n  * `react-transform-catch-errors` with `redbox-react` for more visible error reporting\n  * Uses babel runtime rather than inline transformations\n* [Webpack](https://github.com/webpack/webpack)\n  * Separates application code from vendor dependencies\n  * webpack-dev-server\n  * sass-loader with CSS extraction\n  * Pre-configured folder aliases and globals\n* [ESLint](http://eslint.org)\n  * Uses [Airbnb's ESLint config](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) (with some softened rules)\n  * Includes separate test-specific `.eslintrc` to work with Mocha and Chai\n\nGetting Started\n---------------\n\nJust clone the repo and install the necessary node modules:\n\n```shell\n$ git clone https://github.com/davezuko/react-redux-starter-kit.git ReduxStarterApp\n$ cd ReduxStarterApp\n$ npm install                   # Install Node modules listed in ./package.json (may take a while the first time)\n$ npm start                     # Compile and launch\n```\n\nUsage\n-----\n\n#### `npm start` (alias for `npm run dev`)\nRuns the webpack build system with webpack-dev-server (by default found at `localhost:3000`).\n\n#### `npm run dev:nw`\nSame as `npm run start` but opens the debug tools in a new window.\n\n**Note:** you'll need to allow popups in Chrome, or you'll see an error: [issue 110](https://github.com/davezuko/react-redux-starter-kit/issues/110)\n\n#### `npm run dev:no-debug`\nSame as `npm run start` but disables devtools.\n\n#### `npm run compile`\nRuns the webpack build system with your current NODE_ENV and compiles the application to disk (`~/dist`).\n\n#### `npm run test`\nRuns unit tests with Karma and generates coverage reports.\n\n#### `npm run test:dev`\nSimilar to `npm run test`, but will watch for changes and re-run tests; does not generate coverage reports.\n\n#### `npm run lint`\nRuns ESLint against all `.js` files in `~/src`. This used to be a webpack preloader, but the browser console output could get fairly ugly. If you want development-time linting, consider using an `eslint` plugin for your text editor.\n\n#### `npm run lint:tests`\nLints all `.spec.js` files in of `~/tests`.\n\n#### `npm run deploy`\nHelper script to run linter, tests, and then, on success, compile your application to disk.\n\n### Configuration\n\nBasic project configuration can be found in `~/config/index.js`. Here you'll be able to redefine your `src` and `dist` directories, add/remove aliases, tweak your vendor dependencies, and more. For the most part, you should be able to make your changes in here without ever having to touch the webpack build configuration.\n\nStructure\n---------\n\nThe folder structure provided is only meant to serve as a guide, it is by no means prescriptive. It is something that has worked very well for me and my team, but use only what makes sense to you.\n\n```\n.\n├── bin                      # Build/Start scripts\n├── build                    # All build-related configuration\n│   └── webpack              # Environment-specific configuration files for webpack\n├── config                   # Project configuration settings\n├── src                      # Application source code\n│   ├── actions              # Redux action creators\n│   ├── components           # Generic React Components (generally Dumb components)\n│   ├── containers           # Components that provide context (e.g. Redux Provider)\n│   ├── layouts              # Components that dictate major page structure\n│   ├── reducers             # Redux reducers\n│   ├── routes               # Application route definitions\n│   ├── store                # Redux store configuration\n│   ├── utils                # Generic utilities\n│   ├── views                # Components that live at a route\n│   └── app.js               # Application bootstrap and rendering\n└── tests                    # Unit tests\n```\n\n### Components vs. Views vs. Layouts\n\n**TL;DR:** They're all components.\n\nThis distinction may not be important for you, but as an explanation: A **Layout** is something that describes an entire page structure, such as a fixed navigation, viewport, sidebar, and footer. Most applications will probably only have one layout, but keeping these components separate makes their intent clear. **Views** are components that live at routes, and are generally rendered within a **Layout**. What this ends up meaning is that, with this structure, nearly everything inside of **Components** ends up being a dumb component.\n\nWebpack\n-------\n\n### Configuration\nThe webpack compiler configuration is located in `~/build/webpack`. Here you'll find configurations for each environment; `development`, `production`, and `development_hot` exist out of the box. These configurations are selected based on your current `NODE_ENV`, with the exception of `development_hot` which will _always_ be used by webpack dev server.\n\n**Note**: There has been a conscious decision to keep development-specific configuration (such as hot-reloading) out of `.babelrc`. By doing this, it's possible to create cleaner development builds (such as for teams that have a `dev` -\u003e `stage` -\u003e `production` workflow) that don't, for example, constantly poll for HMR updates.\n\nSo why not just disable HMR? Well, as a further explanation, enabling `react-transform-hmr` in `.babelrc` but building the project without HMR enabled (think of running tests with `NODE_ENV=development` but without a dev server) causes errors to be thrown, so this decision also alleviates that issue.\n\n### Vendor Bundle\nYou can redefine which packages to treat as vendor dependencies by editing `vendor_dependencies` in `~/config/index.js`. These default to:\n\n```js\n[\n  'history',\n  'react',\n  'react-redux',\n  'react-router',\n  'redux-router',\n  'redux'\n]\n```\n\n### Aliases\nAs mentioned in features, the default webpack configuration provides some globals and aliases to make your life easier. These can be used as such:\n\n```js\n// current file: ~/src/views/some/nested/View.js\nimport SomeComponent from '../../../components/SomeComponent'; // without alias\nimport SomeComponent from 'components/SomeComponent'; // with alias\n```\n\nAvailable aliases:\n```js\nactions     =\u003e '~/src/actions'\ncomponents  =\u003e '~/src/components'\nconstants   =\u003e '~/src/constants'\ncontainers  =\u003e '~/src/containers'\nlayouts     =\u003e '~/src/layouts'\nreducers    =\u003e '~/src/reducers'\nroutes      =\u003e '~/src/routes'\nservices    =\u003e '~/src/services'\nstore       =\u003e `~/src/store`\nstyles      =\u003e '~/src/styles'\nutils       =\u003e '~/src/utils'\nviews       =\u003e '~/src/views'\n```\n\n### Globals\n\nThese are global variables available to you anywhere in your source code. If you wish to modify them, they can be found as the `globals` key in `~/config/index.js`.\n\n#### `__DEV__`\nTrue when `process.env.NODE_ENV` is `development`\n\n#### `__PROD__`\nTrue when `process.env.NODE_ENV` is `production`\n\n#### `__DEBUG__`\nTrue when the compiler is run with `--debug` (any environment).\n\nStyles\n------\n\nAll `.scss` imports will be run through the sass-loader and extracted during production builds. If you're importing styles from a base styles directory (useful for generic, app-wide styles), you can make use of the `styles` alias, e.g.:\n\n```js\n// current file: ~/src/components/some/nested/component/index.jsx\nimport 'styles/core.scss'; // this imports ~/src/styles/core.scss\n```\n\nFurthermore, this `styles` directory is aliased for sass imports, which further eliminates manual directory traversing; this is especially useful for importing variables/mixins.\n\nHere's an example:\n\n```scss\n// current file: ~/src/styles/some/nested/style.scss\n// what used to be this (where base is ~/src/styles/_base.scss):\n@import '../../base';\n\n// can now be this:\n@import 'base';\n```\n\nTesting\n-------\n\nTo add a unit test, simply create a `.spec.js` file anywhere in `~/tests`. Karma will pick up on these files automatically, and Mocha and Chai will be available within your test without the need to import them.\n\nCoverage reports will be compiled to `~/coverage` by default. If you wish to change what reporters are used and where reports are compiled, you can do so by modifying `coverage_reporters` in `~/config/index.js`.\n\nUtilities\n---------\n\nThis boilerplate comes with two simple utilities (thanks to [StevenLangbroek](https://github.com/StevenLangbroek)) to help speed up your Redux development process. In `~/client/utils` you'll find exports for `createConstants` and `createReducer`. The former is pretty much an even lazier `keyMirror`, so if you _really_ hate typing out those constants you may want to give it a shot. Check it out:\n\n```js\nimport { createConstants } from 'utils';\n\nexport default createConstants(\n  'TODO_CREATE',\n  'TODO_DESTROY',\n  'TODO_TOGGLE_COMPLETE'\n);\n```\n\nThe other utility, `create-reducer`, is designed to expedite creating reducers when they're defined via an object map rather than switch statements. As an example, what once looked like this:\n\n```js\nimport { TODO_CREATE } from 'constants/todo';\n\nconst initialState = [];\nconst handlers = {\n  [TODO_CREATE] : (state, payload) =\u003e { ... }\n};\n\nexport default function todo (state = initialState, action) {\n  const handler = handlers[action.type];\n\n  return handler ? handler(state, action.payload) : state;\n}\n```\n\nCan now look like this:\n\n```js\nimport { TODO_CREATE }   from 'constants/todo';\nimport { createReducer } from 'utils';\n\nconst initialState = [];\n\nexport default createReducer(initialState, {\n  [TODO_CREATE] : (state, payload) =\u003e { ... }\n});\n```\n\nTroubleshooting\n---------------\n\nNothing yet. Having an issue? Report it and I'll get to it as soon as possible!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrocksc%2Flol-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamrocksc%2Flol-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrocksc%2Flol-app/lists"}