[
  {
    "path": ".babelrc",
    "content": "{\n  \"presets\": [\"es2015\", \"react\", \"stage-0\"],\n  \"env\": {\n    \"development\": {\n      \"plugins\": [\n        \"react-hot-loader/babel\"\n      ]\n    },\n    \"test\": {\n      \"plugins\": [\n        [\n          \"babel-plugin-webpack-alias\", {\n            \"config\": \"./webpack.config.prod.js\"\n          }\n        ]\n      ]\n    },\n    \"server\": {\n      \"plugins\": [\n        [\n          \"babel-plugin-webpack-alias\", {\n            \"config\": \"./webpack.config.server.js\"\n          }\n        ]\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": ".eslintignore",
    "content": "**/*.ts\n**/*.tsx\n"
  },
  {
    "path": ".github/CHANGELOG.md",
    "content": "# Change Log\n\n## 1.0.1\n- Add jest snapshot / enzyme testing\n- Introduce changelog, contributing.md and roadmap.md"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "content": "# Contributing\n\nWhen contributing to this repository, please first discuss the change you wish to make via issue,\nemail, or any other method with the owners of this repository before making a change. \n\nPlease note we have a code of conduct, please follow it in all your interactions with the project.\n\n## Pull Request Process\nWe are following the [feature branch git workflow](https://www.atlassian.com/git/tutorials/comparing-workflows).  Please post an issue if you have any questions about this process.\n\n1. Ensure any install or build dependencies are removed before the end of the layer when doing a \n   build.\n2. Update the README.md with details of changes to the interface, this includes new environment \n   variables, exposed ports, useful file locations and container parameters.\n3. Increase the version numbers in any examples files and the README.md to the new version that this\n   Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).\n4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you \n   do not have permission to do that, you may request the second reviewer to merge it for you.\n5. Write tests if you can!\n\n## Code of Conduct\n\n### Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\nnationality, personal appearance, race, religion, or sexual identity and\norientation.\n\n### Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\nadvances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n### Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n### Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n### Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at [INSERT EMAIL ADDRESS]. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n### Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\nbuild\ndist\nnpm-debug.log\n.vscode\ncoverage\nyarn-error.log\n.DS_STORE\nlerna-debug.log"
  },
  {
    "path": ".nvmrc",
    "content": "6.9.5"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n    - \"6.9.5\"\nscript: npm run test\nnotifications:\n  slack: scalable-react:HPFuyoipfw9RROPGrZrczz1m\n  email:\n    on_failure: always"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016 Ryan Collins\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Procfile",
    "content": "web: cross-env NODE_ENV=server node server.js\n"
  },
  {
    "path": "README.md",
    "content": "![](https://github.com/RyanCCollins/cdn/raw/master/road_not_maintained.jpg?raw=true)\n\n# __NOTICE__:\nThe maintainers of this repo are no longer able to support a thriving open source community.  This repo will stay put to serve as an example for the community, but should not be depended on in a production application unless you and are your team intend to build upon it. \n\nIf you're interested in helping to support and grow this library, please let us know in the issues!\n\n### Open UI\nWe are working on a ui kit, which you'll find located in the packages directory.  Much like this project, this code is not yet production ready and we have yet to document it.  Please stay tuned.\n\n![TypeScript](https://raygun.com/blog/wp-content/uploads/2016/07/Callums-post-on-Typescript.png)\n\n# Scalable React TS Boilerplate\n[![Build Status](https://travis-ci.org/scalable-react/scalable-react-typescript-boilerplate.svg?branch=master)](https://travis-ci.org/scalable-react/scalable-react-typescript-boilerplate)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![Roadmap](https://camo.githubusercontent.com/de5f01c39b77893278b0f44ebf20ecca32adb13c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2546302539462539332539342d726f61646d61702d4344393532332e7376673f7374796c653d666c61742d737175617265)](https://github.com/scalable-react/scalable-react-typescript-boilerplate#roadmap)\n[![Star on Github](https://img.shields.io/github/stars/scalable-react/scalable-react-typescript-boilerplate.svg?style=social)](https://github.com/scalable-react/scalable-react-typescript-boilerplate/stargazers)\n[![Watch on Github](https://img.shields.io/github/watchers/scalable-react/scalable-react-typescript-boilerplate.svg?style=social)](https://github.com/scalable-react/scalable-react-typescript-boilerplate/watchers)\n[![Tweet](https://img.shields.io/twitter/url/https/github.com/scalable-react/scalable-react-typescript-boilerplate.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20scalable-react-typescript-boilerplate!%20https://github.com/scalable-react/scalable-react-typescript-boilerplate%20%F0%9F%91%8D)\n\nCheckout [our website](https://scalable-react-ts-boilerplate.herokuapp.com/) for documentation and examples.\n\n## Background Info\n\nWe know that there are a ton of react boilerplates and starter projects to choose from.  Our hope with this project is to provide an example of one of the best front-end architectural patterns available: Feature First.  We started initially with a vanilla JS version of this architecture and have since converted it entirely to strongly-typed TypeScript.  Above all else, the hope of this repository is to provide the open source community with a great example of how to build large-scale apps with React and TypeScript using the feature-first modularization pattern.  Read on to get started!\n\n## Main Features\n- Feature First\n- Statically Typed\n- TypeScript\n- Lerna\n- Starter UI Kit (Open UI)\n- Redux Logic\n- Webpack 2\n- React\n- Redux\n- Hot Module Reloading\n- Server Side Rendering\n- Highly optimized webpack configuration\n  - Code Chunking\n  - Lazy route loading\n  - Uglification / minification\n\n## Getting Started\n1. Clone the Repo\n`git clone https://github.com/RyanCCollins/scalable-react-ts-boilerplate`\n\n2. Install Dependencies\nFrom the root of the project directory, run `yarn` if you have yarn installed globally.\n--- or ---\n`npm install`.\n\n3. Clear out the code you don't want.\nRun `npm run clean` to get rid of the docs package and to reset the codebase to the bare minimum (note: we are still working on this and this would be a great place to submit an improvement).\n\n4. Start the Development Server\nRun `npm run start` then browse http://localhost:1337 to see your running app.\n\n## What is Feature First?\nIn many projects and frameworks, files are organized by their file type.  For example, you will find tests in a test folder, reducers in a reducers folder and so on and so forth.  This framework takes a different approach.\n\nWe encourage modularization / encapsulation of features by asking that you organize your files by feature, rather than file type. When you begin working on your next container, instead of having to root through multiple files to find all of the files that the container depends on, you can expect to find these files in one place: with the feature that they represent.  This helps to decouple the features in your app, lending itself well to code reuse, scalability and modularization.\n\nOn top of that, we also ask that you think about separation of concern as you are building your features.  You will see in the example application in this repository that a feature is built up of a dozen or so small, single purpose modules.  By following these simple patterns, you will set yourself up for maximum scalability.  Give it a try! We think you will enjoy it.\n\n## Lerna\nWe are hard at work converting the structure of this boilerplate to use Lerna.  Stay tuned for more information!\n\n## Styled Components\nThis project embraces [styled-components](https://github.com/styled-components/styled-components) as it's a fantastic way to style your React components.  \n\nCheck the components directory for examples.\n\n## Full Stack\nThis boilerplate contains setup to quickly get started with a full stack application.  Within the [`src/`](https://github.com/scalable-react/scalable-react-typescript-boilerplate/tree/master/src) directory, you will find a server and a client folder.\n\n## File Tree Structure\n\n### Client File Structure\n```\nsrc/client\n├── apolloClient.ts\n├── components\n│   ├── Box\n│   │   ├── __tests__\n│   │   │   ├── __mocks__\n│   │   │   │   └── boxMocks.mock.ts\n│   │   │   ├── __snapshots__\n│   │   │   │   └── index.test.tsx.snap\n│   │   │   └── index.test.tsx\n│   │   ├── index.tsx\n│   │   ├── maps.ts\n│   │   ├── styleUtils.ts\n│   │   ├── styles.ts\n│   │   └── types.ts\n│   ├── Section\n│   │   ├── __tests__\n│   │   │   ├── __mocks__\n│   │   │   │   └── sectionMocks.mock.ts\n│   │   │   ├── __snapshots__\n│   │   │   │   └── index.test.tsx.snap\n│   │   │   └── index.test.tsx\n│   │   ├── index.tsx\n│   │   └── styles.ts\n│   └── index.ts\n├── containers\n│   ├── Blog\n│   │   ├── index.tsx\n│   │   ├── posts.graphql.ts\n│   │   └── styles.ts\n│   ├── BlogPost\n│   │   ├── comments.graphql.ts\n│   │   ├── index.tsx\n│   │   ├── post.graphql.ts\n│   │   └── styles.ts\n│   └── index.ts\n├── index.tsx\n├── reducers.ts\n├── routes.tsx\n├── store.tsx\n└── styles\n    └── index.css\n```\n\n### Server file structure\n```\nsrc/server\n├── db\n│   ├── index.ts\n│   ├── models\n│   │   ├── comment.ts\n│   │   └── post.ts\n│   └── utils\n│       └── uuid.ts\n├── graph\n│   ├── index.ts\n│   ├── mutations\n│   │   ├── comment\n│   │   │   ├── createComment.ts\n│   │   │   └── index.ts\n│   │   └── index.ts\n│   ├── queries\n│   │   ├── comment\n│   │   │   ├── comment.ts\n│   │   │   ├── comments.ts\n│   │   │   └── index.ts\n│   │   ├── index.ts\n│   │   └── post\n│   │       ├── index.ts\n│   │       ├── post.ts\n│   │       └── posts.ts\n│   ├── schema.json\n│   └── types\n│       ├── comment\n│       │   ├── comment.ts\n│       │   └── commentInput.ts\n│       ├── index.ts\n│       └── post\n│           ├── post.ts\n│           └── postInput.ts\n├── graphqlEntry.ts\n└── index.tsx\n```\n\n## Apollo GraphQL\nRecently, we've added support for Apollo and GraphQL both server and client side.  The starter code in this repo demonstrates how to setup your GraphQL server.  The `/blog` route will show you a very simple example of loading data via Apollo Graphql.\n\n## UI Components\n#### Build your next UIKit with this library!\nIncluded in this project are a few primitive components that you can use to bootstrap your next project, or as a reference for building a UIKit.\n- [Box](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Box/index.tsx)\n  - Flex Box component!  Whoot!\n- [Section](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Section/index.tsx)\n  - A section component.  Extends the Box component giving flex-box properties.\n- [Anchor](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Anchor/index.tsx)\n- [Article](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Article/index.tsx)\n- [Button](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Button/index.tsx)\n- [Footer](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Footer/index.tsx)\n- [Heading](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Heading/index.tsx)\n- [Headline](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Headline/index.tsx)\n- [Hero](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Hero/index.tsx)\n- [Image](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Image/index.tsx)\n- [Markdown](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Markdown/index.tsx)\n- [NavBar](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/NavBar/index.tsx)\n- [Paragraph](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/Paragraph/index.tsx)\n- [SvgIcon](https://github.com/scalable-react/scalable-react-typescript-boilerplate/blob/master/src/client/components/SvgIcon/index.tsx)\n- And more!\n\n## React Storybook\nWe've included react storybook to make it easy for you to test your ui kit components.\nRun `npm run storybook` and navigate to `http://localhost:9001` to see your stories. \n\nYou can add more stories as you are building out your components within the `./config/.storybook/stories` folder.\nSimply [write a story](https://getstorybook.io/docs/react-storybook/basics/writing-stories) and export it in the `stories/index.js` file. Checkout the [React Storybook](https://getstorybook.io/) docs for more info!\n\nNote: the components are currently being served from the `build` directory, so please make sure you have compiled (`npm run compile`) the app before running.\n\n## Generators\nWe've included some generators so that you can easily scaffold out components & containers from the command line.\n\nTo use the generators, run `npm run generator` and select the options you want to use.  The generators will create your component or container and their accompanying imports / exports.\n\n## Server Rendering\nWe have included setup to get you server-rendering out of the box.  Included in the setup is an [Express server](https://github.com/RyanCCollins/scalable-react-ts-boilerplate/blob/master/src/server.tsx) that will server render.  Note that the server-rendering will not work with the TypeScript source code, so you must compile the project into the Build directory first.  Also, you must copy any other assets (images, markdown, etc.) into the build folder.\n\n## Testing\nIncluded is a test framework for all of your React testing needs.  We are using Jest to run the test suite and generate snapshots, plus Enzyme for component introspection.\n\nTests should be collocated within the component / container they represent. Test files should be named `index.test.tsx` and mocks must be named `myMock.mock.ts`.\n\nPlease reference the [`Box`](https://github.com/RyanCCollins/scalable-react-typescript-boilerplate/tree/master/src/client/components/Box) and [`Section`](https://github.com/RyanCCollins/scalable-react-typescript-boilerplate/tree/master/src/client/components/Section) components for example tests.  More will be added at a later time. \n\nNote that the test are not compiled by TypeScript, that way there is no code duplication and you can use static types in your tests.\n\nP.S. If you are looking to contribute, this would be a great first contribution!\n\n## Deployment\n<!-- HTML snippet -->\n<a href=\"https://app.netlify.com/start/deploy?repository=https://github.com/RyanCCollins/scalable-react-ts-boilerplate\">\n  <img src=\"https://www.netlify.com/img/deploy/button.svg\" title=\"Deploy to Netlify\">\n</a>\n\nThe [documentation website](https://scalable-react-ts-boilerplate.herokuapp.com/) built for this boilerplate is deployed to Heroku.  Included is a Procfile that will run the server.  The deployment is automated completely.  After the install script, the deploy script will run on the server in order to compile the bundle and prepare the build folder for server-rendering.\n\n## Scripts\n- `npm run setup:yarn`\n  - Install the package dependencies via yarn (recomended)\n- `npm install`\n  - Install dependencies (the ol' fashioned way)\n- `npm run start`\n  - Start the dev server\n- `npm run build`\n  - Build the project\n- `npm run deploy`\n  - Create a production bundle for deployment\n- `npm run serve`\n  - Serve the production bundle on port 1337\n- `npm run test`\n  - Run the test suite\n- `npm run test:watch`\n  - Run the test suite in watch mode\n- `npm run test:update`\n  - Update the failing snapshot tests\n- `npm run storybook`\n  - Run the storybook server\n\n## Resources\n- [JavaScript Code Quality with Free Tools](https://dev-blog.apollodata.com/javascript-code-quality-with-free-tools-9a6d80e29f2d#.1unvvh8vw)\n- [Working with React & TypeScript](http://blog.wolksoftware.com/working-with-react-and-typescript)\n- [Setting up a New React / TypeScript Project](http://blog.tomduncalf.com/posts/setting-up-typescript-and-react/)\n- [Feature First Architecture](https://medium.com/front-end-hacking/the-secret-to-organization-in-functional-programming-913484e85fc9#.8nerdsqhd)\n\n## Contributing\nSee here for our [contribution guide](https://github.com/RyanCCollins/scalable-react-typescript-boilerplate/blob/master/CONTRIBUTING.md).  We are on slack, please go [here for an invite](https://scalable-react-slack.herokuapp.com/)!  We'd love to hear from you!\n\n## License\nSee here for the [license](https://github.com/RyanCCollins/scalable-react-typescript-boilerplate/blob/master/LICENSE).\n\n## Roadmap\n### v1.0.2\n\n- [X] Add CI\n- [x] Introduce an async redux workflow\n  - Redux logic\n- [x] Integrate storybook\n- [x] Standardize the tslint configuration\n- [x] Add more reusable modules, ala box / section\n- [x] Refactor reusable modules into uikit\n- [x] Remove requires and use es6 imports for all libs\n- [x] Add a no any rule and update source to use it\n- [ ] Migrate to a multi-module pattern using lerna (in progress)\n\n## Troubleshooting\nMake sure to use the right version of node.  You can reference the version in the `.nvmrc` file.  For help installing and using NVM, please refer to this [gist](https://gist.github.com/RyanCCollins/1a5686ff9dd51b72eb2d4dc70aa6c1f4).\n"
  },
  {
    "path": "config/.storybook/addons.js",
    "content": "//  To get default addons (actions and links) \nimport '@kadira/storybook/addons';\n//  To add the knobs addon\nimport '@kadira/storybook-addon-knobs/register'\n"
  },
  {
    "path": "config/.storybook/config.js",
    "content": "import { configure, setAddon } from '@kadira/storybook';\nimport infoAddon from '@kadira/react-storybook-addon-info';\nimport withPropsCombinations, { setDefaults } from 'react-storybook-addon-props-combinations'\n\nsetAddon(withPropsCombinations)\n\nsetAddon(infoAddon);\n\nfunction loadStories() {\n  require('./stories/index.js');\n}\n\nconfigure(loadStories, module);\n"
  },
  {
    "path": "config/.storybook/stories/index.js",
    "content": ""
  },
  {
    "path": "config/.storybook/webpack.config.js",
    "content": "const path = require('path');\nconst config = require('../../webpack.config.server.js');\nconst ROOT_PATH = path.resolve(__dirname, '../../');\n\nmodule.exports = {\n  resolve: {\n    extensions: ['', '.js', '.jsx', '.json', '.css'],\n    alias: config.resolve.alias,\n  },\n  module: {\n    loaders: [\n      { test: /\\.css$/, loaders: ['style-loader', 'css-loader'] },\n    ]\n  }\n}\n"
  },
  {
    "path": "config/generators/cli.js",
    "content": "const componentGenerator = require('./component/index.js');\nconst SafeString = require('./utils/safeString').SafeString;\nconst containerGenerator = require('./container/index.js');\n\nmodule.exports = (plop) => {\n  plop.setGenerator('component', componentGenerator);\n  plop.setGenerator('feature', containerGenerator);\n  plop.addHelper('uppercase', (text) => {\n    return text.toUpperCase();\n  });\n  plop.addHelper('getPath', (p, itemName) => {\n    const pathParts = p.split('/');\n    const index = pathParts.indexOf(itemName);\n    const newPath = pathParts.slice(index + 1, pathParts.length);\n    return newPath.length < 1 ? `./${newPath}` : `./${newPath.join('/')}/`;\n  });\n  plop.addHelper('createImports', (list) => {\n    const items = list.map((item) => `import ${item} from 'grommet/components/${item}';`).join('\\n');\n    return new SafeString(items);\n  });\n  plop.addHelper('curly', (object, open) => (open ? '{' : '}'));\n};\n"
  },
  {
    "path": "config/generators/component/es6class.tsx.hbs",
    "content": "import * as React from 'react';\nimport Component from './styles';\n\nexport interface Props extends React.HTMLProps<typeof {{ properCase name }}> {\n  children: JSX.Element;\n}\nclass {{ properCase name }} extends React.Component<Props, undefined> {\n  public render() {\n    const {\n      children,\n    } = this.props;\n    return (\n      <Component>\n        {children}\n      </Component>\n    );\n  }\n}\n\nexport default {{ properCase name }};\n"
  },
  {
    "path": "config/generators/component/export.ts.hbs",
    "content": "$1\n  {{ properCase name }},"
  },
  {
    "path": "config/generators/component/import.ts.hbs",
    "content": "$1\nimport {{ properCase name }} from '{{ getPath path 'components' }}{{ properCase name }}';\n"
  },
  {
    "path": "config/generators/component/index.js",
    "content": "const path = require('path');\nconst { trimTemplateFile } = require('../utils/');\n\nmodule.exports = {\n  description: 'Generate a component',\n  prompts: [\n    {\n      type: 'input',\n      name: 'name',\n      message: 'What is the name of the component?',\n      default: 'Post',\n      validate: (value) => {\n        if ((/.+/).test(value)) {\n          return true;\n        }\n        return 'The name is required.';\n      }\n    },\n    {\n      type: 'input',\n      name: 'path',\n      message: 'What directory would you like your component in? (relative)',\n      default: './src/client/components',\n      validate: (value) => {\n        return true;\n      }\n    },\n    {\n      type: 'list',\n      name: 'type',\n      message: 'Select the type of component',\n      default: 'Stateless Function',\n      choices: () => ['ES6 Class', 'Stateless Function']\n    },\n  ],\n  actions: (data) => {\n    const componentPath = path.resolve(process.cwd(), `${data.path}/{{properCase name}}/`);\n    const rootPath = path.resolve(process.cwd(), `./src/client/components/index.ts`);\n    const actions = [{\n      type: 'add',\n      path: `${componentPath}/index.tsx`,\n      templateFile: data.type === 'ES6 Class' ?\n        './component/es6class.tsx.hbs' : './component/stateless.tsx.hbs',\n      abortOnFail: true\n    }, {\n      type: 'add',\n      path: `${componentPath}/types.ts`,\n      templateFile: './component/types.ts.hbs',\n      abortOnFail: true\n    }, {\n      type: 'add',\n      path: `${componentPath}/styles.ts`,\n      templateFile: './component/styles.ts.hbs',\n      abortOnFail: true\n    }, {\n      type: 'modify',\n      path: rootPath,\n      pattern: /(\\/\\* GENERATOR-IMPORT \\*\\/)/g,\n      template: trimTemplateFile('./config/generators/component/import.ts.hbs'),\n      abortOnFail: false\n    }, {\n      type: 'modify',\n      path: rootPath,\n      pattern: /(\\/\\* GENERATOR-EXPORT \\*\\/)/g,\n      template: trimTemplateFile('./config/generators/component/export.ts.hbs'),\n      abortOnFail: false\n    }];\n    return actions;\n  }\n};\n"
  },
  {
    "path": "config/generators/component/stateless.tsx.hbs",
    "content": "import * as React from 'react';\nimport Component from './styles';\n\nexport interface Props extends React.HTMLProps<typeof {{ properCase name }}> {\n  children: JSX.Element;\n}\nexport default function {{ properCase name }}({\n  children,\n}: Props): JSX.Element {\n  return (\n    <Component>\n      {children}\n    </Component>\n  );\n};\n"
  },
  {
    "path": "config/generators/component/styles.ts.hbs",
    "content": "import styled from 'styled-components';\n\nexport default styled.div`\n  height: 100px;\n  width: 200px;\n`;\n"
  },
  {
    "path": "config/generators/component/types.ts.hbs",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "config/generators/container/actionCreators.js.hbs",
    "content": "import * as T from './constants';\nimport {\n  LoadInitiationAction,\n  LoadSuccessAction,\n  LoadFailureAction,\n  LoadCancelAction,\n} from './actions';\nimport { ErrorType } from './types';\n\nexport const loadInitiation = (): LoadInitiationAction => ({\n  type: T.LOAD_INITIATION,\n});\n\nexport const loadSuccess = (data: string): LoadSuccessAction => ({\n  type: T.LOAD_SUCCESS,\n  payload: data,\n});\n\nexport const loadFailure = (error: ErrorType): LoadFailureAction => ({\n  type: T.LOAD_FAILURE,\n  payload: error,\n});\n\nexport const loadCancel = (): LoadCancelAction => ({\n  type: T.LOAD_CANCEL,\n});\n\nexport const actionCreators = {\n  loadInitiation,\n  loadSuccess,\n  loadFailure,\n  loadCancel,\n};\n\nexport default actionCreators;\n"
  },
  {
    "path": "config/generators/container/actions.js.hbs",
    "content": "import { PayloadAction } from 'root/types';\nimport { ErrorType } from './types';\nimport * as T from './constants';\n\nexport interface LoadInitiationAction extends PayloadAction<undefined> {\n  type: T.LOAD_INITIATION_TYPE;\n}\n\nexport interface LoadSuccessAction extends PayloadAction<string> {\n  type: T.LOAD_SUCCESS_TYPE;\n  payload: string;\n}\n\nexport interface LoadFailureAction extends PayloadAction<ErrorType> {\n  type: T.LOAD_FAILURE_TYPE;\n  payload: ErrorType;\n}\n\nexport interface LoadCancelAction extends PayloadAction<undefined> {\n  type: T.LOAD_CANCEL_TYPE;\n}\n\nexport type Action = LoadInitiationAction | LoadSuccessAction | LoadFailureAction | LoadCancelAction;\n"
  },
  {
    "path": "config/generators/container/constants.js.hbs",
    "content": "export type LOAD_INITIATION_TYPE = '{{ uppercase name }}/LOAD_INITIATION';\nexport const LOAD_INITIATION: LOAD_INITIATION_TYPE = '{{ uppercase name }}/LOAD_INITIATION';\n\nexport type LOAD_SUCCESS_TYPE = '{{ uppercase name }}/LOAD_SUCCESS';\nexport const LOAD_SUCCESS: LOAD_SUCCESS_TYPE = '{{ uppercase name }}/LOAD_SUCCESS';\n\nexport type LOAD_FAILURE_TYPE = '{{ uppercase name }}/LOAD_FAILURE';\nexport const LOAD_FAILURE: LOAD_FAILURE_TYPE = '{{ uppercase name }}/LOAD_FAILURE';\n\nexport type LOAD_CANCEL_TYPE = '{{ uppercase name }}/LOAD_CANCEL';\nexport const LOAD_CANCEL: LOAD_CANCEL_TYPE = '{{ uppercase name }}/LOAD_CANCEL';\n\nexport type ActionType = LOAD_INITIATION_TYPE | LOAD_SUCCESS_TYPE | LOAD_FAILURE_TYPE | LOAD_CANCEL_TYPE;\n"
  },
  {
    "path": "config/generators/container/export.js.hbs",
    "content": "$1\n  {{ properCase name }},"
  },
  {
    "path": "config/generators/container/import.js.hbs",
    "content": "$1\nimport {{ properCase name }} from '{{ getPath path 'features' }}{{ properCase name }}';\n"
  },
  {
    "path": "config/generators/container/index.js",
    "content": "const path = require('path');\nconst { trimTemplateFile } = require('../utils/');\n\nmodule.exports = {\n  description: 'Add a feature',\n  prompts: [\n    {\n      type: 'input',\n      name: 'name',\n      message: 'What should it be called?',\n      default: 'Dashboard',\n      validate: value => {\n        if ((/.+/).test(value)) {\n          return true;\n        }\n\n        return 'The name is required';\n      }\n    },\n    {\n      type: 'input',\n      name: 'path',\n      message: 'What directory would you like your container in? (relative)',\n      default: './src/client/features',\n      validate: (value) => {\n        return true;\n      }\n    },\n    {\n      type: 'confirm',\n      name: 'wantActionsAndReducer',\n      default: true,\n      message: 'Do you want actions/constants/reducer for this feature?'\n    },\n    {\n      type: 'confirm',\n      name: 'wantSelectors',\n      default: true,\n      message: 'Do you want to use reselect?'\n    }\n  ],\n  actions: (data) => {\n    const containerPath = path.resolve(process.cwd(), `${data.path}/{{properCase name}}/`);\n    const rootPath = path.resolve(process.cwd(), `./src/client/features/index.ts`);\n    const reducersPath = path.resolve(process.cwd(), './src/client/reducers.ts');\n    const typesPath = path.resolve(process.cwd(), './src/client/types.ts');\n    const statePath = path.resolve(process.cwd(), './src/client/state.ts');\n    const actions = [\n      {\n        type: 'add',\n        path: `${containerPath}/index.tsx`,\n        templateFile: './container/index.js.hbs',\n        abortOnFail: true\n      },\n      {\n        type: 'add',\n        path: `${containerPath}/presentation.tsx`,\n        templateFile: './container/presentation.js.hbs',\n        abortOnFail: true\n      },\n      {\n        type: 'modify',\n        path: rootPath,\n        pattern: /(\\/\\* GENERATOR-IMPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/import.js.hbs'),\n        abortOnFail: false\n      },\n      {\n        type: 'modify',\n        path: rootPath,\n        pattern: /(\\/\\* GENERATOR-EXPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/export.js.hbs'),\n        abortOnFail: false\n      },\n      {\n        type: 'modify',\n        path: typesPath,\n        pattern: /(\\/\\* GENERATOR-IMPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/types.import.ts.hbs'),\n        abortOnFail: false\n      },\n      {\n        type: 'modify',\n        path: typesPath,\n        pattern: /(\\/\\* GENERATOR-EXPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/types.export.ts.hbs'),\n        abortOnFail: false\n      }\n    ];\n\n    actions.push({\n      type: 'add',\n      path: `${containerPath}/styles.ts`,\n      templateFile: './container/styles.js.hbs',\n      abortOnFail: true\n    });\n\n    actions.push( {\n      type: 'add',\n      path: `${containerPath}/types.ts`,\n      templateFile: './container/types.ts.hbs',\n      abortOnFail: true\n    });\n\n    if (data.wantSelectors) {\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/selectors.ts`,\n        templateFile: './container/selectors.js.hbs',\n        abortOnFail: true\n      });\n    }\n\n    // If they want actions and a reducer, generate actions.js, constants.js,\n    // reducer.js and the corresponding tests for actions and the reducer\n    if (data.wantActionsAndReducer) {\n      // Actions\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/actionCreators.ts`,\n        templateFile: './container/actionCreators.js.hbs',\n        abortOnFail: true\n      });\n\n\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/state.ts`,\n        templateFile: './container/state.js.hbs',\n        abortOnFail: true\n      });\n\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/actions.ts`,\n        templateFile: './container/actions.js.hbs',\n        abortOnFail: true\n      });\n\n      // Constants\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/constants.ts`,\n        templateFile: './container/constants.js.hbs',\n        abortOnFail: true\n      });\n\n      // Reducer\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/reducer.ts`,\n        templateFile: './container/reducer.js.hbs',\n        abortOnFail: true\n      });\n\n      actions.push({\n        type: 'modify',\n        path: reducersPath,\n        pattern: /(\\/\\* GENERATOR-IMPORT-REDUCER \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/reducer.import.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: reducersPath,\n        pattern: /(\\/\\* GENERATOR-EXPORT-REDUCER \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/reducer.export.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: statePath,\n        pattern: /(\\/\\* GENERATOR-IMPORT-STATE \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/state.import.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: statePath,\n        pattern: /(\\/\\* GENERATOR-EXPORT-STATE \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/reducer.export-state.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: statePath,\n        pattern: /(\\/\\* GENERATOR-EXPORT-STATE-TYPE \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/state-type.js.hbs'),\n        abortOnFail: false\n      });\n\n    }\n\n    return actions;\n  }\n};\n"
  },
  {
    "path": "config/generators/container/index.js.hbs",
    "content": "import * as React from 'react';\n{{#if wantActionsAndReducer}}\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { State as GlobalState } from 'root/state';\nimport { Action, ActionMap, ErrorType } from './types';\nimport actionCreators from './actionCreators';\n{{/if}}\n{{#if wantSelectors}}\nimport * as selectors from './selectors';\n{{/if}}\nimport Presentation from './presentation';\n{{#if wantActionsAndReducer}}\n\n{{#if wantSelectors}}\ntype MapStateToProps = (state: GlobalState) => StateProps;\nconst mapStateToProps: MapStateToProps = (state) => ({\n  isLoading: selectors.selectIsLoading(state),\n  error: selectors.selectError(state),\n  data: selectors.selectData(state),\n});\n{{else}}\ntype MapStateToProps = (state: GlobalState): StateProps;\nconst mapStateToProps: MapStateToProps = (state) => ({\n  isLoading: state.{{ camelCase name }}.isLoading,\n  error: state.{{ camelCase name }}.error,\n  data: state.{{ camelCase name }}.data,\n});\n{{/if}}\n\ntype MapDispatchToProps = (dispatch: Dispatch<Action>) => DispatchProps;\nconst mapDispatchToProps: MapDispatchToProps = (dispatch) => ({\n  actions: bindActionCreators(\n    actionCreators,\n    dispatch,\n  ),\n});\n\nexport interface DispatchProps {\n  actions: ActionMap;\n}\n\nexport interface StateProps {\n  isLoading: boolean;\n  error?: ErrorType;\n  data?: string;\n}\n\nexport type Props = StateProps & DispatchProps;\n\nclass {{ properCase name }} extends React.Component<Props, undefined> {\n{{else}}\nexport interface Props {\n\n}\nclass {{ properCase name }} extends React.Component<Props, undefined> {\n{{/if}}\n  public render() {\n    return (\n      <Presentation {...this.props} />\n    );\n  }\n}\n\n{{#if wantActionsAndReducer}}\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps,\n)({{ properCase name }});\n{{else}}\nexport default {{ properCase name }};\n{{/if}}\n"
  },
  {
    "path": "config/generators/container/presentation.js.hbs",
    "content": "import * as React from 'react';\n{{#if wantActionsAndReducer}}\nimport { StateProps } from './types';\n{{else}}\nimport { Props as ParentProps } from './types';\n{{/if}}\nimport { Heading, Section } from './styles';\n\n{{#if wantActionsAndReducer}}\nexport default class Presentation extends React.Component<StateProps, undefined> {\n{{else}}\nexport interface Props extends ParentProps {\n  // own props\n}\nexport default class Presentation extends React.Component<Props, undefined> {\n{{/if}}\n  public render() {\n    {{#if wantActionsAndReducer}}\n    const {\n      isLoading,\n      error,\n      data,\n    } = this.props;\n    {{/if}}\n    return (\n      <Section>\n        <Heading>\n          Best container ever!\n        </Heading>\n      </Section>\n    );\n  }\n}\n"
  },
  {
    "path": "config/generators/container/reducer.export-state.js.hbs",
    "content": "$1\n  {{ camelCase name }}: {{ camelCase name }}State,\n"
  },
  {
    "path": "config/generators/container/reducer.export.js.hbs",
    "content": "$1\n  {{ camelCase name }},"
  },
  {
    "path": "config/generators/container/reducer.import.js.hbs",
    "content": "$1\nimport {{ camelCase name }} from './features/{{ properCase name }}/reducer';"
  },
  {
    "path": "config/generators/container/reducer.js.hbs",
    "content": "import * as T from './constants';\nimport initialState from './state';\nimport {\n  Action,\n  State,\n} from './types';\n\nconst reducer = (\n  state: State = initialState,\n  action: Action,\n): State => {\n  switch (action.type) {\n  case T.LOAD_INITIATION:\n    return Object.assign({}, state, {\n      isLoading: true,\n    });\n  case T.LOAD_SUCCESS:\n    return Object.assign({}, state, {\n      isLoading: false,\n      data: action.payload,\n    });\n  case T.LOAD_FAILURE:\n    return Object.assign({}, state, {\n      isLoading: false,\n      error: action.payload,\n    });\n  default:\n    return state;\n  }\n};\n\nexport default reducer;\n"
  },
  {
    "path": "config/generators/container/selectors.js.hbs",
    "content": "import { State as GlobalState } from '../../state';\nimport { State, ErrorType } from './types';\nimport { createSelector, Selector } from 'reselect';\n\nexport const select{{ properCase name }} = () => (state: GlobalState): State => state.{{ camelCase name }};\n\nexport type SelectIsLoading = Selector<GlobalState, boolean>;\nexport const selectIsLoading: SelectIsLoading = createSelector(\n  select{{ properCase name }}(),\n  ({{ camelCase name }}) => {{ camelCase name }}.isLoading,\n);\n\nexport type SelectError = Selector<GlobalState, ErrorType>;\nexport const selectError: SelectError = createSelector(\n  select{{ properCase name }}(),\n  ({{ camelCase name }}) => {{ camelCase name }}.error,\n);\n\nexport type SelectData = Selector<GlobalState, string>;\nexport const selectData: SelectData = createSelector(\n  select{{ properCase name }}(),\n  ({{ camelCase name }}) => {{ camelCase name }}.data,\n);\n"
  },
  {
    "path": "config/generators/container/state-type.js.hbs",
    "content": "$1\n  {{ camelCase name }}: {{ properCase name }}State;"
  },
  {
    "path": "config/generators/container/state.import.js.hbs",
    "content": "$1\nimport { initialState as {{ camelCase name }}State, State as {{ properCase name }}State } from './features/{{ properCase name }}/state';"
  },
  {
    "path": "config/generators/container/state.js.hbs",
    "content": "import { ErrorType } from './types';\n\nexport interface State {\n  isLoading: boolean;\n  error?: ErrorType;\n  data?: string;\n}\n\nexport const initialState: State = {\n  isLoading: false,\n  error: null,\n  data: null,\n};\n\nexport default initialState;\n"
  },
  {
    "path": "config/generators/container/styles.js.hbs",
    "content": "import styled from 'styled-components';\n\nexport const Section = styled.section`\n  padding: 60px;\n  background-color: #f5f5f5;\n  min-height: calc(100vh - 50px);\n`;\n\nexport const Heading = styled.h1`\n  text-align: center;\n`;\n"
  },
  {
    "path": "config/generators/container/types.export.ts.hbs",
    "content": "$1\n  {{ properCase name }}Types,"
  },
  {
    "path": "config/generators/container/types.import.ts.hbs",
    "content": "$1\nimport * as {{ properCase name }}Types from './features/{{ properCase name }}/types';"
  },
  {
    "path": "config/generators/container/types.ts.hbs",
    "content": "{{#if wantActionsAndReducer}}\nimport { ActionCreatorsMapObject } from 'redux';\nimport {\n  LoadInitiationAction,\n  LoadSuccessAction,\n  LoadFailureAction,\n  LoadCancelAction,\n} from './actions';\n\nexport { State } from './state';\nexport { Props, StateProps, DispatchProps } from './';\nexport { ActionType } from './constants';\nexport { Action } from './actions';\nexport interface ErrorType { message: string }\n\nexport interface ActionMap extends ActionCreatorsMapObject {\n  loadInitiation: () => LoadInitiationAction;\n  loadSuccess: (data: string) => LoadSuccessAction;\n  loadFailure: (error: ErrorType) => LoadFailureAction;\n  loadCancel: () => LoadCancelAction;\n}\n{{else}}\nexport { Props } from './';\n{{/if}}"
  },
  {
    "path": "config/generators/utils/index.js",
    "content": "const fs = require('fs');\n\nconst trimTemplateFile = (template) => {\n  // Loads the template file and trims the whitespace and then returns the content as a string.\n  return fs.readFileSync(template, 'utf8').replace(/\\s*$/, '');\n};\n\nmodule.exports = {\n  trimTemplateFile\n};\n"
  },
  {
    "path": "config/generators/utils/safeString.js",
    "content": "function SafeString(string) {\n  this.string = string;\n}\n\nSafeString.prototype.toString = SafeString.prototype.toHTML = function() {\n  return '' + this.string;\n};\n\nmodule.exports = {\n  SafeString\n};\n"
  },
  {
    "path": "config/ignoreAssets.js",
    "content": "/* eslint-disable */\n(function() {\n  require.extensions['.scss'] = () => {\n    return;\n  };\n  require.extensions['.css'] = () => {\n    return;\n  };\n  require.extensions['.png'] = () => {\n    return;\n  };\n  require.extensions['.jpg'] = () => {\n    return;\n  };\n  require.extensions['.md'] = () => {\n    return;\n  };\n})();\n"
  },
  {
    "path": "config/scripts/clean.js",
    "content": "require('shelljs/global');\n\nrm('-fr', './packages/docs');\n"
  },
  {
    "path": "config/testing/__mocks__/fileMock.js",
    "content": "module.exports = 'test-file-stub';"
  },
  {
    "path": "config/testing/__mocks__/styleMock.js",
    "content": "module.exports = {};"
  },
  {
    "path": "config/testing/preprocessor.js",
    "content": "'use strict';\n\n\nconst babel = require('babel-core');\nconst tsc = require('typescript');\nconst crypto = require('crypto');\nconst fs = require('fs');\nconst jestPreset = require('babel-preset-jest');\nconst es2015Preset = require('babel-preset-es2015');\nconst path = require('path');\n\nconst BABELRC_FILENAME = '.babelrc';\n\nconst cache = Object.create(null);\nconst tsconfig = require('../../tsconfig.json');\n\n\nconst getBabelRC = (filename, {useCache}) => {\n  const paths = [];\n  let directory = filename;\n  while (directory !== (directory = path.dirname(directory))) {\n    if (useCache && cache[directory]) {\n      break;\n    }\n\n    paths.push(directory);\n    const configFilePath = path.join(directory, BABELRC_FILENAME);\n    if (fs.existsSync(configFilePath)) {\n      cache[directory] = fs.readFileSync(configFilePath, 'utf8');\n      break;\n    }\n  }\n  paths.forEach(directoryPath => {\n    cache[directoryPath] = cache[directory];\n  });\n\n  return cache[directory] || '';\n};\n\nconst createTransformer = (options) => {\n  options = Object.assign({}, options, {\n    // auxiliaryCommentBefore: ' istanbul ignore next ',\n    presets: ((options && options.presets) || []).concat([jestPreset]),\n    retainLines: true,\n  });\n  delete options.cacheDirectory;\n\n  options.presets = options.presets.concat([es2015Preset]);\n\n  return {\n    canInstrument: true,\n    getCacheKey(\n      fileData,\n      filename,\n      configString,\n      {instrument, watch}\n    ) {\n      return crypto.createHash('md5')\n        .update(fileData)\n        .update(configString)\n        // Don't use the in-memory cache in watch mode because the .babelrc\n        // file may be modified.\n        .update(getBabelRC(filename, {useCache: !watch}))\n        .update(instrument ? 'instrument' : '')\n        .digest('hex');\n    },\n    process(\n      src,\n      filename,\n      config,\n      transformOptions\n    ) {\n      let plugins = options.plugins || [];\n\n      if (transformOptions && transformOptions.instrument) {\n        // Copied from jest-runtime transform.js\n        plugins = plugins.concat([\n          [\n            require('babel-plugin-istanbul').default,\n            {\n              // files outside `cwd` will not be instrumented\n              cwd: config.rootDir,\n              exclude: [],\n            },\n          ],\n        ]);\n      }\n\n    //   console.log(transformOptions);\n    //   console.log(JSON.stringify(options));\n    // console.log('src', src);\n\n      // ts compile\n      const diag = [];\n      const tsOutput = tsc.transpileModule(src, {diagnostics: diag, filename, compilerOptions: tsconfig.compilerOptions, reportDiagnostics: true});\n\n    //   console.log(tsOutput.outputText)\n\n      if (babel.util.canCompile(filename) || true) {\n        const babelOutput = babel.transform(\n          tsOutput.outputText,\n          Object.assign({}, options, {filename, plugins})\n        );\n\n        // console.log('babelOutput', babelOutput.code);\n\n        return babelOutput.code; \n      }\n\n      // return src;\n    },\n  };\n};\n\nmodule.exports = createTransformer();"
  },
  {
    "path": "config/testing/templates/_index.prod.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta http-equiv=X-UA-Compatible content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n  <title>React TS Starter</title>\n  <link href=\"https://fonts.googleapis.com/css?family=Hind|Montserrat|Roboto+Mono\" rel=\"stylesheet\">\n</head>\n<body>\n  <div id=\"app\"></div>\n</body>\n</html>\n"
  },
  {
    "path": "config/types/require.d.ts",
    "content": "declare var require: {\n  (path: string): any;\n  <T>(path: string): T;\n  (paths: string[], callback: (...modules: any[]) => void): void;\n  ensure: (paths: string[], callback: (require: <T>(path: string) => T) => void) => void;\n};\n"
  },
  {
    "path": "devServer.js",
    "content": "var path = require('path');\nvar webpack = require('webpack');\nvar express = require('express');\nvar devMiddleware = require('webpack-dev-middleware');\nvar hotMiddleware = require('webpack-hot-middleware');\nvar config = require('./webpack.config');\n\nvar app = express();\nvar compiler = webpack(config);\n\napp.use(devMiddleware(compiler, {\n  publicPath: config.output.publicPath,\n  historyApiFallback: true,\n}));\n\napp.use(hotMiddleware(compiler));\n\napp.get('*', function (req, res) {\n  res.sendFile(path.join(__dirname, 'index.html'));\n});\n\napp.listen(1337, function (err) {\n  if (err) {\n    return console.error(err);\n  }\n\n  console.log('Listening at http://localhost:1337/');\n});"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n  <title>React TS Starter</title>\n  <link href=\"https://fonts.googleapis.com/css?family=Hind|Montserrat|Roboto+Mono\" rel=\"stylesheet\">\n</head>\n<body>\n  <div id=\"app\"></div>\n  <script src=\"/app.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"lerna\": \"2.0.0-beta.38\",\n  \"packages\": [\n    \"packages/*\"\n  ],\n  \"version\": \"independent\"\n}\n"
  },
  {
    "path": "netlify.toml",
    "content": "[build]\n  command = \"npm run deploy\"\n  publish = \"build/public\"\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"scalable-react-typescript-boilerplate\",\n  \"version\": \"1.0.1\",\n  \"description\": \"React + TypeScript boilerplate\",\n  \"main\": \"index.js\",\n  \"author\": \"RyanCCollins\",\n  \"license\": \"MIT\",\n  \"engines\": {\n    \"node\": \"6.9.5\",\n    \"npm\": \"3.10.8\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"ts\",\n      \"tsx\",\n      \"js\"\n    ],\n    \"moduleNameMapper\": {\n      \"\\\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$\": \"<rootDir>/config/testing/__mocks__/fileMock.js\",\n      \"\\\\.(css|less)$\": \"<rootDir>/config/testing/__mocks__/styleMock.js\"\n    },\n    \"testPathIgnorePatterns\": [\n      \"<rootDir>/(build|docs|node_modules)/\",\n      \"/__mocks__/\"\n    ],\n    \"transform\": {\n      \".*\": \"<rootDir>/config/testing/preprocessor.js\"\n    },\n    \"testRegex\": \"(/__tests__/.*|\\\\.(test|spec))\\\\.(ts|tsx|js)$\"\n  },\n  \"scripts\": {\n    \"build\": \"webpack --config ./webpack.config.js\",\n    \"start\": \"node devServer.js\",\n    \"predeploy\": \"rimraf build/public/*.*\",\n    \"deploy\": \"cross-env NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack.config.prod.js\",\n    \"postdeploy\": \"npm run compile\",\n    \"compile\": \"./node_modules/.bin/tsc\",\n    \"setup:yarn\": \"yarn\",\n    \"preserve\": \"npm run compile\",\n    \"lint\": \"tslint \\\"packages/**/*.ts{,x}\\\" && tslint \\\"src/**/*.ts{,x}\\\"\",\n    \"serve\": \"cross-env NODE_ENV=server node server.js\",\n    \"postinstall\": \"npm run deploy\",\n    \"generator\": \"plop --plopfile ./config/generators/cli.js\",\n    \"test\": \"cross-env NODE_ENV=test jest\",\n    \"test:watch\": \"npm run test -- --watch\",\n    \"test:update\": \"npm run test -- --u\",\n    \"storybook\": \"start-storybook -p 9001 -c ./config/.storybook\",\n    \"clean\": \"shjs ./config/scripts/clean.js\"\n  },\n  \"dependencies\": {\n    \"@kadira/react-storybook-addon-info\": \"^3.3.0\",\n    \"@kadira/storybook\": \"^2.35.3\",\n    \"@kadira/storybook-addon-knobs\": \"^1.7.1\",\n    \"@types/body-parser\": \"^0.0.34\",\n    \"@types/compression\": \"latest\",\n    \"@types/express\": \"latest\",\n    \"@types/graphql\": \"latest\",\n    \"@types/isomorphic-fetch\": \"^0.0.33\",\n    \"@types/mongoose\": \"^4.7.7\",\n    \"@types/morgan\": \"latest\",\n    \"@types/node\": \"^6.0.64\",\n    \"@types/react\": \"^15.0.14\",\n    \"@types/react-dom\": \"^0.14.23\",\n    \"@types/react-ga\": \"^1.4.7\",\n    \"@types/react-redux\": \"^4.4.35\",\n    \"@types/react-router\": \"^3.0.6\",\n    \"@types/react-router-redux\": \"^4.0.42\",\n    \"@types/reselect\": \"^2.0.27\",\n    \"@types/sinon\": \"^1.16.35\",\n    \"@types/webpack\": \"^2.2.11\",\n    \"apollo-client\": \"^0.10.1\",\n    \"apollo-codegen\": \"^0.10.8\",\n    \"autoprefixer\": \"^6.7.6\",\n    \"axios\": \"^0.15.3\",\n    \"babel-polyfill\": \"^6.23.0\",\n    \"body-parser\": \"^1.17.0\",\n    \"compression\": \"^1.6.2\",\n    \"cors\": \"^2.8.1\",\n    \"exports-loader\": \"^0.6.4\",\n    \"express\": \"^4.15.0\",\n    \"github-markdown-css\": \"^2.4.1\",\n    \"graphql\": \"^0.9.1\",\n    \"graphql-server-express\": \"^0.7.2\",\n    \"graphql-tag\": \"^1.3.1\",\n    \"html-webpack-plugin\": \"^2.28.0\",\n    \"imports-loader\": \"^0.7.1\",\n    \"isomorphic-fetch\": \"^2.2.1\",\n    \"json-loader\": \"^0.5.4\",\n    \"markdown-loader\": \"^2.0.0\",\n    \"mongoose\": \"^4.8.5\",\n    \"morgan\": \"^1.8.1\",\n    \"node-env-file\": \"^0.1.8\",\n    \"openui\": \"1.0.3\",\n    \"plop\": \"^1.7.4\",\n    \"precss\": \"^1.4.0\",\n    \"react\": \"^15.4.1\",\n    \"react-addons-test-utils\": \"^15.4.2\",\n    \"react-apollo\": \"^0.13.2\",\n    \"react-dom\": \"^15.4.1\",\n    \"react-ga\": \"^2.1.2\",\n    \"react-hot-loader\": \"3.0.0-beta.6\",\n    \"react-markdown\": \"^2.4.5\",\n    \"react-redux\": \"^5.0.3\",\n    \"react-router\": \"^3.0.2\",\n    \"react-router-redux\": \"^4.0.8\",\n    \"redux\": \"^3.6.0\",\n    \"redux-connect\": \"^5.0.0\",\n    \"redux-logic\": \"^0.11.7\",\n    \"redux-mock-provider\": \"^1.0.0\",\n    \"reselect\": \"^2.5.4\",\n    \"rxjs\": \"^5.2.0\",\n    \"serialize-javascript\": \"^1.3.0\",\n    \"shelljs\": \"^0.7.7\",\n    \"shortid\": \"^2.2.6\",\n    \"sinon\": \"^1.17.7\",\n    \"styled-components\": \"^1.4.4\"\n  },\n  \"devDependencies\": {\n    \"@types/enzyme\": \"^2.7.5\",\n    \"@types/jest\": \"^18.1.1\",\n    \"babel-core\": \"^6.23.1\",\n    \"babel-loader\": \"^6.3.2\",\n    \"babel-plugin-webpack-alias\": \"^2.1.2\",\n    \"babel-preset-es2015\": \"^6.18.0\",\n    \"babel-preset-jest\": \"^19.0.0\",\n    \"babel-preset-react\": \"^6.23.0\",\n    \"babel-preset-stage-0\": \"^6.16.0\",\n    \"cross-env\": \"^3.2.3\",\n    \"css-loader\": \"^0.26.2\",\n    \"enzyme\": \"^2.7.1\",\n    \"enzyme-to-json\": \"^1.5.0\",\n    \"extract-text-webpack-plugin\": \"^2.0.0\",\n    \"html-loader\": \"^0.4.5\",\n    \"jest\": \"^19.0.2\",\n    \"lerna\": \"2.0.0-beta.38\",\n    \"postcss-loader\": \"^1.3.3\",\n    \"react-storybook-addon-props-combinations\": \"^0.3.0\",\n    \"redux-logic-test\": \"^1.0.3\",\n    \"redux-mock-store\": \"^1.2.2\",\n    \"rimraf\": \"^2.6.1\",\n    \"style-loader\": \"^0.13.2\",\n    \"ts-jest\": \"^19.0.0\",\n    \"ts-loader\": \"^2.0.1\",\n    \"tslint\": \"^4.5.1\",\n    \"tslint-eslint-rules\": \"^3.5.1\",\n    \"tslint-loader\": \"^3.4.3\",\n    \"tslint-react\": \"^2.5.0\",\n    \"typescript\": \"^2.2.1\",\n    \"webpack\": \"^2.2.1\",\n    \"webpack-dev-middleware\": \"^1.10.1\",\n    \"webpack-hot-middleware\": \"^2.17.1\",\n    \"webpack-manifest-plugin\": \"^1.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/docs/.babelrc",
    "content": "{\n  \"presets\": [\"es2015\", \"react\", \"stage-0\"],\n  \"env\": {\n    \"development\": {\n      \"plugins\": [\n        \"react-hot-loader/babel\"\n      ]\n    },\n    \"test\": {\n      \"plugins\": [\n        [\n          \"babel-plugin-webpack-alias\", {\n            \"config\": \"./webpack.config.prod.js\"\n          }\n        ]\n      ]\n    },\n    \"server\": {\n      \"plugins\": [\n        [\n          \"babel-plugin-webpack-alias\", {\n            \"config\": \"./webpack.config.server.js\"\n          }\n        ]\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/docs/config/generators/cli.js",
    "content": "const componentGenerator = require('./component/index.js');\nconst SafeString = require('./utils/safeString').SafeString;\nconst containerGenerator = require('./container/index.js');\n\nmodule.exports = (plop) => {\n  plop.setGenerator('component', componentGenerator);\n  plop.setGenerator('container', containerGenerator);\n  plop.addHelper('uppercase', (text) => {\n    return text.toUpperCase();\n  });\n  plop.addHelper('getPath', (p, itemName) => {\n    const pathParts = p.split('/');\n    const index = pathParts.indexOf(itemName);\n    const newPath = pathParts.slice(index + 1, pathParts.length);\n    return newPath.length < 1 ? `./${newPath}` : `./${newPath.join('/')}/`;\n  });\n  plop.addHelper('createImports', (list) => {\n    const items = list.map((item) => `import ${item} from 'grommet/components/${item}';`).join('\\n');\n    return new SafeString(items);\n  });\n  plop.addHelper('curly', (object, open) => (open ? '{' : '}'));\n};\n"
  },
  {
    "path": "packages/docs/config/generators/component/es6class.tsx.hbs",
    "content": "import * as React from 'react';\nimport Component from './styles';\n\nexport interface Props extends React.HTMLProps<typeof {{ properCase name }}> {\n  children: JSX.Element;\n}\nclass {{ properCase name }} extends React.Component<Props, undefined> {\n  public render() {\n    const {\n      children,\n    } = this.props;\n    return (\n      <Component>\n        {children}\n      </Component>\n    );\n  }\n}\n\nexport default {{ properCase name }};\n"
  },
  {
    "path": "packages/docs/config/generators/component/export.ts.hbs",
    "content": "$1\n  {{ properCase name }},"
  },
  {
    "path": "packages/docs/config/generators/component/import.ts.hbs",
    "content": "$1\nimport {{ properCase name }} from '{{ getPath path 'components' }}{{ properCase name }}';\n"
  },
  {
    "path": "packages/docs/config/generators/component/index.js",
    "content": "const path = require('path');\nconst { trimTemplateFile } = require('../utils/');\n\nmodule.exports = {\n  description: 'Generate a component',\n  prompts: [\n    {\n      type: 'input',\n      name: 'name',\n      message: 'What is the name of the component?',\n      default: 'Post',\n      validate: (value) => {\n        if ((/.+/).test(value)) {\n          return true;\n        }\n        return 'The name is required.';\n      }\n    },\n    {\n      type: 'input',\n      name: 'path',\n      message: 'What directory would you like your component in? (relative)',\n      default: './src/client/components',\n      validate: (value) => {\n        return true;\n      }\n    },\n    {\n      type: 'list',\n      name: 'type',\n      message: 'Select the type of component',\n      default: 'Stateless Function',\n      choices: () => ['ES6 Class', 'Stateless Function']\n    },\n  ],\n  actions: (data) => {\n    const componentPath = path.resolve(process.cwd(), `${data.path}/{{properCase name}}/`);\n    const rootPath = path.resolve(process.cwd(), `./src/client/components/index.ts`);\n    const actions = [{\n      type: 'add',\n      path: `${componentPath}/index.tsx`,\n      templateFile: data.type === 'ES6 Class' ?\n        './component/es6class.tsx.hbs' : './component/stateless.tsx.hbs',\n      abortOnFail: true\n    }, {\n      type: 'add',\n      path: `${componentPath}/types.ts`,\n      templateFile: './component/types.ts.hbs',\n      abortOnFail: true\n    }, {\n      type: 'add',\n      path: `${componentPath}/styles.ts`,\n      templateFile: './component/styles.ts.hbs',\n      abortOnFail: true\n    }, {\n      type: 'modify',\n      path: rootPath,\n      pattern: /(\\/\\* GENERATOR-IMPORT \\*\\/)/g,\n      template: trimTemplateFile('./config/generators/component/import.ts.hbs'),\n      abortOnFail: false\n    }, {\n      type: 'modify',\n      path: rootPath,\n      pattern: /(\\/\\* GENERATOR-EXPORT \\*\\/)/g,\n      template: trimTemplateFile('./config/generators/component/export.ts.hbs'),\n      abortOnFail: false\n    }];\n    return actions;\n  }\n};\n"
  },
  {
    "path": "packages/docs/config/generators/component/stateless.tsx.hbs",
    "content": "import * as React from 'react';\nimport Component from './styles';\n\nexport interface Props extends React.HTMLProps<typeof {{ properCase name }}> {\n  children: JSX.Element;\n}\nexport default function {{ properCase name }}({\n  children,\n}: Props): JSX.Element {\n  return (\n    <Component>\n      {children}\n    </Component>\n  );\n};\n"
  },
  {
    "path": "packages/docs/config/generators/component/styles.ts.hbs",
    "content": "import styled from 'styled-components';\n\nexport default styled.div`\n  height: 100px;\n  width: 200px;\n`;\n"
  },
  {
    "path": "packages/docs/config/generators/component/types.ts.hbs",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/docs/config/generators/container/actionCreators.js.hbs",
    "content": "import * as T from './constants';\nimport {\n  LoadInitiationAction,\n  LoadSuccessAction,\n  LoadFailureAction,\n  LoadCancelAction,\n} from './actions';\nimport { ErrorType } from './types';\n\nexport const loadInitiation = (): LoadInitiationAction => ({\n  type: T.LOAD_INITIATION,\n});\n\nexport const loadSuccess = (data: string): LoadSuccessAction => ({\n  type: T.LOAD_SUCCESS,\n  payload: data,\n});\n\nexport const loadFailure = (error: ErrorType): LoadFailureAction => ({\n  type: T.LOAD_FAILURE,\n  payload: error,\n});\n\nexport const loadCancel = (): LoadCancelAction => ({\n  type: T.LOAD_CANCEL,\n});\n\nexport const actionCreators = {\n  loadInitiation,\n  loadSuccess,\n  loadFailure,\n  loadCancel,\n};\n\nexport default actionCreators;\n"
  },
  {
    "path": "packages/docs/config/generators/container/actions.js.hbs",
    "content": "import { PayloadAction } from 'root/types';\nimport { ErrorType } from './types';\nimport * as T from './constants';\n\nexport interface LoadInitiationAction extends PayloadAction<undefined> {\n  type: T.LOAD_INITIATION_TYPE;\n}\n\nexport interface LoadSuccessAction extends PayloadAction<string> {\n  type: T.LOAD_SUCCESS_TYPE;\n  payload: string;\n}\n\nexport interface LoadFailureAction extends PayloadAction<ErrorType> {\n  type: T.LOAD_FAILURE_TYPE;\n  payload: ErrorType;\n}\n\nexport interface LoadCancelAction extends PayloadAction<undefined> {\n  type: T.LOAD_CANCEL_TYPE;\n}\n\nexport type Action = LoadInitiationAction | LoadSuccessAction | LoadFailureAction | LoadCancelAction;\n"
  },
  {
    "path": "packages/docs/config/generators/container/constants.js.hbs",
    "content": "export type LOAD_INITIATION_TYPE = '{{ uppercase name }}/LOAD_INITIATION';\nexport const LOAD_INITIATION: LOAD_INITIATION_TYPE = '{{ uppercase name }}/LOAD_INITIATION';\n\nexport type LOAD_SUCCESS_TYPE = '{{ uppercase name }}/LOAD_SUCCESS';\nexport const LOAD_SUCCESS: LOAD_SUCCESS_TYPE = '{{ uppercase name }}/LOAD_SUCCESS';\n\nexport type LOAD_FAILURE_TYPE = '{{ uppercase name }}/LOAD_FAILURE';\nexport const LOAD_FAILURE: LOAD_FAILURE_TYPE = '{{ uppercase name }}/LOAD_FAILURE';\n\nexport type LOAD_CANCEL_TYPE = '{{ uppercase name }}/LOAD_CANCEL';\nexport const LOAD_CANCEL: LOAD_CANCEL_TYPE = '{{ uppercase name }}/LOAD_CANCEL';\n\nexport type ActionType = LOAD_INITIATION_TYPE | LOAD_SUCCESS_TYPE | LOAD_FAILURE_TYPE | LOAD_CANCEL_TYPE;\n"
  },
  {
    "path": "packages/docs/config/generators/container/export.js.hbs",
    "content": "$1\n  {{ properCase name }},"
  },
  {
    "path": "packages/docs/config/generators/container/import.js.hbs",
    "content": "$1\nimport {{ properCase name }} from '{{ getPath path 'containers' }}{{ properCase name }}';\n"
  },
  {
    "path": "packages/docs/config/generators/container/index.js",
    "content": "const path = require('path');\nconst { trimTemplateFile } = require('../utils/');\n\nmodule.exports = {\n  description: 'Add a container component',\n  prompts: [\n    {\n      type: 'input',\n      name: 'name',\n      message: 'What should it be called?',\n      default: 'Dashboard',\n      validate: value => {\n        if ((/.+/).test(value)) {\n          return true;\n        }\n\n        return 'The name is required';\n      }\n    },\n    {\n      type: 'input',\n      name: 'path',\n      message: 'What directory would you like your container in? (relative)',\n      default: './src/client/containers',\n      validate: (value) => {\n        return true;\n      }\n    },\n    {\n      type: 'confirm',\n      name: 'wantActionsAndReducer',\n      default: true,\n      message: 'Do you want actions/constants/reducer for this container?'\n    },\n    {\n      type: 'confirm',\n      name: 'wantSelectors',\n      default: true,\n      message: 'Do you want to use reselect?'\n    }\n  ],\n  actions: (data) => {\n    const containerPath = path.resolve(process.cwd(), `${data.path}/{{properCase name}}/`);\n    const rootPath = path.resolve(process.cwd(), `./src/client/containers/index.ts`);\n    const reducersPath = path.resolve(process.cwd(), './src/client/reducers.ts');\n    const typesPath = path.resolve(process.cwd(), './src/client/types.ts');\n    const statePath = path.resolve(process.cwd(), './src/client/state.ts');\n    const actions = [\n      {\n        type: 'add',\n        path: `${containerPath}/index.tsx`,\n        templateFile: './container/index.js.hbs',\n        abortOnFail: true\n      },\n      {\n        type: 'add',\n        path: `${containerPath}/presentation.tsx`,\n        templateFile: './container/presentation.js.hbs',\n        abortOnFail: true\n      },\n      {\n        type: 'modify',\n        path: rootPath,\n        pattern: /(\\/\\* GENERATOR-IMPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/import.js.hbs'),\n        abortOnFail: false\n      },\n      {\n        type: 'modify',\n        path: rootPath,\n        pattern: /(\\/\\* GENERATOR-EXPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/export.js.hbs'),\n        abortOnFail: false\n      },\n      {\n        type: 'modify',\n        path: typesPath,\n        pattern: /(\\/\\* GENERATOR-IMPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/types.import.ts.hbs'),\n        abortOnFail: false\n      },\n      {\n        type: 'modify',\n        path: typesPath,\n        pattern: /(\\/\\* GENERATOR-EXPORT \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/types.export.ts.hbs'),\n        abortOnFail: false\n      }\n    ];\n\n    actions.push({\n      type: 'add',\n      path: `${containerPath}/styles.ts`,\n      templateFile: './container/styles.js.hbs',\n      abortOnFail: true\n    });\n\n    actions.push( {\n      type: 'add',\n      path: `${containerPath}/types.ts`,\n      templateFile: './container/types.ts.hbs',\n      abortOnFail: true\n    });\n\n    if (data.wantSelectors) {\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/selectors.ts`,\n        templateFile: './container/selectors.js.hbs',\n        abortOnFail: true\n      });\n    }\n\n    // If they want actions and a reducer, generate actions.js, constants.js,\n    // reducer.js and the corresponding tests for actions and the reducer\n    if (data.wantActionsAndReducer) {\n      // Actions\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/actionCreators.ts`,\n        templateFile: './container/actionCreators.js.hbs',\n        abortOnFail: true\n      });\n\n\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/state.ts`,\n        templateFile: './container/state.js.hbs',\n        abortOnFail: true\n      });\n\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/actions.ts`,\n        templateFile: './container/actions.js.hbs',\n        abortOnFail: true\n      });\n\n      // Constants\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/constants.ts`,\n        templateFile: './container/constants.js.hbs',\n        abortOnFail: true\n      });\n\n      // Reducer\n      actions.push({\n        type: 'add',\n        path: `${containerPath}/reducer.ts`,\n        templateFile: './container/reducer.js.hbs',\n        abortOnFail: true\n      });\n\n      actions.push({\n        type: 'modify',\n        path: reducersPath,\n        pattern: /(\\/\\* GENERATOR-IMPORT-REDUCER \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/reducer.import.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: reducersPath,\n        pattern: /(\\/\\* GENERATOR-EXPORT-REDUCER \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/reducer.export.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: statePath,\n        pattern: /(\\/\\* GENERATOR-IMPORT-STATE \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/state.import.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: statePath,\n        pattern: /(\\/\\* GENERATOR-EXPORT-STATE \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/reducer.export-state.js.hbs'),\n        abortOnFail: false\n      });\n\n      actions.push({\n        type: 'modify',\n        path: statePath,\n        pattern: /(\\/\\* GENERATOR-EXPORT-STATE-TYPE \\*\\/)/g,\n        template: trimTemplateFile('./config/generators/container/state-type.js.hbs'),\n        abortOnFail: false\n      });\n\n    }\n\n    return actions;\n  }\n};\n"
  },
  {
    "path": "packages/docs/config/generators/container/index.js.hbs",
    "content": "import * as React from 'react';\n{{#if wantActionsAndReducer}}\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { State as GlobalState } from 'root/state';\nimport { Action, ActionMap, ErrorType } from './types';\nimport actionCreators from './actionCreators';\n{{/if}}\n{{#if wantSelectors}}\nimport * as selectors from './selectors';\n{{/if}}\nimport Presentation from './presentation';\n{{#if wantActionsAndReducer}}\n\n{{#if wantSelectors}}\ntype MapStateToProps = (state: GlobalState) => StateProps;\nconst mapStateToProps: MapStateToProps = (state) => ({\n  isLoading: selectors.selectIsLoading(state),\n  error: selectors.selectError(state),\n  data: selectors.selectData(state),\n});\n{{else}}\ntype MapStateToProps = (state: GlobalState): StateProps;\nconst mapStateToProps: MapStateToProps = (state) => ({\n  isLoading: state.{{ camelCase name }}.isLoading,\n  error: state.{{ camelCase name }}.error,\n  data: state.{{ camelCase name }}.data,\n});\n{{/if}}\n\ntype MapDispatchToProps = (dispatch: Dispatch<Action>) => DispatchProps;\nconst mapDispatchToProps: MapDispatchToProps = (dispatch) => ({\n  actions: bindActionCreators(\n    actionCreators,\n    dispatch,\n  ),\n});\n\nexport interface DispatchProps {\n  actions: ActionMap;\n}\n\nexport interface StateProps {\n  isLoading: boolean;\n  error?: ErrorType;\n  data?: string;\n}\n\nexport type Props = StateProps & DispatchProps;\n\nclass {{ properCase name }} extends React.Component<Props, undefined> {\n{{else}}\nexport interface Props {\n\n}\nclass {{ properCase name }} extends React.Component<Props, undefined> {\n{{/if}}\n  public render() {\n    return (\n      <Presentation {...this.props} />\n    );\n  }\n}\n\n{{#if wantActionsAndReducer}}\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps,\n)({{ properCase name }});\n{{else}}\nexport default {{ properCase name }};\n{{/if}}\n"
  },
  {
    "path": "packages/docs/config/generators/container/presentation.js.hbs",
    "content": "import * as React from 'react';\n{{#if wantActionsAndReducer}}\nimport { StateProps } from './types';\n{{else}}\nimport { Props as ParentProps } from './types';\n{{/if}}\nimport { Heading, Section } from './styles';\n\n{{#if wantActionsAndReducer}}\nexport default class Presentation extends React.Component<StateProps, undefined> {\n{{else}}\nexport interface Props extends ParentProps {\n  // own props\n}\nexport default class Presentation extends React.Component<Props, undefined> {\n{{/if}}\n  public render() {\n    {{#if wantActionsAndReducer}}\n    const {\n      isLoading,\n      error,\n      data,\n    } = this.props;\n    {{/if}}\n    return (\n      <Section>\n        <Heading>\n          Best container ever!\n        </Heading>\n      </Section>\n    );\n  }\n}\n"
  },
  {
    "path": "packages/docs/config/generators/container/reducer.export-state.js.hbs",
    "content": "$1\n  {{ camelCase name }}: {{ camelCase name }}State,\n"
  },
  {
    "path": "packages/docs/config/generators/container/reducer.export.js.hbs",
    "content": "$1\n  {{ camelCase name }},"
  },
  {
    "path": "packages/docs/config/generators/container/reducer.import.js.hbs",
    "content": "$1\nimport {{ camelCase name }} from './containers/{{ properCase name }}/reducer';"
  },
  {
    "path": "packages/docs/config/generators/container/reducer.js.hbs",
    "content": "import * as T from './constants';\nimport initialState from './state';\nimport {\n  Action,\n  State,\n} from './types';\n\nconst reducer = (\n  state: State = initialState,\n  action: Action,\n): State => {\n  switch (action.type) {\n  case T.LOAD_INITIATION:\n    return Object.assign({}, state, {\n      isLoading: true,\n    });\n  case T.LOAD_SUCCESS:\n    return Object.assign({}, state, {\n      isLoading: false,\n      data: action.payload,\n    });\n  case T.LOAD_FAILURE:\n    return Object.assign({}, state, {\n      isLoading: false,\n      error: action.payload,\n    });\n  default:\n    return state;\n  }\n};\n\nexport default reducer;\n"
  },
  {
    "path": "packages/docs/config/generators/container/selectors.js.hbs",
    "content": "import { State as GlobalState } from '../../state';\nimport { State, ErrorType } from './types';\nimport { createSelector, Selector } from 'reselect';\n\nexport const select{{ properCase name }} = () => (state: GlobalState): State => state.{{ camelCase name }};\n\nexport type SelectIsLoading = Selector<GlobalState, boolean>;\nexport const selectIsLoading: SelectIsLoading = createSelector(\n  select{{ properCase name }}(),\n  ({{ camelCase name }}) => {{ camelCase name }}.isLoading,\n);\n\nexport type SelectError = Selector<GlobalState, ErrorType>;\nexport const selectError: SelectError = createSelector(\n  select{{ properCase name }}(),\n  ({{ camelCase name }}) => {{ camelCase name }}.error,\n);\n\nexport type SelectData = Selector<GlobalState, string>;\nexport const selectData: SelectData = createSelector(\n  select{{ properCase name }}(),\n  ({{ camelCase name }}) => {{ camelCase name }}.data,\n);\n"
  },
  {
    "path": "packages/docs/config/generators/container/state-type.js.hbs",
    "content": "$1\n  {{ camelCase name }}: {{ properCase name }}State;"
  },
  {
    "path": "packages/docs/config/generators/container/state.import.js.hbs",
    "content": "$1\nimport { initialState as {{ camelCase name }}State, State as {{ properCase name }}State } from './containers/{{ properCase name }}/state';"
  },
  {
    "path": "packages/docs/config/generators/container/state.js.hbs",
    "content": "import { ErrorType } from './types';\n\nexport interface State {\n  isLoading: boolean;\n  error?: ErrorType;\n  data?: string;\n}\n\nexport const initialState: State = {\n  isLoading: false,\n  error: null,\n  data: null,\n};\n\nexport default initialState;\n"
  },
  {
    "path": "packages/docs/config/generators/container/styles.js.hbs",
    "content": "import styled from 'styled-components';\n\nexport const Section = styled.section`\n  padding: 60px;\n  background-color: #f5f5f5;\n  min-height: calc(100vh - 50px);\n`;\n\nexport const Heading = styled.h1`\n  text-align: center;\n`;\n"
  },
  {
    "path": "packages/docs/config/generators/container/types.export.ts.hbs",
    "content": "$1\n  {{ properCase name }}Types,"
  },
  {
    "path": "packages/docs/config/generators/container/types.import.ts.hbs",
    "content": "$1\nimport * as {{ properCase name }}Types from './containers/{{ properCase name }}/types';"
  },
  {
    "path": "packages/docs/config/generators/container/types.ts.hbs",
    "content": "{{#if wantActionsAndReducer}}\nimport { ActionCreatorsMapObject } from 'redux';\nimport {\n  LoadInitiationAction,\n  LoadSuccessAction,\n  LoadFailureAction,\n  LoadCancelAction,\n} from './actions';\n\nexport { State } from './state';\nexport { Props, StateProps, DispatchProps } from './';\nexport { ActionType } from './constants';\nexport { Action } from './actions';\nexport interface ErrorType { message: string }\n\nexport interface ActionMap extends ActionCreatorsMapObject {\n  loadInitiation: () => LoadInitiationAction;\n  loadSuccess: (data: string) => LoadSuccessAction;\n  loadFailure: (error: ErrorType) => LoadFailureAction;\n  loadCancel: () => LoadCancelAction;\n}\n{{else}}\nexport { Props } from './';\n{{/if}}"
  },
  {
    "path": "packages/docs/config/generators/utils/index.js",
    "content": "const fs = require('fs');\n\nconst trimTemplateFile = (template) => {\n  // Loads the template file and trims the whitespace and then returns the content as a string.\n  return fs.readFileSync(template, 'utf8').replace(/\\s*$/, '');\n};\n\nmodule.exports = {\n  trimTemplateFile\n};\n"
  },
  {
    "path": "packages/docs/config/generators/utils/safeString.js",
    "content": "function SafeString(string) {\n  this.string = string;\n}\n\nSafeString.prototype.toString = SafeString.prototype.toHTML = function() {\n  return '' + this.string;\n};\n\nmodule.exports = {\n  SafeString\n};\n"
  },
  {
    "path": "packages/docs/config/ignoreAssets.js",
    "content": "/* eslint-disable */\n(function() {\n  require.extensions['.scss'] = () => {\n    return;\n  };\n  require.extensions['.css'] = () => {\n    return;\n  };\n  require.extensions['.png'] = () => {\n    return;\n  };\n  require.extensions['.jpg'] = () => {\n    return;\n  };\n  require.extensions['.md'] = () => {\n    return;\n  };\n})();\n"
  },
  {
    "path": "packages/docs/config/types/require.d.ts",
    "content": "declare var require: {\n  (path: string): any;\n  <T>(path: string): T;\n  (paths: string[], callback: (...modules: any[]) => void): void;\n  ensure: (paths: string[], callback: (require: <T>(path: string) => T) => void) => void;\n};\n"
  },
  {
    "path": "packages/docs/devServer.js",
    "content": "var path = require('path');\nvar webpack = require('webpack');\nvar express = require('express');\nvar devMiddleware = require('webpack-dev-middleware');\nvar hotMiddleware = require('webpack-hot-middleware');\nvar config = require('./webpack.config');\n\nvar app = express();\nvar compiler = webpack(config);\n\napp.use(devMiddleware(compiler, {\n  publicPath: config.output.publicPath,\n  historyApiFallback: true,\n}));\n\napp.use(hotMiddleware(compiler));\n\napp.get('*', function (req, res) {\n  res.sendFile(path.join(__dirname, 'index.html'));\n});\n\napp.listen(1339, function (err) {\n  if (err) {\n    return console.error(err);\n  }\n\n  console.log('Listening at http://localhost:1339/');\n});"
  },
  {
    "path": "packages/docs/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n  <title>React TS Starter</title>\n  <link href=\"https://fonts.googleapis.com/css?family=Hind|Montserrat|Roboto+Mono\" rel=\"stylesheet\">\n</head>\n<body>\n  <div id=\"app\"></div>\n  <script src=\"/app.js\"></script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/docs/package.json",
    "content": "{\n  \"name\": \"srtb-docs\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Docs for the scalable-react-typescript-boilerplate project\",\n  \"main\": \"index.js\",\n  \"author\": \"RyanCCollins\",\n  \"license\": \"MIT\",\n  \"engines\": {\n    \"node\": \"6.9.5\",\n    \"npm\": \"3.10.8\"\n  },\n  \"scripts\": {\n    \"precommit\": \"npm run lint --silent && npm run test\",\n    \"build\": \"webpack --config ./webpack.config.js\",\n    \"start\": \"node devServer.js\",\n    \"predeploy\": \"rimraf build/public/*.*\",\n    \"deploy\": \"cross-env NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack.config.prod.js\",\n    \"postdeploy\": \"npm run compile\",\n    \"compile\": \"./node_modules/.bin/tsc\",\n    \"setup:yarn\": \"yarn\",\n    \"preserve\": \"npm run compile\",\n    \"lint\": \"tslint \\\"packages/**/*.ts{,x}\\\" && tslint \\\"src/**/*.ts{,x}\\\"\",\n    \"serve\": \"cross-env NODE_ENV=server node server.js\",\n    \"postinstall\": \"npm run deploy\",\n    \"generator\": \"plop --plopfile ./config/generators/cli.js\"\n  },\n  \"dependencies\": {\n    \"@types/body-parser\": \"^0.0.34\",\n    \"@types/compression\": \"latest\",\n    \"@types/express\": \"latest\",\n    \"@types/graphql\": \"latest\",\n    \"@types/isomorphic-fetch\": \"^0.0.33\",\n    \"@types/mongoose\": \"^4.7.7\",\n    \"@types/morgan\": \"latest\",\n    \"@types/node\": \"^6.0.64\",\n    \"@types/react\": \"^15.0.14\",\n    \"@types/react-dom\": \"^0.14.23\",\n    \"@types/react-ga\": \"^1.4.7\",\n    \"@types/react-redux\": \"^4.4.35\",\n    \"@types/react-router\": \"^3.0.6\",\n    \"@types/react-router-redux\": \"^4.0.42\",\n    \"@types/reselect\": \"^2.0.27\",\n    \"@types/sinon\": \"^1.16.35\",\n    \"@types/webpack\": \"^2.2.11\",\n    \"apollo-client\": \"^0.10.1\",\n    \"apollo-codegen\": \"^0.10.8\",\n    \"autoprefixer\": \"^6.7.6\",\n    \"axios\": \"^0.15.3\",\n    \"babel-polyfill\": \"^6.23.0\",\n    \"body-parser\": \"^1.17.0\",\n    \"compression\": \"^1.6.2\",\n    \"cors\": \"^2.8.1\",\n    \"exports-loader\": \"^0.6.4\",\n    \"express\": \"^4.15.0\",\n    \"github-markdown-css\": \"^2.4.1\",\n    \"graphql\": \"^0.9.1\",\n    \"graphql-server-express\": \"0.7.2\",\n    \"graphql-tag\": \"^1.3.1\",\n    \"html-webpack-plugin\": \"^2.28.0\",\n    \"imports-loader\": \"^0.7.1\",\n    \"isomorphic-fetch\": \"^2.2.1\",\n    \"json-loader\": \"^0.5.4\",\n    \"markdown-loader\": \"^2.0.0\",\n    \"mongoose\": \"^4.8.5\",\n    \"morgan\": \"^1.8.1\",\n    \"node-env-file\": \"^0.1.8\",\n    \"openui\": \"1.0.4\",\n    \"plop\": \"^1.7.4\",\n    \"precss\": \"^1.4.0\",\n    \"react\": \"^15.4.1\",\n    \"react-addons-test-utils\": \"^15.4.2\",\n    \"react-apollo\": \"^0.13.2\",\n    \"react-dom\": \"^15.4.1\",\n    \"react-ga\": \"^2.1.2\",\n    \"react-hot-loader\": \"3.0.0-beta.6\",\n    \"react-markdown\": \"^2.4.5\",\n    \"react-redux\": \"^5.0.3\",\n    \"react-router\": \"^3.0.2\",\n    \"react-router-redux\": \"^4.0.8\",\n    \"redux\": \"^3.6.0\",\n    \"redux-connect\": \"^5.0.0\",\n    \"redux-logic\": \"^0.11.7\",\n    \"redux-mock-provider\": \"^1.0.0\",\n    \"reselect\": \"^2.5.4\",\n    \"rxjs\": \"^5.2.0\",\n    \"serialize-javascript\": \"^1.3.0\",\n    \"shortid\": \"^2.2.6\",\n    \"sinon\": \"^1.17.7\",\n    \"styled-components\": \"^1.4.4\"\n  },\n  \"devDependencies\": {\n    \"@types/enzyme\": \"^2.7.5\",\n    \"babel-core\": \"^6.23.1\",\n    \"babel-loader\": \"^6.3.2\",\n    \"babel-plugin-webpack-alias\": \"^2.1.2\",\n    \"babel-preset-es2015\": \"^6.18.0\",\n    \"babel-preset-react\": \"^6.23.0\",\n    \"babel-preset-stage-0\": \"^6.16.0\",\n    \"cross-env\": \"^3.2.3\",\n    \"css-loader\": \"^0.26.2\",\n    \"enzyme\": \"^2.7.1\",\n    \"enzyme-to-json\": \"^1.5.0\",\n    \"extract-text-webpack-plugin\": \"^2.0.0\",\n    \"html-loader\": \"^0.4.5\",\n    \"husky\": \"^0.13.2\",\n    \"lerna\": \"2.0.0-beta.38\",\n    \"postcss-loader\": \"^1.3.3\",\n    \"redux-logic-test\": \"^1.0.3\",\n    \"redux-mock-store\": \"^1.2.2\",\n    \"rimraf\": \"^2.6.1\",\n    \"style-loader\": \"^0.13.2\",\n    \"ts-loader\": \"^2.0.1\",\n    \"tslint\": \"^4.5.1\",\n    \"tslint-eslint-rules\": \"^3.5.1\",\n    \"tslint-loader\": \"^3.4.3\",\n    \"tslint-react\": \"^2.5.0\",\n    \"typescript\": \"^2.2.1\",\n    \"webpack\": \"^2.2.1\",\n    \"webpack-dev-middleware\": \"^1.10.1\",\n    \"webpack-hot-middleware\": \"^2.17.1\",\n    \"webpack-manifest-plugin\": \"^1.1.0\"\n  }\n}\n"
  },
  {
    "path": "packages/docs/server.js",
    "content": "require('babel-core/register');\nrequire('./config/ignoreAssets');\nvar app = require('./build/src/server/index.jsx');\n"
  },
  {
    "path": "packages/docs/src/client/apolloClient.ts",
    "content": "import { ApolloClient, createNetworkInterface } from 'apollo-client';\n\ndeclare var window: {\n  __INITIAL_STATE__: string,\n};\n\nconst uri = process.env.API_URL || 'http://0.0.0.0:1338/api';\n\nconst client = new ApolloClient({\n  networkInterface: createNetworkInterface({\n    uri,\n  }),\n  initialState: typeof window !== 'undefined' ? window.__INITIAL_STATE__ : null, // eslint-disable-line\n  ssrForceFetchDelay: 100,\n});\n\nexport default client;\n"
  },
  {
    "path": "packages/docs/src/client/components/AddComment/__tests__/__mocks__/addCommentMocks.mock.ts",
    "content": "export const addCommentProps = {\n  input: 'Mock input for test',\n  onSubmit: jest.fn(),\n  onChange: jest.fn(),\n  onKeyUp: jest.fn(),\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/AddComment/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<AddComment /> rendering should render with supplied props 1`] = `\n<styled.div>\n  <styled.div>\n    <styled.div />\n  </styled.div>\n  <styled.div>\n    <form>\n      <styled.textarea\n        cols={30}\n        id=\"comment-input\"\n        name=\"comment-input\"\n        onChange={[Function]}\n        onKeyUp={[Function]}\n        placeholder=\"Add comment...\"\n        rows={3}\n        value=\"Mock input for test\"\n      />\n    </form>\n    <styled.footer>\n      <styled.ul>\n        <styled.li\n          onClick={[Function]}\n        >\n          <styled.a>\n            Submit\n          </styled.a>\n        </styled.li>\n      </styled.ul>\n    </styled.footer>\n  </styled.div>\n</styled.div>\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/AddComment/__tests__/index.test.tsx",
    "content": "import { shallow, mount } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport AddComment from '../';\nimport { addCommentProps } from './__mocks__/addCommentMocks.mock';\n\ndescribe('<AddComment /> rendering', () => {\n  it('should render with supplied props', () => {\n    const wrapper = shallow(\n      <AddComment {...addCommentProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n\ndescribe('<AddComment /> onSubmit event testing', () => {\n  let addCommentComponent;\n\n  beforeEach(() => {\n    addCommentComponent = mount(\n      <AddComment {...addCommentProps} />,\n    );\n  });\n\n  it('AddComment requires onSubmit prop', () => {\n    expect(addCommentComponent.props().onSubmit).toBeDefined();\n  });\n\n  it('AddComment renders an anchor tag for OnClick event', () => {\n    const renderedAnchorTag = addCommentComponent.find('a').first();\n    expect(renderedAnchorTag).toBeDefined();\n  });\n\n  it('Clicking anchor tag calls onSubmit()', () => {\n    const renderedAnchorTag = addCommentComponent.find('a').first();\n    renderedAnchorTag.simulate('click');\n    expect(addCommentProps.onSubmit).toBeCalled();\n  });\n});\n\ndescribe('<AddComment /> onChange event testing', () => {\n  let addCommentComponent;\n\n  beforeEach(() => {\n    addCommentComponent = mount(\n     <AddComment {...addCommentProps} />,\n    );\n  });\n\n  it('AddComment requires onChange prop', () => {\n    expect(addCommentComponent.props().onChange).toBeDefined();\n  });\n\n  it('AddComment renders textarea for OnChange event', () => {\n    const renderedTextArea = addCommentComponent.find('textarea').first();\n    expect(renderedTextArea).toBeDefined();\n  });\n\n  it('Changing textarea triggers OnChange()', () => {\n    const renderedTextArea = addCommentComponent.find('textarea').first();\n    renderedTextArea.simulate('change');\n    expect(addCommentProps.onChange).toBeCalled();\n  });\n});\n\ndescribe('<AddComment /> onKeyUp event testing', () => {\n  let addCommentComponent;\n\n  beforeEach(() => {\n    addCommentComponent = mount(\n      <AddComment {...addCommentProps} />,\n    );\n  });\n\n  it('AddComment requires onKeyUp prop', () => {\n    expect(addCommentComponent.props().onKeyUp).toBeDefined();\n  });\n\n  it('AddComment renders textarea for OnKeyUp event', () => {\n    const renderedTextArea = addCommentComponent.find('textarea').first();\n    expect(renderedTextArea).toBeDefined();\n  });\n\n  it('KeyUp in textarea triggers OnKeyUp()', () => {\n    const renderedTextArea = addCommentComponent.find('textarea').first();\n    renderedTextArea.simulate('keyup');\n    expect(addCommentProps.onKeyUp).toBeCalled();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/components/AddComment/index.tsx",
    "content": "import * as React from 'react';\nimport { AddCommentProps } from './types';\nimport {\n  Wrapper,\n  CommentWrapper,\n  PicWrapper,\n  Pic,\n  TextArea,\n  Footer,\n  Actions,\n  Action,\n  ActionButton,\n} from './styles';\n\nexport default function AddComment({\n  onSubmit,\n  input,\n  onChange,\n  onKeyUp,\n}: AddCommentProps): JSX.Element {\n  return (\n    <Wrapper>\n      <PicWrapper>\n        <Pic />\n      </PicWrapper>\n      <CommentWrapper>\n        <form>\n          <TextArea\n            onKeyUp={onKeyUp}\n            value={input}\n            onChange={onChange}\n            name=\"comment-input\"\n            id=\"comment-input\"\n            cols={30}\n            rows={3}\n            placeholder=\"Add comment...\"\n          />\n        </form>\n        <Footer>\n          <Actions>\n            <Action onClick={onSubmit}>\n              <ActionButton>Submit</ActionButton>\n            </Action>\n          </Actions>\n        </Footer>\n      </CommentWrapper>\n    </Wrapper>\n  );\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/AddComment/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Wrapper = styled.div`\n  min-height: 5.3125rem;\n  margin-bottom: 1.25rem;\n  width: 100%;\n  display: flex;\n  flex-direction: row;\n`;\n\nexport const CommentWrapper = styled.div`\n  padding: 1rem;\n  background-color: #fff;\n  vertical-align: top;\n  border-radius: 0.1875rem;\n  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);\n  flex: 1;\n`;\n\nexport const Footer = styled.footer`\n  color: #acb4c2;\n  font-size: 0.875rem;\n  display: flex;\n  align-items: baseline;\n  justify-content: flex-end;\n  flex-direction: row;\n`;\n\nexport const Actions = styled.ul`\n  list-style: none;\n`;\n\nexport const Action = styled.li`\n  padding-right: 0.75rem;\n`;\n\nexport const ActionButton = styled.a`\n  cursor: pointer;\n`;\n\nexport const PicWrapper = styled.div`\n  padding-top: 0.625rem;\n  width: 3.5rem;\n`;\n\nexport const Pic = styled.div`\n  height: 2.25rem;\n  width: 2.25rem;\n  border-radius: 50%;\n  background-size: contain;\n  background-image: url('https://github.com/RyanCCollins/cdn/blob/master/misc/missing.png?raw=true');\n`;\n\nexport const TextArea = styled.textarea`\n  width: 100%;\n  resize: none;\n  outline: none;\n  border: none;\n  display: block;\n  margin: 0;\n  padding: 0;\n  -webkit-font-smoothing: antialiased;\n  font-family: \"PT Sans\", \"Helvetica Neue\", \"Helvetica\", \"Roboto\", \"Arial\", sans-serif;\n  font-size: 1rem;\n  color: #555f77;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/AddComment/types.ts",
    "content": "import * as React from 'react';\nimport AddComment from './';\n\nexport interface AddCommentProps extends React.Props<typeof AddComment> {\n  input: string;\n  onSubmit: React.EventHandler<React.MouseEvent<HTMLLIElement>>;\n  onChange: React.EventHandler<React.FormEvent<HTMLTextAreaElement>>;\n  onKeyUp: React.EventHandler<React.KeyboardEvent<HTMLTextAreaElement>>;\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/Comment/__tests__/__mocks__/commentMocks.mock.ts",
    "content": "export const commentProps = {\n  author: 'Comment Author',\n  body: 'Comment Body',\n};\n\nexport const commentPicProps = {\n  author: 'Comment Author',\n  body: 'Comment Body',\n  picUrl: 'https://github.com/RyanCCollins/cdn/blob/master/misc/missing.png?raw=true',\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/Comment/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Comment /> default should render a plain comment with other props 1`] = `\n<styled.div>\n  <styled.div>\n    <styled.div\n      url=\"https://github.com/RyanCCollins/cdn/blob/master/misc/missing.png?raw=true\"\n    />\n  </styled.div>\n  <styled.div>\n    <styled.p>\n      Comment Body\n    </styled.p>\n    <styled.footer>\n      Comment Author\n       | Aug 24, 2014 @ 2:35 PM\n    </styled.footer>\n  </styled.div>\n</styled.div>\n`;\n\nexports[`<Comment /> default should render a plain comment with required props 1`] = `\n<styled.div>\n  <styled.div>\n    <styled.div\n      url=\"https://github.com/RyanCCollins/cdn/blob/master/misc/missing.png?raw=true\"\n    />\n  </styled.div>\n  <styled.div>\n    <styled.p>\n      Comment Body\n    </styled.p>\n    <styled.footer>\n      Comment Author\n       | Aug 24, 2014 @ 2:35 PM\n    </styled.footer>\n  </styled.div>\n</styled.div>\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/Comment/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Comment from '../';\nimport { commentProps, commentPicProps } from './__mocks__/commentMocks.mock';\n\ndescribe('<Comment /> default', () => {\n  it('should render a plain comment with required props', () => {\n    const wrapper = shallow(\n      <Comment {...commentProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a plain comment with other props', () => {\n    const wrapper = shallow(\n      <Comment {...commentPicProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/components/Comment/index.tsx",
    "content": "import * as React from 'react';\nimport defaultImage from './default';\nimport { CommentProps } from './types';\nimport {\n  Wrapper,\n  CommentWrapper,\n  PicWrapper,\n  Pic,\n  CommentText,\n  Footer,\n} from './styles';\n\nexport default function Comment({\n  author,\n  body,\n  picUrl,\n}: CommentProps): JSX.Element {\n  const url = picUrl || defaultImage;\n  return (\n    <Wrapper>\n      <PicWrapper>\n        <Pic url={url} />\n      </PicWrapper>\n      <CommentWrapper>\n        <CommentText>{body}</CommentText>\n        <Footer>\n          {author} | Aug 24, 2014 @ 2:35 PM\n        </Footer>\n      </CommentWrapper>\n    </Wrapper>\n  );\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/Comment/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Wrapper = styled.div`\n  min-height: 5.3125rem;\n  margin-bottom: 1.25rem;\n  width: 100%;\n  display: flex;\n  flex-direction: row;\n`;\n\nexport const CommentWrapper = styled.div`\n  padding: 1rem;\n  background-color: #fff;\n  vertical-align: top;\n  border-radius: 0.1875rem;\n  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);\n  flex: 1;\n`;\n\nexport const CommentText = styled.p`\n  color: #555f77;\n  margin-bottom: 1.25rem;\n  line-height: 1.3125rem;\n`;\n\nexport const PicWrapper = styled.div`\n  padding-top: 0.625rem;\n  width: 3.5rem;\n`;\ninterface PicProps {\n  url?: string;\n}\n\nexport const Pic = styled.div`\n  height: 2.25rem;\n  width: 2.25rem;\n  border-radius: 50%;\n  background-size: contain;\n  background-image: url(${(props: PicProps) => props.url});\n`;\n\nexport const Footer = styled.footer`\n  color: #acb4c2;\n  font-size: 0.875rem;\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  flex-direction: row;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/Comment/types.ts",
    "content": "import * as React from 'react';\nimport Comment from '../';\n\nexport interface CommentProps extends React.Props<typeof Comment> {\n  author?: string;\n  body?: string;\n  picUrl?: string;\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/Html/index.tsx",
    "content": "import * as React from 'react';\nimport serialize from 'serialize-javascript';\n\nconst Html = (props: {\n  content: string,\n  state: {},\n  scriptHash: string,\n  vendorHash: string,\n  cssHash: string,\n  styles: string,\n}) => (\n  <html lang=\"en\">\n    <head>\n      <meta charSet=\"UTF-8\" />\n      <meta httpEquiv=\"Content-Language\" content=\"en\" />\n      <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n      <title>Scalable React TypeScript Boilerplate</title>\n      <link href=\"https://fonts.googleapis.com/css?family=Hind|Montserrat|Roboto+Mono\" rel=\"stylesheet\" />\n      <link href={`public${props.cssHash}`} rel=\"stylesheet\" />\n      <style dangerouslySetInnerHTML={{ __html: props.styles }} />\n    </head>\n    <body>\n      <div id=\"app\" dangerouslySetInnerHTML={{ __html: props.content }} />\n      <script src={`public${props.scriptHash}`} charSet=\"UTF-8\" />\n      <script src={`public${props.vendorHash}`} type=\"text/javascript\" />\n      <script\n        dangerouslySetInnerHTML={{\n          __html: `window.__INITIAL_STATE__=${serialize(props.state, { isJSON: true })};`,\n        }}\n        charSet=\"UTF-8\"\n      />\n    </body>\n  </html>\n);\n\nexport default Html;\n"
  },
  {
    "path": "packages/docs/src/client/components/NavBar/__tests__/__mocks__/navBarMocks.mock.ts",
    "content": "const links = [\n  {\n    url: 'https://medium.com',\n    text: 'Medium',\n  },\n  {\n    url: 'https://www.ryancollins.io/',\n    text: 'RyanCollins',\n  },\n];\n\nexport const navbarProps = {\n  logoText: 'NavBar Test',\n  links,\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/NavBar/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<NavBar /> default should render NavBar with links and text 1`] = `\n<styled.nav>\n  <styled.div>\n    <styled.div>\n      <withRouter(Anchor)\n        color=\"#007acc\"\n        path=\"/\"\n        plain={true}\n      >\n        NavBar Test\n      </withRouter(Anchor)>\n    </styled.div>\n    <styled.div>\n      <styled.ul>\n        <styled.li>\n          <withRouter(Anchor)\n            path=\"https://medium.com\"\n            plain={true}\n          >\n            Medium\n          </withRouter(Anchor)>\n        </styled.li>\n        <styled.li>\n          <withRouter(Anchor)\n            path=\"https://www.ryancollins.io/\"\n            plain={true}\n          >\n            RyanCollins\n          </withRouter(Anchor)>\n        </styled.li>\n      </styled.ul>\n    </styled.div>\n  </styled.div>\n</styled.nav>\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/NavBar/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport { navbarProps } from './__mocks__/navBarMocks.mock';\nimport NavBar from '../';\n\ndescribe('<NavBar /> default', () => {\n  it('should render NavBar with links and text', () => {\n    const wrapper = shallow(\n      <NavBar {...navbarProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/components/NavBar/index.tsx",
    "content": "import * as React from 'react';\nimport { Anchor } from 'openui';\nimport { NavBarProps } from './types';\nimport {\n  Nav,\n  InnerNav,\n  LeftMenu,\n  RightMenu,\n  Menu,\n  MenuItem,\n} from './styles';\n\nexport default function NavBar({\n  logoText,\n  links,\n}: NavBarProps): JSX.Element {\n  return (\n    <Nav>\n      <InnerNav>\n        <LeftMenu>\n          <Anchor plain path=\"/\" color=\"#007acc\">\n            {logoText}\n          </Anchor>\n        </LeftMenu>\n        <RightMenu>\n          <Menu>\n            {links.map((item, i) =>\n              <MenuItem key={i}>\n                <Anchor\n                  plain\n                  path={item.url}\n                >\n                  {item.text}\n                </Anchor>\n              </MenuItem>,\n            )}\n          </Menu>\n        </RightMenu>\n      </InnerNav>\n    </Nav>\n  );\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/NavBar/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Nav = styled.nav`\n  width: 100%;\n  background: #0a0a0a;\n  color: #fefefe;\n  padding: .5rem;\n  box-sizing: border-box;\n`;\n\nexport const InnerNav = styled.div`\n  width: 100%;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n`;\n\nexport const LeftMenu = styled.div`\n  margin-right: 1rem;\n  margin-left: 1rem;\n`;\n\nexport const RightMenu = styled.div`\n  max-width: 400px;\n  margin-right: 1rem;\n`;\n\nexport const Menu = styled.ul`\n  margin: 0;\n  list-style-type: none;\n`;\n\nexport const MenuItem = styled.li`\n  display: table-cell;\n  vertical-align: middle;\n  a {\n    color: #fff;\n    display: block;\n    padding: .7rem 1rem;\n    line-height: 1;\n  }\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/NavBar/types.ts",
    "content": "import * as React from 'react';\nimport NavBar from './';\n\ninterface Navlink { url: string; text: string; }\nexport interface NavBarProps extends React.Props<typeof NavBar> {\n  logoText: string;\n  links: Navlink[];\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/Pic/index.tsx",
    "content": "import styled from 'styled-components';\nimport {PicStyle} from './styles';\n\nexport interface PicProps {\n  url?: string;\n}\n\nexport const Pic = styled.div`\n  ${PicStyle}\n`;\n\nexport default Pic;\n"
  },
  {
    "path": "packages/docs/src/client/components/Pic/styles.ts",
    "content": "import { css } from 'styled-components';\nimport {PicProps} from './index';\n\nexport const PicStyle = css`\n  height: 2.25rem;\n  width: 2.25rem;\n  border-radius: 50%;\n  background-size: contain;\n  background-image: url(${(props: PicProps) => props.url});\n`;\n"
  },
  {
    "path": "packages/docs/src/client/components/Pic/types.ts",
    "content": "export * from './index';\n"
  },
  {
    "path": "packages/docs/src/client/components/Post/index.tsx",
    "content": "import * as React from 'react';\nimport { Markdown, Image, Headline, Article, Box } from 'openui';\nimport { Comment, AddComment } from 'components';\nimport { PostProps } from './types';\n\nexport default function Post({\n  content,\n  title,\n  image,\n  comments,\n  comment,\n}: PostProps): JSX.Element {\n  return (\n    <Article\n      pad=\"medium\"\n      backgroundColor=\"#fff\"\n      alignItems=\"center\"\n      margin={{ vertical: 'medium' }}\n      boxSize={{ horizontal: 'xxlarge' }}\n    >\n      <Box pad=\"medium\" alignItems=\"center\">\n        <Image alt={title} imageSize=\"large\" src={image} />\n        <Headline>\n          {title}\n        </Headline>\n        <Markdown content={content} />\n        <h1>Comments</h1>\n        <AddComment\n          {...comment}\n        />\n        {comments && comments.map((item, i) =>\n          <Comment key={i} {...item} />,\n        )}\n      </Box>\n    </Article>\n  );\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/Post/types.ts",
    "content": "interface PostComment {\n  body: string;\n  author: string;\n}\n\nexport interface PostProps {\n  content: string;\n  image: string;\n  title: string;\n  comments?: PostComment[];\n  comment: {\n    input: string;\n    onSubmit: React.EventHandler<React.MouseEvent<HTMLLIElement>>;\n    onChange: React.EventHandler<React.FormEvent<HTMLTextAreaElement>>;\n    onKeyUp: React.EventHandler<React.KeyboardEvent<HTMLTextAreaElement>>;\n  }\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/PostCard/index.tsx",
    "content": "import * as React from 'react';\nimport { Link } from 'react-router';\nimport shortenText from './shortenText';\nimport {\n  Icon,\n  Card,\n  CardFooter,\n  CardThumbnail,\n  CardHeading,\n  CardDescription,\n  Anchor,\n  CardContents,\n} from './styles';\nimport { PostCardProps } from './types';\n\nexport default function PostCard({\n  content,\n  image,\n  title,\n  id,\n}: PostCardProps): JSX.Element {\n  return (\n    <Card>\n      <CardThumbnail image={image} />\n      <CardContents>\n        <CardHeading>\n          {title}\n        </CardHeading>\n        <CardDescription>\n          {shortenText(content, 150)}\n        </CardDescription>\n        <CardFooter>\n          <Link to={`/blog/posts/${id}`}>\n            <Icon>\n              <path fill=\"none\" d=\"M2,12 L22,12 M13,3 L22,12 L13,21\" />\n            </Icon>\n            <Anchor>Read More</Anchor>\n          </Link>\n        </CardFooter>\n      </CardContents>\n    </Card>\n  );\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/PostCard/shortenText.ts",
    "content": "export default function shortenText(text: string, maxLength: number) {\n  if (text.length > maxLength) {\n    return `${text.substr(0, maxLength - 3)}...`;\n  }\n  return text;\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/PostCard/styles.ts",
    "content": "import styled from 'styled-components';\nimport { SvgIcon } from 'openui';\n\nexport interface CardThumbnailProps {\n  image: string;\n}\n\nexport const Card = styled.div`\n  width: 384px;\n  flex-direction: column;\n  display: flex;\n  flex-wrap: wrap;\n  padding: 0px;\n  background-color: white;\n`;\n\nexport const CardThumbnail = styled.div`\n  background: url('${(props: CardThumbnailProps) => props.image}') center center / cover no-repeat;\n  min-height: 192px;\n  align-items: center;\n  justify-content: center;\n`;\n\nexport const CardContents = styled.div`\n  padding: 24px;\n`;\n\nexport const CardHeading = styled.h2`\n  font-size: 2.25rem;\n  font-weight: 700;\n  margin-bottom: 12px;\n  line-height: 1.23;\n`;\n\nexport const CardDescription = styled.p`\n  color: #333;\n  font-size: 24px;\n  line-height: 1.167;\n  margin-top: 24px;\n  margin-bottom: 24px;\n`;\n\nexport const Icon = styled(SvgIcon)`\n  vertical-align: middle;\n  margin-right: 12px;\n  transition: all .3s ease-in-out;\n  display: inline-block;\n  width: 24px;\n  height: 24px;\n  fill: #007acc;\n  stroke: #007acc;\n  flex: 0 0 auto;\n  stroke-width: 2;\n  &:hover {\n    transform: translate(4px, 0px);\n  }\n`;\n\nexport const Anchor = styled.a`\n  color: #007acc;\n  font-size: 1.1875rem;\n  line-height: 24px;\n  font-weight: 600;\n`;\n\nexport const CardFooter = styled.footer``;\n"
  },
  {
    "path": "packages/docs/src/client/components/PostCard/types.ts",
    "content": "export interface PostCardProps {\n  content: string;\n  id: string;\n  image: string;\n  title: string;\n}\n"
  },
  {
    "path": "packages/docs/src/client/components/index.ts",
    "content": "/* GENERATOR-IMPORT */\nimport PostCard from './PostCard';\nimport AddComment from './AddComment';\nimport Comment from './Comment';\nimport Post from './Post';\nimport NavBar from './NavBar';\nimport Pic from './Pic';\n\nexport {\n  /* GENERATOR-EXPORT */\n  PostCard,\n  AddComment,\n  Comment,\n  Post,\n  NavBar,\n  Pic,\n};\n"
  },
  {
    "path": "packages/docs/src/client/components/utils/index.ts",
    "content": "import remStringFromPx from './remStringFromPx';\n\nexport default remStringFromPx;\n"
  },
  {
    "path": "packages/docs/src/client/components/utils/remStringFromPx.ts",
    "content": "type Px = number;\ntype Rem = number;\n\nconst rootRem: number = 16;\nconst calculateRem = (px: Px): Rem => (px / rootRem);\nexport default (px: Px): string => `${calculateRem(px)}rem`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/About/about.ts",
    "content": "// tslint:disable\nexport default {\n  githubLogo: 'https://github.com/RyanCCollins/cdn/blob/master/misc/github-512.png?raw=true',\n  aboutContent: `\n# Scalable React TypeScript Boilerplate\n\nThe boilerplate aims to follow best practices for building highly scalable and reusable apps and component libraries with React and cutting edge TypeScript.\n\nThis project was inspired by the Scalable React Boilerplate project and inherits the same organizational strategy and general best-practices.\n\nYou can read more about the organizational strategy used in this app in [this Medium post](https://medium.com/front-end-hacking/the-secret-to-organization-in-functional-programming-913484e85fc9#.6htl4s54y).\n`,\n\naboutRyan: `Hi, I'm Ryan. I’m a software engineer working on building the web one component at a time.  I am a UI / UX Engineer on the Grommet UX team, building the world's most advanced UX framework. I'm also an avid functional programmer and a student of Deep Learning / AI.`,\n\naboutAbhi: `I am a Full Stack Engineer focussing on newest front-end and scalable back-end technologies. My keen area of interests are React, Redux, GraphQL, Google App Engine, Flask, Python and NodeJS to name a few.`,\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/About/contributors.ts",
    "content": "import bio from './about';\n\ninterface Contributor {\n  name: string;\n  avatar: string;\n  github: string;\n  bio: string;\n};\n\nconst contributors: Contributor[] = [\n  {\n    name: 'Ryan Collins',\n    avatar: 'https://avatars0.githubusercontent.com/u/13810084?v=3&s=460',\n    github: 'https://github.com/RyanCCollins',\n    bio:  `${bio.aboutRyan}`,\n  },\n  {\n    name: 'Abhishek Ghosh',\n    avatar: 'https://raw.githubusercontent.com/ghoshabhi/cdn/master/profile_ag.jpg',\n    github: 'https://github.com/ghoshabhi',\n    bio: `${bio.aboutAbhi}`,\n  },\n];\n\nexport default contributors;\n"
  },
  {
    "path": "packages/docs/src/client/containers/About/index.tsx",
    "content": "import * as React from 'react';\nimport {\n  Avatar,\n  Anchor,\n  Article,\n  Image,\n  Markdown,\n  Heading,\n  Headline,\n} from 'openui';\nimport {\n  Container,\n  AboutSection,\n  AboutSectionInner,\n  StyledHr,\n  AvatarContainer,\n  Content,\n  Card,\n  CardFooter,\n  Transform,\n} from './styles';\nimport about from './about';\nimport contributors from './contributors';\n\nclass About extends React.Component<undefined, undefined> {\n  public render() {\n    return (\n      <Container>\n        <AboutSection id=\"about-section-1\">\n          <Headline fontWeight={700}>\n            About\n            <StyledHr />\n          </Headline>\n          <AboutSectionInner>\n            <Article\n              pad=\"large\"\n              backgroundColor=\"#fff\"\n              margin={{ vertical: 'medium' }}\n              boxSize={{ horizontal: 'xxlarge' }}\n              content={`${about.aboutContent}`}\n            />\n          </AboutSectionInner>\n        </AboutSection>\n        <AboutSection id=\"about-section-two\" padBottom>\n          <Headline fontWeight={700}>\n            Team Members\n            <StyledHr/>\n          </Headline>\n          <AboutSectionInner>\n            {contributors.map((contributor, index) =>\n              <Card key={index}>\n                <AvatarContainer>\n                  <Transform>\n                    <Avatar\n                      name={contributor.name}\n                      src={contributor.avatar}\n                    />\n                  </Transform>\n                  <Content>\n                    <Heading textAlign=\"center\">\n                      {contributor.name}\n                    </Heading>\n                    <Markdown content={contributor.bio} />\n                  </Content>\n                  <CardFooter>\n                    <Anchor href={contributor.github}>\n                      <Image alt=\"github logo\" src={about.githubLogo} imageSize=\"small\"/>\n                    </Anchor>\n                  </CardFooter>\n                </AvatarContainer>\n              </Card>,\n            )}\n          </AboutSectionInner>\n        </AboutSection>\n      </Container>\n    );\n  }\n}\n\nexport default About;\n"
  },
  {
    "path": "packages/docs/src/client/containers/About/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Container = styled.div`\n  min-height: calc(100vh - 54px);\n  width: 100vw;\n`;\n\ninterface AboutSectionProps {\n  padBottom?: boolean\n}\n\nexport const AboutSection = styled.section`\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  background-color: #f5f5f5;\n  padding-bottom: ${(props: AboutSectionProps) => props.padBottom ? 100 : 0}px;\n`;\n\ninterface AboutSectionInnerProps {\n  reverse?: boolean\n}\nexport const AboutSectionInner = styled.div`\n  padding: 30px 60px;\n  display: flex;\n  margin-top: 60px;\n  flex-direction: row;\n  @media screen and (max-width: 768px) {\n    flex-wrap: ${(props: AboutSectionInnerProps) => props.reverse ? 'wrap-reverse' : 'wrap'};\n    padding: 60px 20px;\n    margin-top: 0px;\n  }\n`;\n\nexport const Card = styled.div`\n  display: flex;\n  margin-bottom: 2rem;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  margin-right: 2.19492%;\n  width: 28.5rem !important;\n  box-sizing: border-box;\n  background: whitesmoke;\n  height: 36rem;\n  border: 1px solid #dbe2e8;\n  box-shadow: 12px 15px 20px 0px rgba(46,61,73,0.15);\n  border-radius: 6px;\n  transition: box-shadow 0.3s ease, border 0.3s ease;\n  &:hover {\n    box-shadow: 2px 4px 8px 0px rgba(46,61,73,0.2);\n  }\n  @media screen and (max-width: 768px) {\n    margin-top: 100px;\n    margin-left: 1.69492%;\n    width: 100vw !important;\n  }\n`;\n\nexport const StyledHr = styled.hr`\n  border-top: 4px solid;\n`;\n\nexport const Transform = styled.div`\n  transform: translate(0px, -75px);\n  position: absolute;\n`;\n\nexport const AvatarContainer = styled.div`\n  width: 100%;\n  align-items: center;\n  display: flex;\n  flex-direction: column;\n  flex-grow: 1;\n`;\n\nexport const Content = styled.div`\n  flex-grow: 1;\n  padding: 30px;\n  max-height: 238px;\n  margin-top: 50px;\n  box-sizing: border-box;\n  text-align: justify;\n  text-justify: inter-word;\n  p {\n    font-family: 'Roboto';\n    font-size: 21px;\n  }\n`;\n\nexport const CardFooter = styled.footer`\n  display: flex;\n  align-items: flex-end;\n  justify-content: center;\n  flex-grow: 1;\n  padding: 30px;\n`;\n\nexport const Divider = styled.div`\n  position:absolute;\n  left:50%;\n  top:10%;\n  bottom:10%;\n  border-left:1px solid black;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`DocsContainer  should render with default props 1`] = `<Connect(Feature) />`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/__tests__/actionCreators.test.ts",
    "content": "import { actionCreators } from '../actionCreators';\nimport * as types from '../constants';\n\n// Action Creator Test as a rule return very little value. Focus on tests that give more value first\n\ndescribe('App actionCreators', () => {\n\n  it('properly creates SET_MOBILE action with isMobile = true', () => {\n    expect(actionCreators.setIsMobile(true),\n    ).toEqual({\n      type: types.SET_MOBILE,\n      isMobile: true,\n    });\n  });\n\n  it('properly creates SET_MOBILE action with isMobile = false', () => {\n    expect(actionCreators.setIsMobile(false),\n    ).toEqual({\n      type: types.SET_MOBILE,\n      isMobile: false,\n    });\n  });\n\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/__tests__/index.test.tsx",
    "content": "import * as React from 'react';\nimport Container from '../';\nimport State from '../state';\nimport { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport { Store } from 'redux';\nimport { Provider } from 'react-redux';\nimport mockStore from 'test/mockstore';\n\nconst testState: State = {\n  isMobile: true,\n  logoText: 'logo',\n  navLinks: [{\n    text: 'demo',\n    url: 'www.google.com',\n  }, {\n    text: 'demo2',\n    url: 'www.gmail.com',\n  }],\n};\n\ndescribe('DocsContainer ', () => {\n  let store: Store<State>;\n  beforeEach(() => {\n    store = mockStore(testState);\n  });\n\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Provider store={store}>\n        <Container />\n      </Provider>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/__tests__/reducer.test.ts",
    "content": "import reducer from '../reducer';\nimport { actionCreators } from '../actionCreators';\nimport { initialState } from '../state';\n\ndescribe('app reducer', () => {\n  it('should return the initial state with default action', () => {\n    expect(\n      reducer(undefined, actionCreators.defaultAction()),\n    ).toEqual(initialState);\n  });\n\n  it('should handle SET_ISMOBILE with true', () => {\n    expect(\n      reducer(initialState, actionCreators.setIsMobile(true)).isMobile,\n    ).toEqual(true);\n  });\n\n  it('should handle SET_ISMOBILE with false', () => {\n    expect(\n      reducer(initialState, actionCreators.setIsMobile(false)).isMobile,\n    ).toEqual(false);\n  });\n\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/__tests__/selectors.test.ts",
    "content": "import { selectIsMobile, selectLogoText, selectNavLinks } from '../selectors';\nimport { State } from '../../../State';\n\nconst testState: State = {\n  app: {\n    isMobile: true,\n    navLinks: [{\n      text: 'demo2',\n      url: 'www.google.com',\n    }],\n    logoText: null,\n  },\n  docs: null,\n  todoApp: null,\n  blogPost: null,\n};\n\nconst testState2: State = {\n  app: {\n    isMobile: false,\n    navLinks: [{\n      text: 'demo',\n      url: 'www.gmail.com',\n    }, {\n      text: 'demo3',\n      url: 'www.rediff.com',\n    }],\n    logoText: 'demo',\n  },\n  docs: null,\n  todoApp: null,\n  blogPost: null,\n};\n\ndescribe('app selectors', () => {\n  describe('app selectIsMobile', () => {\n    it('should return true', () => {\n      expect(\n        selectIsMobile(testState))\n        .toBe(true);\n    });\n\n    it('should return false', () => {\n      expect(\n        selectIsMobile(testState2))\n        .toBe(false);\n    });\n  });\n\n  describe('app selectLogoText', () => {\n    it('should return null', () => {\n      expect(\n        selectLogoText(testState))\n        .toBe(null);\n    });\n\n    it('should return string', () => {\n      expect(\n        selectLogoText(testState2))\n        .toBe('demo');\n    });\n  });\n\n  describe('app selectNavLinks', () => {\n    it('should return count', () => {\n      expect(\n        selectNavLinks(testState).length)\n        .toBe(1);\n    });\n\n    it('should return count', () => {\n      expect(\n        selectNavLinks(testState2).length)\n        .toBe(2);\n    });\n\n    it('should return string', () => {\n      expect(\n        selectNavLinks(testState)[0])\n        .toEqual({\n          text: 'demo2',\n          url: 'www.google.com',\n        });\n    });\n\n    it('should return string', () => {\n      expect(\n        selectNavLinks(testState2)[1])\n        .toEqual({\n          text: 'demo3',\n          url: 'www.rediff.com',\n        });\n    });\n  });\n\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/actionCreators.ts",
    "content": "import * as types from './constants';\nimport { defaultAction } from 'shared/actionCreators';\nimport {\n  SetIsMobileAction,\n} from './actions';\n\nexport const setIsMobile = (isMobile: boolean): SetIsMobileAction => ({\n  type: types.SET_MOBILE,\n  isMobile,\n});\n\nexport const actionCreators = {\n  setIsMobile,\n  defaultAction,\n};\n\nexport default actionCreators;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/actions.ts",
    "content": "import { DefaultAction } from 'shared/actions';\nimport * as types from './constants';\nimport { Action } from 'redux';\n\nexport interface SetIsMobileAction extends Action {\n  type: types.SET_MOBILE_TYPE,\n  isMobile: boolean\n}\n\nexport type FeatureAction =\n  SetIsMobileAction |\n  DefaultAction;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/constants.ts",
    "content": "export type SET_MOBILE_TYPE = 'APP/SET_MOBILE';\nexport const SET_MOBILE: SET_MOBILE_TYPE = 'APP/SET_MOBILE';\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/index.tsx",
    "content": "import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { State } from '../../state';\nimport actionCreators from './actionCreators';\nimport { selectIsMobile, selectNavLinks, selectLogoText } from './selectors';\nimport Feature, { StateProps, DispatchProps } from './presentation';\nimport { FeatureAction } from './actions';\n\n// tslint:disable-next-line\ninterface OwnProps  { }; // for props that are not passed down to inner component\n\nconst mapStateToProps = (state: State): StateProps => ({\n  isMobile: selectIsMobile(state),\n  navLinks: selectNavLinks(state),\n  logoText: selectLogoText(state),\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch<FeatureAction>): DispatchProps => ({\n  actions: bindActionCreators(\n    actionCreators,\n    dispatch,\n  ),\n});\n\nconst Container: React.ComponentClass<OwnProps> = connect(\n  mapStateToProps,\n  mapDispatchToProps,\n)(Feature);\n\nexport default Container;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/presentation.tsx",
    "content": "import * as React from 'react';\nimport { NavBar } from 'components';\nimport { Box, Heading, Footer, Paragraph, SvgIcon, Anchor } from 'openui';\nimport { SetIsMobileAction } from './actions';\nimport { State } from './state';\nimport { Author, Main } from './styles';\n\nexport type StateProps = State;\n\nexport interface DispatchProps {\n  actions: {\n    setIsMobile: (isMobile: boolean) => SetIsMobileAction,\n  };\n};\n\nexport type FeatureProps = React.Props<Feature> & StateProps & DispatchProps;\n\nexport default class Feature extends React.Component<FeatureProps, undefined> {\n  constructor(props) {\n    super(props);\n  };\n\n  public componentDidMount() {\n    window.addEventListener('resize', this.handleMobile);\n  }\n\n  public componentWillUnmount() {\n    window.removeEventListener('resize', this.handleMobile);\n  }\n\n  private handleMobile = () => {\n    const isMobile = window.innerWidth <= 768;\n    if (isMobile !== this.props.isMobile) {\n      this.props.actions.setIsMobile(isMobile);\n    }\n  }\n\n  public render() {\n    const {\n      children,\n      navLinks,\n      logoText,\n    } = this.props;\n\n    return (\n      <Main>\n        <NavBar\n          links={navLinks}\n          logoText={logoText}\n        />\n        {children}\n        <Footer>\n          <Box alignItems=\"center\" >\n            <Heading>\n              React + TypeScript\n            </Heading>\n            <Paragraph margin=\"none\">\n              Scalable React TS Boilerplate\n            </Paragraph>\n          </Box>\n          <Author>\n            <span>By </span>\n            <Anchor plain color=\"#007acc\" href=\"http://www.ryancollins.io/\" > Ryan C.Collins </Anchor>\n          </Author>\n          <Box flexDirection=\"row\" alignItems=\"center\" justifyContent=\"center\" >\n            <Box margin=\"small\" >\n              <Anchor href=\"https://github.com/RyanCCollins/scalable-react-ts-boilerplate\" >\n                <SvgIcon style={{ height: 35, width: 35, fill: 'white' }} viewBox=\"0 0 1792 1792\" >\n                  <path // tslint:disable-next-line\n                    d=\"M1664 896q0 251-146.5 451.5t-378.5 277.5q-27 5-39.5-7t-12.5-30v-211q0-97-52-142 57-6 102.5-18t94-39 81-66.5 53-105 20.5-150.5q0-121-79-206 37-91-8-204-28-9-81 11t-92 44l-38 24q-93-26-192-26t-192 26q-16-11-42.5-27t-83.5-38.5-86-13.5q-44 113-7 204-79 85-79 206 0 85 20.5 150t52.5 105 80.5 67 94 39 102.5 18q-40 36-49 103-21 10-45 15t-57 5-65.5-21.5-55.5-62.5q-19-32-48.5-52t-49.5-24l-20-3q-21 0-29 4.5t-5 11.5 9 14 13 12l7 5q22 10 43.5 38t31.5 51l10 23q13 38 44 61.5t67 30 69.5 7 55.5-3.5l23-4q0 38 .5 89t.5 54q0 18-13 30t-40 7q-232-77-378.5-277.5t-146.5-451.5q0-209 103-385.5t279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z\"\n                  />\n                </SvgIcon>\n              </Anchor>\n            </Box>\n            <Box margin=\"small\" >\n              <Anchor href=\"https://scalable-react-slack.herokuapp.com/\" >\n                <SvgIcon style={{ height: 35, width: 35, fill: 'white' }} viewBox=\"0 0 256 256\" >\n                  <path // tslint:disable-next-line\n                    d=\"M165.964 15.838c-3.89-11.975-16.752-18.528-28.725-14.636-11.975 3.89-18.528 16.752-14.636 28.725l58.947 181.365c4.048 11.187 16.132 17.473 27.732 14.135 12.1-3.483 19.475-16.334 15.614-28.217L165.964 15.838\" fill=\"#DFA22F\" /><path d=\"M74.626 45.516C70.734 33.542 57.873 26.989 45.9 30.879 33.924 34.77 27.37 47.631 31.263 59.606l58.948 181.366c4.047 11.186 16.132 17.473 27.732 14.132 12.099-3.481 19.474-16.332 15.613-28.217L74.626 45.516\" fill=\"#3CB187\" /><path d=\"M240.162 166.045c11.975-3.89 18.526-16.75 14.636-28.726-3.89-11.973-16.752-18.527-28.725-14.636L44.708 181.632c-11.187 4.046-17.473 16.13-14.135 27.73 3.483 12.099 16.334 19.475 28.217 15.614l181.372-58.93\" fill=\"#CE1E5B\" /><path d=\"M82.508 217.27l43.347-14.084-14.086-43.352-43.35 14.09 14.089 43.347\" fill=\"#392538\" /><path d=\"M173.847 187.591c16.388-5.323 31.62-10.273 43.348-14.084l-14.088-43.36-43.35 14.09 14.09 43.354\" fill=\"#BB242A\" /><path d=\"M210.484 74.706c11.974-3.89 18.527-16.751 14.637-28.727-3.89-11.973-16.752-18.526-28.727-14.636L15.028 90.293C3.842 94.337-2.445 106.422.896 118.022c3.481 12.098 16.332 19.474 28.217 15.613l181.371-58.93\" fill=\"#72C5CD\" /><path d=\"M52.822 125.933c11.805-3.836 27.025-8.782 43.354-14.086-5.323-16.39-10.273-31.622-14.084-43.352l-43.36 14.092 14.09 43.346\" fill=\"#248C73\" /><path d=\"M144.16 96.256l43.356-14.088a546179.21 546179.21 0 0 0-14.089-43.36L130.07 52.9l14.09 43.356\" fill=\"#62803A\" />\n                </SvgIcon>\n              </Anchor>\n            </Box>\n          </Box>\n        </Footer>\n      </Main>\n    );\n  }\n}\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/reducer.ts",
    "content": "import { Reducer } from 'redux';\nimport * as types from './constants';\nimport { FeatureAction } from './actions';\nimport { defaultAction } from 'shared/actionCreators';\nimport { State, initialState } from './state';\n\nconst reducer: Reducer<State> = (state: State = initialState, action: FeatureAction = defaultAction()) => {\n  switch (action.type) {\n  case types.SET_MOBILE:\n    return {\n      ...state,\n      isMobile: action.isMobile,\n    };\n  default:\n    return state;\n  }\n};\n\nexport default reducer;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/selectors.ts",
    "content": "import { createSelector, Selector } from 'reselect';\nimport { State } from 'state';\nimport { State as FeatureState, NavLink } from './state';\n\nconst selectFeature = () => (state: State): FeatureState  => state.app;\n\nexport const selectIsMobile: Selector<State, boolean> = createSelector(\n  selectFeature(),\n  (feature) => feature.isMobile,\n);\n\nexport const selectLogoText: Selector<State, string> = createSelector(\n  selectFeature(),\n  (feature) => feature.logoText,\n);\n\nexport const selectNavLinks: Selector<State, NavLink[]> = createSelector(\n  selectFeature(),\n  (feature) => feature.navLinks,\n);\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/state.ts",
    "content": "export interface NavLink {\n  text: string;\n  url: string;\n}\n\nexport interface State {\n  isMobile: boolean;\n  navLinks: NavLink[];\n  logoText: string;\n};\n\nexport const initialState: State = {\n  isMobile: false,\n  navLinks: [\n    {\n      text: 'Docs',\n      url: '/docs',\n    },\n    {\n      text: 'About',\n      url: '/about',\n    },\n    {\n      text: 'Blog',\n      url: '/blog',\n    },\n  ],\n  logoText: 'React + TypeScript',\n};\n\nexport default State;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Author = styled.div`\n  color: white;\n  padding: 10px;\n`;\n\nexport const Main = styled.main`\n  max-width: 100vw;\n  box-sizing: border-box;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/App/types.ts",
    "content": "import App from '../';\n\nexport interface NavLink { url: string; text: string; };\n\nexport interface Props extends React.Props<typeof App> {\n  children: JSX.Element;\n  actions: {\n    appSetMobile: (isMobile: boolean) => void,\n  };\n  isMobile: boolean;\n  navLinks: NavLink[];\n  logoText: string;\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/Blog/index.tsx",
    "content": "import * as React from 'react';\nimport { graphql } from 'react-apollo';\nimport { Box, Headline, Section, LoadingIndicator, Notification } from 'openui';\nimport { PostCard } from 'components';\nimport POST_QUERY from './posts.graphql';\nimport Hr from './styles';\nimport { Props, State } from './types';\n\nclass Blog extends React.Component<Props, State> {\n  constructor() {\n    super();\n    this.handleClearError = this.handleClearError.bind(this);\n    this.state = {\n      showError: true,\n    };\n  }\n  private handleClearError() {\n    this.setState({\n      showError: false,\n    });\n  }\n  public render() {\n    const { loading, posts, error } = this.props;\n    const { showError } = this.state;\n    return (\n      <Box\n        alignItems=\"center\"\n        flexDirection=\"column\"\n        pad={{ vertical: 'medium', horizontal: 'small' }}\n        full={{ vertical: true }}\n        backgroundColor=\"#f5f5f5\"\n      >\n        <Headline fontWeight={700}>\n          Blog\n          <Hr />\n        </Headline>\n        {error && showError &&\n          <Notification\n            status=\"error\"\n            onClick={this.handleClearError}\n            message={error.message}\n          />\n        }\n        <LoadingIndicator isLoading={loading} />\n        <Section\n          flexWrap\n          justifyContent=\"center\"\n          alignItems=\"center\"\n          flexDirection=\"row\"\n          boxSize={{ horizontal: 'full' }}\n        >\n          {posts && posts.map((item, i) =>\n            <Box key={i} pad=\"medium\">\n              <PostCard\n                {...item}\n              />\n            </Box>,\n          )}\n        </Section>\n      </Box>\n    );\n  }\n}\n\nconst withData = graphql(POST_QUERY, {\n  props: ({ data: { loading, posts, error } }) => ({\n    loading,\n    posts,\n    error,\n  }),\n});\n\nexport default withData(Blog);\n"
  },
  {
    "path": "packages/docs/src/client/containers/Blog/posts.graphql.ts",
    "content": "import gql from 'graphql-tag';\n\nexport default gql`\n  query Posts {\n    posts {\n      id: _id\n      title\n      image\n      content\n    }\n  }\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Blog/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport default styled.hr`\n  border-top: 4px solid;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Blog/types.ts",
    "content": "import Blog from '../';\n\nexport interface Post {\n  id: string;\n  title: string;\n  image: string;\n  content: string;\n}\n\nexport interface Props extends React.Props<typeof Blog> {\n  loading: boolean;\n  error?: { message: string };\n  posts?: Post[];\n}\n\nexport interface State {\n  showError: boolean;\n}\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/__mocks__/blogPostPresentation.mock.ts",
    "content": "export default {\n  post: {\n    id: '58a0ccb112b4c56440f5d6a7',\n    title: 'Welcome!',\n    image: 'https://raw.githubusercontent.com/RyanCCollins/cdn/master/stsb-images/ts-resized-2.png',\n    content: 'Hey there!  Welcome to the blog of Scalable-React-TypeScript! '\n      + 'This is just an introductory post, but stay tuned for more!',\n    comments: [\n      {\n        body: 'This is the first comment!',\n        author: 'Admin User',\n      },\n    ],\n  },\n  error: { message: 'oops' },\n  input: 'foo',\n  loading: false,\n  onChange: jest.fn(),\n  onSubmit: jest.fn(),\n  onKeyUp: jest.fn(),\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/__mocks__/blogPostSelectors.mock.ts",
    "content": "export default {\n  blogPost: {\n    input: 'Money',\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<BlogPost /> container should render as expected 1`] = `\n<Provider\n  store={\n    Object {\n      \"clearActions\": [Function],\n      \"dispatch\": [Function],\n      \"getActions\": [Function],\n      \"getState\": [Function],\n      \"replaceReducer\": [Function],\n      \"subscribe\": [Function],\n    }\n  }\n>\n  <Connect(_class) />\n</Provider>\n`;\n\nexports[`<BlogPostPresentation /> should render as expected 1`] = `\n<Section\n  alignItems=\"center\"\n  backgroundColor=\"#f5f5f5\"\n  flexDirection=\"column\"\n  full={\n    Object {\n      \"vertical\": true,\n    }\n  }\n  pad={\n    Object {\n      \"horizontal\": \"small\",\n      \"vertical\": \"large\",\n    }\n  }\n>\n  <Notification\n    message=\"oops\"\n    status=\"error\"\n  />\n  <LoadingIndicator\n    isLoading={false}\n  />\n  <undefined\n    comment={\n      Object {\n        \"input\": \"foo\",\n        \"onChange\": [Function],\n        \"onKeyUp\": [Function],\n        \"onSubmit\": [Function],\n      }\n    }\n    comments={\n      Array [\n        Object {\n          \"author\": \"Admin User\",\n          \"body\": \"This is the first comment!\",\n        },\n      ]\n    }\n    content=\"Hey there!  Welcome to the blog of Scalable-React-TypeScript! This is just an introductory post, but stay tuned for more!\"\n    id=\"58a0ccb112b4c56440f5d6a7\"\n    image=\"https://raw.githubusercontent.com/RyanCCollins/cdn/master/stsb-images/ts-resized-2.png\"\n    title=\"Welcome!\"\n  />\n</Section>\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/actionCreators.test.ts",
    "content": "import * as T from '../constants';\nimport actionCreators from '../actionCreators';\n\ndescribe('blogPost actionCreators', () => {\n  it('should have a type of INPUT', () => {\n    const input = 'bar';\n    const expected = { type: T.INPUT, input };\n    expect(actionCreators.input(input)).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/index.test.tsx",
    "content": "import MockProvider, { getMockStore } from 'redux-mock-provider';\nimport { shallowToJson } from 'enzyme-to-json';\nimport { shallow } from 'enzyme';\nimport * as React from 'react';\nimport { initialState } from '../state';\nimport BlogPost from '../';\nimport BlogPostPresentation from '../presentation';\nimport props from './__mocks__/blogPostPresentation.mock';\nimport colors from '../../../theming';\n\nconst store = getMockStore({\n  key: 'blogPost',\n  state: initialState,\n});\n\ndescribe('<BlogPost /> container', () => {\n  it('should render as expected', () => {\n    const wrapper = shallow(\n      <MockProvider store={store}>\n        <BlogPost />\n      </MockProvider>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n\ndescribe('<BlogPostPresentation />', () => {\n  it('should render as expected', () => {\n    const wrapper = shallow(\n      <BlogPostPresentation {...props} theme={colors} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/reducer.test.ts",
    "content": "import reducer from '../reducer';\nimport actionCreators from '../actionCreators';\nimport { initialState } from '../state';\n\ndescribe('blogPost reducer', () => {\n  it('should handle reducer for INPUT', () => {\n    const input = 'foo';\n    const stateBefore = initialState;\n    const stateAfter = {\n      ...initialState,\n      input,\n    };\n    expect(\n      reducer(stateBefore, actionCreators.input(input)),\n    ).toEqual(stateAfter);\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/__tests__/selectors.test.ts",
    "content": "import state from './__mocks__/blogPostSelectors.mock';\nimport { initialState as globalState } from '../../../state';\nimport { selectInput } from '../selectors';\n\nlet mockState;\ndescribe('blogPost selectors', () => {\n  beforeEach(() => {\n    mockState = {\n      ...globalState,\n      blogPost: state.blogPost,\n    };\n  });\n  describe('select input', () => {\n    it('should select an empty string', () => {\n      expect(\n        selectInput(globalState),\n      ).toEqual('');\n    });\n    it('should select input', () => {\n      expect(\n        selectInput(mockState),\n      ).toEqual(state.blogPost.input);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/actionCreators.ts",
    "content": "import { ActionCreator, ActionCreatorsMapObject } from 'redux';\nimport { Input } from './types';\nimport * as types from './constants';\nimport {\n  InputAction,\n} from './actions';\n\ntype InputActionCreator = ActionCreator<InputAction>;\nexport const input: InputActionCreator = (input: Input) => ({\n  type: types.INPUT,\n  input,\n});\n\nexport interface ActionCreatorTypes extends ActionCreatorsMapObject {\n  input: InputActionCreator;\n}\nexport const actionCreators: ActionCreatorTypes = {\n  input,\n};\n\nexport default actionCreators;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/actions.ts",
    "content": "import { Action } from 'redux';\nimport { Input } from './types';\nimport * as T from './constants';\n\nexport interface InputAction extends Action {\n  type: T.INPUT_TYPE;\n  input: Input;\n}\n\nexport type ActionTypes = InputAction;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/apollo.ts",
    "content": "import { graphql } from 'react-apollo';\nimport BlogPost from './';\nimport PostQuery from './postQuery.graphql';\nimport CommentMutation from './commentMutation.graphql';\n\nexport const withData = graphql(PostQuery, {\n  skip: ({ params }) => !params || (params && !params.postId),\n  options: ({ params }) => ({\n    variables: {\n      id: params.postId,\n    },\n  }),\n  props: ({ data: { loading, post, error, refetch } }) => ({\n    loading,\n    post,\n    error,\n    refetch,\n  }),\n});\n\nexport const withMutation = graphql(CommentMutation, {\n  props: ({ mutate }) => ({\n    submitComment: mutate,\n  }),\n});\n\nconst withApollo = (component: typeof BlogPost): typeof BlogPost =>\n  withData(withMutation(component));\n\nexport default withApollo;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/commentMutation.graphql.ts",
    "content": "import gql from 'graphql-tag';\n\nexport default gql`\n  mutation CreateComment($post: ID!, $body: String, $author: String) {\n    createComment(data:{ post: $post, body: $body, author: $author })\n  }\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/constants.ts",
    "content": "export type INPUT_TYPE = 'BLOG_POST/INPUT';\nexport const INPUT: INPUT_TYPE = 'BLOG_POST/INPUT';\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/index.tsx",
    "content": "import * as React from 'react';\nimport { Dispatch, bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { FormControlEventTarget } from '../../types';\nimport BlogPresentation from './presentation';\nimport { ThemeColorMap } from '../../types';\nimport { Props, ActionCreatorTypes, ActionTypes, Input, ErrorType, Post, SubmitComment } from './types';\nimport { State } from '../../state';\nimport { selectInput } from './selectors';\nimport actionCreators from './actionCreators';\nimport withApollo from './apollo';\nimport { withTheme } from 'styled-components';\n\ntype MapStateToProps = (state: State) => StateProps;\nconst mapStateToProps: MapStateToProps = (state) => ({\n  input: selectInput(state),\n});\n\ntype MapDispatch = (dispatch: Dispatch<ActionTypes>) => DispatchProps;\nconst mapDispatchToProps: MapDispatch = (dispatch) => ({\n  actions: bindActionCreators(\n    actionCreators,\n    dispatch,\n  ),\n});\n\nexport interface Props {\n  loading: boolean;\n  error?: ErrorType;\n  post?: Post;\n  theme: ThemeColorMap;\n  submitComment?: SubmitComment;\n  refetch: () => void;\n  params: {\n    postId: String;\n  };\n}\n\nexport interface StateProps {\n  input: Input,\n}\nexport interface DispatchProps {\n  actions: ActionCreatorTypes;\n}\nexport type PropTypes = StateProps & DispatchProps & Props;\nclass BlogPost extends React.Component<PropTypes, undefined> {\n  constructor() {\n    super();\n    this.handleAddingComment = this.handleAddingComment.bind(this);\n    this.handleInput = this.handleInput.bind(this);\n    this.handleEnterKeyUp = this.handleEnterKeyUp.bind(this);\n  }\n  private handleInput(e: React.SyntheticEvent<undefined>) {\n    e.preventDefault();\n    const input = (e.target as FormControlEventTarget).value;\n    this.props.actions.input(input);\n  }\n  private handleAddingComment() {\n    const { input } = this.props;\n    const author = 'Unknown';\n    const { postId } = this.props.params;\n    const variables = {\n      post: postId as string,\n      author,\n      body: input,\n    };\n    this.props.submitComment({ variables }).then(() => {\n      this.props.refetch();\n      this.props.actions.input('');\n    });\n  }\n  private handleEnterKeyUp(e: React.KeyboardEvent<undefined>) {\n    if (e.keyCode === 13) {\n      e.preventDefault();\n      this.handleAddingComment();\n    }\n  }\n  public render() {\n    return (\n      <BlogPresentation\n        onChange={this.handleInput}\n        onSubmit={this.handleAddingComment}\n        onKeyUp={this.handleEnterKeyUp}\n        {...this.props}\n      />\n    );\n  }\n}\n\nconst ComponentWithData = withApollo(BlogPost);\nconst ComponentWithTheme = withTheme(ComponentWithData as typeof BlogPost);\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps,\n)(ComponentWithTheme);\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/postQuery.graphql.ts",
    "content": "import gql from 'graphql-tag';\n\nexport default gql`\n  query Post($id: ID!) {\n    post(id: $id) {\n      id: _id\n      title\n      image\n      content\n      comments {\n        body\n        author\n      }\n    }\n  }\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/presentation.tsx",
    "content": "import * as React from 'react';\nimport { Post } from 'components';\nimport { LoadingIndicator, Section, Notification } from 'openui';\nimport { ErrorType, Post as PostType, OnInput, OnSubmit, OnKeyUp } from './types';\nimport { ThemeColorMap } from '../../types';\n\nexport interface Props {\n  onChange: OnInput;\n  onSubmit: OnSubmit;\n  onKeyUp: OnKeyUp;\n  loading: boolean;\n  post: PostType;\n  error: ErrorType;\n  input: string;\n  theme: ThemeColorMap;\n}\nexport default class BlogPostPresentation extends React.Component<Props, undefined> {\n  public render() {\n    const { loading, post, error, theme, ...rest } = this.props;\n    return (\n      <Section\n        alignItems=\"center\"\n        flexDirection=\"column\"\n        pad={{ vertical: 'large', horizontal: 'small' }}\n        full={{ vertical: true }}\n        backgroundColor={theme.offwhite}\n      >\n        {error && <Notification status=\"error\" message={error.message} />}\n        <LoadingIndicator isLoading={loading} />\n        {post &&\n          <Post\n            comment={{...rest}}\n            {...post}\n          />\n        }\n      </Section>\n    );\n  }\n}\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/reducer.ts",
    "content": "import { Reducer } from 'redux';\nimport * as T from './constants';\nimport { ActionTypes } from './actions';\nimport { State, initialState } from './state';\n\nconst reducer: Reducer<State> = (state: State = initialState, action: ActionTypes) => {\n  switch (action.type) {\n  case T.INPUT:\n    return {\n      ...state,\n      input: action.input,\n    };\n  default:\n    return state;\n  }\n};\n\nexport default reducer;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/selectors.ts",
    "content": "import { createSelector, Selector } from 'reselect';\nimport { State } from '../../state';\nimport { State as BlogPostState } from './types';\n\nconst selectBlogPost = () => (state: State): BlogPostState  => state.blogPost;\n\nexport const selectInput: Selector<State, string> = createSelector(\n  selectBlogPost(),\n  (blogPost) => blogPost.input,\n);\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/state.ts",
    "content": "import { Input } from './types';\n\nexport interface State {\n  input?: Input;\n}\n\nexport const initialState: State = {\n  input: '',\n};\n\nexport default State;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const StyledHr = styled.hr`\n  border-top: 4px solid;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/BlogPost/types.ts",
    "content": "import * as React from 'react';\nimport { Props } from './';\nimport { Props as PresentationProps } from './presentation';\nimport { State } from './state';\nimport { ActionCreatorTypes } from './actionCreators';\nimport { ActionTypes } from './actions';\n\nexport { Props, PresentationProps, State, ActionCreatorTypes, ActionTypes };\n\nexport type OnInput = (e: React.SyntheticEvent<undefined>) => void;\nexport type OnSubmit = () => void;\nexport type OnKeyUp = (e: React.KeyboardEvent<undefined>) => void;\n\nexport interface PostComment {\n  body: string;\n  author: string;\n}\n\nexport interface Post {\n  id: string;\n  title: string;\n  image: string;\n  content: string;\n  comments: PostComment[];\n}\n\nexport interface ErrorType { message: string; }\n\nexport type Input = string;\n\nexport type Body = string;\nexport type Author = string;\nexport type PostId = string;\nexport interface PostSubmission {\n  variables: {\n    body: Body;\n    author: Author;\n    post: PostId;\n  }\n};\n\nexport type SubmitComment = (post: PostSubmission) => Promise<undefined>;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/__mocks__/docsMocks.mock.ts",
    "content": "export default {\n  pad: 'medium',\n  size: 'large',\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`DocsContainer  should render with default props 1`] = `<Connect(Feature) />`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/actionCreators.test.ts",
    "content": "import * as types from '../constants';\nimport { actionCreators } from '../actionCreators';\n\n// Action Creator Test as a rule return very little value. Focus on tests that give more value first\n\ndescribe('docs actionCreators', () => {\n\n  it('properly creates LOAD_INTIATION action', () => {\n    expect(actionCreators.loadInitiation(),\n    ).toEqual({\n      type: types.LOAD_INITIATION,\n    });\n  });\n\n  it('properly creates LOAD_SUCCESS action', () => {\n    const testData: string = 'test string';\n    expect(actionCreators.loadSuccess(testData),\n    ).toEqual({\n      type: types.LOAD_SUCCESS,\n      payload: testData,\n    });\n  });\n\n  it('properly creates LOAD_INTIATION action', () => {\n    expect(actionCreators.loadCancel(),\n    ).toEqual({\n      type: types.LOAD_CANCEL,\n    });\n  });\n\n  it('properly creates LOAD_SUCCESS action', () => {\n    const testMessage: string = 'test error Message';\n    expect(actionCreators.loadFailure(testMessage),\n    ).toEqual({\n      type: types.LOAD_FAILURE,\n      error: testMessage,\n    });\n\n    it('properly creates LOAD_SUCCESS action', () => {\n      expect(actionCreators.clearError(),\n      ).toEqual({\n        type: types.CLEAR_ERROR,\n      });\n    });\n\n  });\n\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/index.test.tsx",
    "content": "import * as React from 'react';\nimport { Provider } from 'react-redux';\nimport { Store } from 'redux';\nimport { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport DocsContainer from '../';\nimport State from '../state';\n\nimport mockStore from '../../../test/mockstore';\n\nconst testState: State = {\n  error: null,\n  isLoading: false,\n  markdownContent: '',\n};\n\ndescribe('DocsContainer ', () => {\n  let store: Store<State>;\n  beforeEach(() => {\n    store = mockStore(testState);\n  });\n\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Provider store={store}>\n        <DocsContainer/>\n      </Provider>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/logic.test.ts",
    "content": "import { createMockStore } from 'redux-logic-test';\nimport * as actionTypes from '../constants';\nimport rootLogic from '../logic';\n\nconst dependencies = {\n  httpClient: { // simulate an async fetch\n    get(url) { return Promise.resolve({ data: 'testData' }); },\n  },\n};\n\ndescribe('rootLogic tests', () => {\n  describe('rootLogic test without reducers', () => {\n    let store;\n    beforeEach(() => {\n      store = createMockStore({\n        logic: rootLogic,\n        injectedDeps: dependencies,\n      });\n    });\n\n    it('should do something', (done) => {\n      store.dispatch({ type: actionTypes.LOAD_INITIATION });\n      store.whenComplete(() => {\n        expect(store.actions).toEqual([\n          { type: actionTypes.LOAD_INITIATION },\n          { type: actionTypes.LOAD_SUCCESS, payload: 'testData' },\n        ]);\n        done();\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/reducer.test.ts",
    "content": "import reducer from '../reducer';\nimport { actionCreators } from '../actionCreators';\nimport { initialState } from '../state';\n\ndescribe('docs reducer', () => {\n  it('should return the initial state with default action', () => {\n    expect(\n      reducer(undefined, actionCreators.defaultAction()),\n    ).toEqual(initialState);\n  });\n\n  it('should handle LOAD_INTIATION', () => {\n    expect(\n      reducer(initialState, actionCreators.loadInitiation()).isLoading,\n    ).toEqual(true);\n  });\n\n  it('should handle LOAD_SUCCESS', () => {\n    const testData: string = 'test string';\n    expect(\n      reducer(initialState, actionCreators.loadSuccess(testData)).markdownContent,\n    ).toEqual(testData);\n  });\n\n  it('should handle LOAD_FAILURE', () => {\n    const testMessage: string = 'test error message';\n    expect(\n      reducer(initialState, actionCreators.loadFailure(testMessage)).error,\n    ).toEqual(testMessage);\n  });\n\n  it('should handle LOAD_CANCEL', () => {\n    expect(\n      reducer(initialState, actionCreators.loadCancel()).isLoading,\n    ).toEqual(false);\n  });\n\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/__tests__/selectors.test.ts",
    "content": "import { selectIsLoading, selectError } from '../selectors';\nimport { State } from '../../../State';\n\nconst testError: string = 'some error';\nconst testMarkDown: string = '#Test Markdown';\n\nconst testState: State = {\n  app: {},\n  todoApp: null,\n  blogPost: null,\n  docs: {\n    error: null,\n    isLoading: false,\n    markdownContent: null,\n  },\n};\n\nconst testState2: State = {\n  app: {},\n  todoApp: null,\n  blogPost: null,\n  docs: {\n    error: testError,\n    isLoading: true,\n    markdownContent: testMarkDown,\n  },\n};\n\ndescribe('docs selectors', () => {\n  describe('docs selectIsLoading', () => {\n    it('should return false', () => {\n      expect(\n        selectIsLoading(testState))\n        .toBe(false);\n    });\n\n    it('should return true', () => {\n      expect(\n        selectIsLoading(testState2))\n        .toBe(true);\n    });\n  });\n\n  describe('docs selectError', () => {\n    it('should return null', () => {\n      expect(\n        selectError(testState))\n        .toBe(null);\n    });\n\n    it('should return string', () => {\n      expect(\n        selectIsLoading(testState2))\n        .toBe(true);\n    });\n  });\n\n  describe('docs selectMarkdownContent', () => {\n    it('should return null', () => {\n      expect(\n        selectError(testState))\n        .toBe(null);\n    });\n\n    it('should return string', () => {\n      expect(\n        selectIsLoading(testState2))\n        .toBe(true);\n    });\n  });\n\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/actionCreators.ts",
    "content": "import * as types from './constants';\nimport { defaultAction } from 'shared/actionCreators';\nimport {\n  LoadInitiationAction,\n  LoadSuccessAction,\n  LoadFailureAction,\n  LoadCancelAction,\n  ClearErrorAction,\n} from './actions';\n\nexport const loadInitiation = (): LoadInitiationAction => ({\n  type: types.LOAD_INITIATION,\n});\n\nexport const loadSuccess = (data: string): LoadSuccessAction => ({\n  type: types.LOAD_SUCCESS,\n  payload: data,\n});\n\nexport const loadFailure = (error: string): LoadFailureAction => ({\n  type: types.LOAD_FAILURE,\n  error,\n});\n\nexport const loadCancel = (): LoadCancelAction => ({\n  type: types.LOAD_CANCEL,\n});\n\nexport const clearError = (): ClearErrorAction => ({\n  type: types.CLEAR_ERROR,\n});\n\nexport const actionCreators = {\n  loadInitiation,\n  loadSuccess,\n  loadFailure,\n  loadCancel,\n  clearError,\n  defaultAction,\n};\n\nexport default actionCreators;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/actions.ts",
    "content": "import { DefaultAction } from 'shared/actions';\nimport * as types from './constants';\nimport { Action } from 'redux';\n\nexport interface LoadInitiationAction extends Action {\n  type: types.LOAD_INITIATION_TYPE;\n}\n\nexport interface LoadSuccessAction extends Action {\n  type: types.LOAD_SUCCESS_TYPE;\n  payload: string;\n}\n\nexport interface LoadFailureAction extends Action {\n  type: types.LOAD_FAILURE_TYPE;\n  error: string;\n}\n\nexport interface LoadCancelAction extends Action {\n  type: types.LOAD_CANCEL_TYPE;\n}\n\nexport interface ClearErrorAction extends Action {\n  type: types.CLEAR_ERROR_TYPE;\n}\n\nexport type FeatureAction =\n  LoadInitiationAction |\n  LoadSuccessAction |\n  LoadFailureAction |\n  LoadCancelAction |\n  ClearErrorAction |\n  DefaultAction;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/constants.ts",
    "content": "export type LOAD_INITIATION_TYPE = 'DOCS/LOAD_INITIATION';\nexport const LOAD_INITIATION: LOAD_INITIATION_TYPE = 'DOCS/LOAD_INITIATION';\n\nexport type LOAD_SUCCESS_TYPE = 'DOCS/LOAD_SUCCESS';\nexport const LOAD_SUCCESS: LOAD_SUCCESS_TYPE = 'DOCS/LOAD_SUCCESS';\n\nexport type LOAD_FAILURE_TYPE = 'DOCS/LOAD_FAILURE';\nexport const LOAD_FAILURE: LOAD_FAILURE_TYPE = 'DOCS/LOAD_FAILURE';\n\nexport type LOAD_CANCEL_TYPE = 'DOCS/LOAD_CANCEL';\nexport const LOAD_CANCEL: LOAD_CANCEL_TYPE = 'DOCS/LOAD_CANCEL';\n\nexport type CLEAR_ERROR_TYPE = 'DOCS/CLEAR_ERROR';\nexport const CLEAR_ERROR: CLEAR_ERROR_TYPE = 'DOCS/CLEAR_ERROR';\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/index.tsx",
    "content": "import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators, Dispatch } from 'redux';\nimport { State } from '../../state';\nimport actionCreators from './actionCreators';\nimport { selectError, selectIsLoading, selectMarkdownContent } from './selectors';\nimport Feature, { StateProps, DispatchProps } from './presentation';\nimport { FeatureAction } from './actions';\n\n// tslint:disable-next-line\ninterface OwnProps  { }; // for props that are not passed down to inner component\n\nconst mapStateToProps = (state: State): StateProps => ({\n  error: selectError(state),\n  markdownContent: selectMarkdownContent(state),\n  isLoading: selectIsLoading(state),\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch<FeatureAction>): DispatchProps => ({\n  actions: bindActionCreators(\n    actionCreators,\n    dispatch,\n  ),\n});\n\nconst Container: React.ComponentClass<OwnProps> = connect(\n  mapStateToProps,\n  mapDispatchToProps,\n)(Feature);\n\nexport default Container;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/logic.ts",
    "content": "import { createLogic } from 'redux-logic';\nimport * as actionTypes from './constants';\n\nconst url = 'https://raw.githubusercontent.com/RyanCCollins/scalable-react-ts-boilerplate/master/README.md';\n\nexport const fetchLogic = createLogic({\n  type: actionTypes.LOAD_INITIATION,\n  cancelType: actionTypes.LOAD_CANCEL,\n  latest: true, // take latest only\n  processOptions: {\n    dispatchReturn: true,\n    successType: actionTypes.LOAD_SUCCESS,\n    failType: actionTypes.LOAD_FAILURE,\n  },\n\n  process({ httpClient }) {\n    return httpClient.get(url)\n      .then((response) => response.data);\n  },\n});\n\nexport default [\n  fetchLogic,\n];\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/presentation.tsx",
    "content": "import * as React from 'react';\nimport { Article, Headline, LoadingIndicator, Section, Notification } from 'openui';\nimport Hr from './styles';\nimport { State } from './state';\nimport {\n  LoadInitiationAction,\n  LoadSuccessAction,\n  LoadFailureAction,\n  ClearErrorAction,\n} from './actions';\n\nexport type StateProps = State;\n\nexport interface DispatchProps {\n  actions: {\n    loadInitiation: () => LoadInitiationAction,\n    loadSuccess: (data: string) => LoadSuccessAction,\n    loadFailure: (error: string) => LoadFailureAction,\n    clearError: () => ClearErrorAction,\n  };\n}\n\nexport type FeatureProps = React.Props<Feature> & StateProps & DispatchProps;\n\nexport default class Feature extends React.Component<FeatureProps, undefined> {\n  constructor(props) {\n    super(props);\n    const { markdownContent } = props;\n    if (markdownContent === null) {\n      this.props.actions.loadInitiation();\n    }\n  };\n\n  public render() {\n    const {\n      markdownContent,\n      isLoading,\n      error,\n      actions,\n    } = this.props;\n    return (\n      <Section\n        alignItems=\"center\"\n        flexDirection=\"column\"\n        pad=\"medium\"\n        full={{ vertical: true }}\n        backgroundColor=\"#f5f5f5\"\n      >\n        <Headline fontWeight={700}>\n          Docs\n          <Hr />\n        </Headline>\n        {error &&\n          <Notification\n            status=\"error\"\n            onClick={actions.clearError}\n            message={error}\n          />\n        }\n        <LoadingIndicator isLoading={isLoading} />\n        {typeof markdownContent === 'string' &&\n          <Article\n            pad=\"large\"\n            boxSize={{ horizontal: 'xxlarge' }}\n            margin={{ vertical: 'large' }}\n            backgroundColor=\"#FFF\"\n            content={markdownContent}\n          />\n        }\n      </Section>\n    );\n  }\n}\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/reducer.ts",
    "content": "import { Reducer } from 'redux';\nimport * as types from './constants';\nimport { FeatureAction } from './actions';\nimport { defaultAction } from 'shared/actionCreators';\nimport { State, initialState } from './state';\n\nconst reducer: Reducer<State> = (state: State = initialState, action: FeatureAction = defaultAction()) => {\n  switch (action.type) {\n  case types.LOAD_INITIATION:\n    return {\n      ...state,\n      isLoading: true,\n    };\n  case types.LOAD_SUCCESS:\n    return {\n      ...state,\n      isLoading: false,\n      markdownContent: action.payload,\n    };\n  case types.LOAD_FAILURE:\n    return {\n      ...state,\n      isLoading: false,\n      error: action.error,\n    };\n  case types.CLEAR_ERROR:\n    return {\n      ...state,\n      error: null,\n    };\n  case types.LOAD_CANCEL:\n    return {\n      ...state,\n      isLoading: false,\n    };\n  default:\n    return state;\n  }\n};\n\nexport default reducer;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/selectors.ts",
    "content": "import { createSelector, Selector } from 'reselect';\nimport { State } from 'state';\nimport { State as FeatureState } from './state';\n\nconst selectFeature = () => (state: State): FeatureState  => state.docs;\n\nexport const selectError: Selector<State, string> = createSelector(\n  selectFeature(),\n  (feature) => feature.error,\n);\n\nexport const selectIsLoading: Selector<State, boolean> = createSelector(\n  selectFeature(),\n  (feature) => feature.isLoading,\n);\n\nexport const selectMarkdownContent: Selector<State, string> = createSelector(\n  selectFeature(),\n  (feature) => feature.markdownContent,\n);\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/state.ts",
    "content": "export interface State {\n  markdownContent?: string;\n  error?: string;\n  isLoading: boolean;\n}\n\nexport const initialState: State = {\n  markdownContent: null,\n  error: null,\n  isLoading: false,\n};\n\nexport default State;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport default styled.hr`\n  border-top: 4px solid;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Docs/types.ts",
    "content": "export { actionCreators } from './actionCreators';\nexport * from './actions';\nexport * from './constants';\nexport * from './index';\nexport { FeatureProps } from './presentation';\nexport { State } from './state';\n"
  },
  {
    "path": "packages/docs/src/client/containers/Features/features.ts",
    "content": "// tslint:disable\nexport default {\n  styledComponents: `__Visual Primitives for the component age.__\n\n  Use the best bits of ES6 to style your apps without stress! \\`styled-components\\` allows you to write actual CSS code to style your components.\n\n  It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier!`,\n  featureFirst: `__Component based file organization.__\n\n  Code reuse has _never_ been easier.  Organizing your UI components by feature, rather than file-type, will help you to reuse code and facilitates building of UI component libraries.\n\n  We've included component / container generators for you to easily get started using the feature-first architecture.  Try it __now__ and thank us later!`,\n  typeScript: `TypeScript is a _typed superset_ of JavaScript that compiles to plain JavaScript!\n\n  TypeScript allows you to write the JavaScript you are used to while adding type annotiations that provide you with powerful static analysis.\n\n  It helps to [bridge the gap](https://medium.com/@ryancollinsio/bridging-the-gap-between-elm-and-javascript-with-typescript-375771ebcd4c#.64jw0aqki) between JavaScript and a fully functional language, such as Elm.`,\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/Features/index.tsx",
    "content": "import * as React from 'react';\nimport { Heading, Headline, Image, Button, Markdown, Anchor } from 'openui';\nimport { Props } from './types';\nimport {\n  Container,\n  FeatureImage,\n  Card,\n  FeaturesSection,\n  Feature,\n  FeatureSectionInner,\n} from './styles';\nimport features from './features';\nimport { withTheme } from 'styled-components';\n\nclass Features extends React.Component<Props, undefined> {\n  public render() {\n    const { theme } = this.props;\n    return (\n      <Container>\n        <FeaturesSection id=\"features-section-one\" background=\"#f3f3f3\">\n          <Headline>\n            Features\n          </Headline>\n          <FeatureSectionInner>\n            <Feature>\n              <Image\n                imageSize=\"small\"\n                alt=\"Type-Script Logo\"\n                src=\"https://raw.githubusercontent.com/RyanCCollins/cdn/master/stsb-images/ts-resized-2.png\"\n              />\n            </Feature>\n            <Feature>\n              <Card>\n                <Heading textAlign=\"left\" color=\"black\">TypeScript</Heading>\n                <Markdown\n                  content={features.typeScript}\n                />\n                <Anchor\n                  color=\"#fff\"\n                  href=\"http://www.typescriptlang.org/docs/tutorial.html\"\n                >\n                  <Button color={theme.secondary}>\n                    View Website\n                  </Button>\n                </Anchor>\n              </Card>\n            </Feature>\n          </FeatureSectionInner>\n        </FeaturesSection>\n        <FeaturesSection id=\"features-section-two\" background=\"#e6e8ec\">\n          <FeatureSectionInner reverse>\n            <Feature>\n              <Card>\n                <Heading textAlign=\"left\" color=\"black\">Styled Components</Heading>\n                <Markdown\n                  content={features.styledComponents}\n                />\n                <Anchor\n                  color=\"#fff\"\n                  href=\"https://styled-components.com/\"\n                >\n                  <Button color=\"#c05b4d\">\n                    View Website\n                  </Button>\n                </Anchor>\n              </Card>\n            </Feature>\n            <Feature>\n              <Image\n                imageSize=\"small\"\n                alt=\"Styled-components logo\"\n                src=\"https://github.com/RyanCCollins/cdn/blob/master/stsb-images/sc.png?raw=true\"\n              />\n            </Feature>\n          </FeatureSectionInner>\n          <FeatureImage>\n            <Image\n              imageSize=\"small\"\n              alt=\"Styled-components example\"\n              src=\"https://github.com/RyanCCollins/cdn/blob/master/stsb-images/sc-example.png?raw=true\"\n            />\n          </FeatureImage>\n        </FeaturesSection>\n        <FeaturesSection id=\"features-section-three\" background=\"#f3f3f3\">\n          <FeatureSectionInner>\n            <Feature>\n              <Image\n                imageSize=\"small\"\n                alt=\"feature-first logo\"\n                src=\"https://github.com/RyanCCollins/cdn/blob/master/stsb-images/feature-first.png?raw=true\"\n              />\n            </Feature>\n            <Feature>\n              <Card>\n                <Heading textAlign=\"left\" color=\"black\">Feature First</Heading>\n                <Markdown\n                  content={features.featureFirst}\n                />\n              </Card>\n            </Feature>\n          </FeatureSectionInner>\n          <FeatureImage>\n            <Image\n              imageSize=\"medium\"\n              alt=\"feature-first example\"\n              src=\"https://github.com/RyanCCollins/cdn/blob/master/stsb-images/feature-first-example.png?raw=true\"\n            />\n          </FeatureImage>\n        </FeaturesSection>\n      </Container>\n    );\n  }\n}\n\nexport default withTheme(Features);\n"
  },
  {
    "path": "packages/docs/src/client/containers/Features/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Container = styled.div`\n  min-height: 100vh;\n  width: 100vw;\n`;\n\ninterface FeaturesSectionProps {\n  background: string\n}\n\nexport const FeaturesSection = styled.section`\n  width: 100%;\n  background: ${(props: FeaturesSectionProps) => props.background}\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n`;\n\ninterface FeatureSectionInnerProps {\n  reverse?: boolean;\n}\nexport const FeatureSectionInner = styled.div`\n  display: flex;\n  flex-direction: row;\n  max-width: 1000px;\n  padding: 60px 120px;\n  @media screen and (max-width: 768px) {\n    flex-wrap: ${(props: FeatureSectionInnerProps) => props.reverse ? 'wrap-reverse' : 'wrap'};\n    padding: 60px 20px;\n    padding-top:\n  }\n`;\n\nexport const Feature = styled.div`\n  flex-basis: 50%;\n  display: flex;\n  justify-content: center;\n  margin: 20px;\n  min-width: 300px;\n  @media screen and (max-width: 768px) {\n    max-width: 100vw !important;\n    flex-basis: 100%;\n  }\n`;\n\nexport const Card = styled.div`\n  max-width: 540px;\n  h1 {\n    margin-top: 0 !important;\n  }\n`;\n\nexport const FeatureImage = styled.div`\n  width: 100%;\n  display: flex;\n  justify-content: center;\n  padding: 60px;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Features/types.ts",
    "content": "import Features from './';\nimport * as React from 'react';\nimport { ThemeColorMap } from '../../types';\n\nexport interface Props extends React.Props<typeof Features> {\n  theme?: ThemeColorMap;\n}\n"
  },
  {
    "path": "packages/docs/src/client/containers/Home/index.tsx",
    "content": "import * as React from 'react';\nimport { Features } from 'containers';\nimport { ThemeColorMap } from '../../types';\nimport HomePresentation from './presentation';\nimport { withTheme } from 'styled-components';\n\nexport interface Props { theme: ThemeColorMap; }\nclass Home extends React.Component<Props, undefined> {\n  public render() {\n    return (\n      <HomePresentation theme={this.props.theme}>\n        <Features />\n      </HomePresentation>\n    );\n  }\n}\n\nexport default withTheme(Home);\n"
  },
  {
    "path": "packages/docs/src/client/containers/Home/presentation.tsx",
    "content": "import * as React from 'react';\nimport { Heading, Section, Hero, Paragraph, Button, Anchor, Box } from 'openui';\nimport { Container, HeroLogo, HeroLogoRow, HeadingContainer, GetStartedButtons } from './styles';\nimport { Props as HomeProps } from './types';\n\nexport interface Props extends HomeProps {\n  children?: JSX.Element;\n}\nexport default function HomePresentation({\n  children,\n  theme,\n}: Props): JSX.Element {\n  return (\n    <Container>\n      <Section\n        alignItems=\"center\"\n        flexDirection=\"column\"\n        full={{ horizontal: true }}\n        backgroundColor={theme.offwhite}\n      >\n        <Hero backgroundColor={theme.black2}>\n          <HeroLogoRow>\n            <HeroLogo>\n              TS\n            </HeroLogo>\n          </HeroLogoRow>\n          <HeadingContainer>\n            <Heading margin=\"small\" tag=\"h1\" color={theme.primary}>\n              Scalable React TypeScript Boilerplate\n            </Heading>\n            <Paragraph margin=\"small\" paragraphSize=\"large\">\n              Scaling JavaScript apps has never been easier\n            </Paragraph>\n          </HeadingContainer>\n          <GetStartedButtons>\n            <Box margin=\"small\">\n              <Anchor\n                plain\n                color={theme.white1}\n                path=\"/docs\"\n              >\n                <Button\n                  fontSize=\"xlarge\"\n                  backgroundColor={theme.secondary}\n                >\n                  Read the docs\n                </Button>\n              </Anchor>\n            </Box>\n            <Box margin=\"small\">\n              <Anchor\n                plain\n                color={theme.white1}\n                path=\"/todo-app\"\n              >\n                <Button\n                  style={{ margin: 10 }}\n                  fontSize=\"xlarge\"\n                  backgroundColor={theme.secondary}\n                >\n                  View Example App\n                </Button>\n              </Anchor>\n            </Box>\n          </GetStartedButtons>\n        </Hero>\n      </Section>\n      {children}\n    </Container>\n  );\n}\n"
  },
  {
    "path": "packages/docs/src/client/containers/Home/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Container = styled.div`\n  min-height: 100vh;\n  width: 100vw;\n`;\n\nexport const HeroLogo = styled.div`\n  margin-bottom: 20px;\n  justify-content: center;\n  height: 100px;\n  width: 100px;\n  background: #007acc;\n  color: white;\n  font-size: 68px;\n`;\n\nexport const HeroLogoRow = styled.div`\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n`;\n\nexport const HeadingContainer = styled.div`\n  display: flex;\n  align-items: center;\n  flex-direction: column;\n  padding: 20px;\n`;\n\nexport const GetStartedButtons = styled.div`\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: row;\n  @media screen and (max-width: 768px) {\n    flex-direction: column;\n  }\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/Home/types.ts",
    "content": "import { Props } from './';\nimport { Props as PresentationProps } from './presentation';\n\nexport { Props, PresentationProps };\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/__mocks__/presentation.mock.ts",
    "content": "export default {\n  todos: [\n    {\n      text: 'foo',\n    },\n    {\n      text: 'bar',\n    },\n  ],\n  input: 'foo',\n  onInput: jest.fn(),\n  onAddition: jest.fn(),\n  onDeletion: jest.fn(),\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/__mocks__/selectors.mock.ts",
    "content": "export default {\n  todoApp: {\n    todos: [\n      {\n        text: 'LOL',\n      },\n      {\n        text: '🐒🚀',\n      },\n    ],\n    input: 'Money',\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<TodoApp /> container should render as expected 1`] = `\n<Provider\n  store={\n    Object {\n      \"clearActions\": [Function],\n      \"dispatch\": [Function],\n      \"getActions\": [Function],\n      \"getState\": [Function],\n      \"replaceReducer\": [Function],\n      \"subscribe\": [Function],\n    }\n  }\n>\n  <Connect(TodoApp) />\n</Provider>\n`;\n\nexports[`<TodoAppPresentation /> should render as expected 1`] = `\n<styled.div>\n  <styled.h1>\n    Example Todo App\n  </styled.h1>\n  <styled.div>\n    <styled.section>\n      <styled.header>\n        <styled.input\n          autoFocus={true}\n          onChange={[Function]}\n          onKeyPress={[Function]}\n          placeholder=\"Start typing to add a Todo...\"\n          value=\"foo\"\n        />\n      </styled.header>\n      <styled.section>\n        <styled.ul>\n          <styled.li>\n            <styled.label>\n              foo\n            </styled.label>\n            <styled.button\n              onClick={[Function]}\n            />\n          </styled.li>\n          <styled.li>\n            <styled.label>\n              bar\n            </styled.label>\n            <styled.button\n              onClick={[Function]}\n            />\n          </styled.li>\n        </styled.ul>\n      </styled.section>\n    </styled.section>\n  </styled.div>\n</styled.div>\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/actionCreators.test.ts",
    "content": "import * as T from '../constants';\nimport actionCreators from '../actionCreators';\n\ndescribe('todoApp actionCreators', () => {\n  it('should have a type of ADD_TODO', () => {\n    const todo = { text: 'foo' };\n    const expected = { type: T.ADD_TODO, todo };\n    expect(actionCreators.addTodo(todo)).toEqual(expected);\n  });\n  it('should have a type of INPUT', () => {\n    const input = 'bar';\n    const expected = { type: T.INPUT, input };\n    expect(actionCreators.input(input)).toEqual(expected);\n  });\n  it('should have a type of DELETE_TODO', () => {\n    const index = 1;\n    const expected = { type: T.DELETE_TODO, index };\n    expect(actionCreators.deleteTodo(index)).toEqual(expected);\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/index.test.tsx",
    "content": "import MockProvider, { getMockStore } from 'redux-mock-provider';\nimport { shallowToJson } from 'enzyme-to-json';\nimport { shallow } from 'enzyme';\nimport * as React from 'react';\nimport { initialState } from '../state';\nimport TodoAppContainer from '../';\nimport TodoAppPresentation from '../presentation';\nimport props from './__mocks__/presentation.mock';\n\nconst store = getMockStore({\n  key: 'todoApp',\n  state: initialState,\n});\n\ndescribe('<TodoApp /> container', () => {\n  it('should render as expected', () => {\n    const wrapper = shallow(\n      <MockProvider store={store}>\n        <TodoAppContainer />\n      </MockProvider>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n\ndescribe('<TodoAppPresentation />', () => {\n  it('should render as expected', () => {\n    const wrapper = shallow(\n      <TodoAppPresentation {...props} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/reducer.test.ts",
    "content": "import reducer from '../reducer';\nimport actionCreators from '../actionCreators';\nimport { initialState } from '../state';\n\ndescribe('todo app reducer', () => {\n  it('should handle reducer for ADD_TODO', () => {\n    const todos = [\n      {\n        text: 'bar',\n      },\n    ];\n    const todo = { text: 'foo' };\n    const stateBefore = {\n      ...initialState,\n      todos,\n    };\n    const stateAfter = {\n      ...initialState,\n      todos: [\n        ...todos,\n        todo,\n      ],\n    };\n    expect(\n      reducer(stateBefore, actionCreators.addTodo(todo)),\n    ).toEqual(stateAfter);\n  });\n  it('should handle reducer for DELETE_TODO', () => {\n    const todos = [\n      {\n        text: 'bar',\n      },\n    ];\n    const index = 0;\n    const stateBefore = {\n      ...initialState,\n      todos,\n    };\n    const stateAfter = {\n      ...initialState,\n      todos: [],\n    };\n    expect(\n      reducer(stateBefore, actionCreators.deleteTodo(index)),\n    ).toEqual(stateAfter);\n  });\n  it('should handle reducer for INPUT', () => {\n    const input = 'foo';\n    const stateBefore = initialState;\n    const stateAfter = {\n      ...initialState,\n      input,\n    };\n    expect(\n      reducer(stateBefore, actionCreators.input(input)),\n    ).toEqual(stateAfter);\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/__tests__/selectors.test.ts",
    "content": "import state from './__mocks__/selectors.mock';\nimport { initialState as globalState } from '../../../state';\nimport { selectTodos, selectInput } from '../selectors';\n\nlet mockState;\ndescribe('todoApp selectors', () => {\n  beforeEach(() => {\n    mockState = {\n      ...globalState,\n      todoApp: state.todoApp,\n    };\n  });\n  describe('select todos', () => {\n    it('should select an empty array', () => {\n      expect(\n        selectTodos(globalState),\n      ).toEqual([]);\n    });\n    it('should select two todos', () => {\n      expect(\n        selectTodos(mockState),\n      ).toEqual(state.todoApp.todos);\n    });\n  });\n  describe('select input', () => {\n    it('should select an empty string', () => {\n      expect(\n        selectInput(globalState),\n      ).toEqual('');\n    });\n    it('should select input', () => {\n      expect(\n        selectInput(mockState),\n      ).toEqual(state.todoApp.input);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/actionCreators.ts",
    "content": "import { ActionCreator, ActionCreatorsMapObject } from 'redux';\nimport { Todo, Input, Index } from './types';\nimport * as types from './constants';\nimport {\n  AddTodoAction,\n  DeleteTodoAction,\n  InputAction,\n} from './actions';\n\ntype AddTodoActionCreator = ActionCreator<AddTodoAction>;\nexport const addTodo: AddTodoActionCreator = (todo: Todo) => ({\n  type: types.ADD_TODO,\n  todo,\n});\n\ntype InputActionCreator = ActionCreator<InputAction>;\nexport const input: InputActionCreator = (input: Input) => ({\n  type: types.INPUT,\n  input,\n});\n\ntype DeleteTodoActionCreator = ActionCreator<DeleteTodoAction>;\nexport const deleteTodo: DeleteTodoActionCreator = (index: Index) => ({\n  type: types.DELETE_TODO,\n  index,\n});\n\nexport interface ActionCreatorTypes extends ActionCreatorsMapObject {\n  addTodo: AddTodoActionCreator;\n  input: InputActionCreator;\n  deleteTodo: DeleteTodoActionCreator;\n}\nexport const actionCreators: ActionCreatorTypes = {\n  addTodo,\n  input,\n  deleteTodo,\n};\n\nexport default actionCreators;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/actions.ts",
    "content": "import { Action } from 'redux';\nimport { Todo, Input, Index } from './types';\nimport * as T from './constants';\n\nexport interface AddTodoAction extends Action {\n  type: T.ADD_TODO_TYPE;\n  todo: Todo;\n}\n\nexport interface InputAction extends Action {\n  type: T.INPUT_TYPE;\n  input: Input;\n}\n\nexport interface DeleteTodoAction extends Action {\n  type: T.DELETE_TODO_TYPE;\n  index: Index;\n}\n\nexport type ActionTypes = AddTodoAction | InputAction | DeleteTodoAction;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/constants.ts",
    "content": "export type ADD_TODO_TYPE = 'TODO_APP/ADD_TODO';\nexport const ADD_TODO: ADD_TODO_TYPE = 'TODO_APP/ADD_TODO';\n\nexport type INPUT_TYPE = 'TODO_APP/INPUT';\nexport const INPUT: INPUT_TYPE = 'TODO_APP/INPUT';\n\nexport type DELETE_TODO_TYPE = 'TODO_APP/DELETE_TODO';\nexport const DELETE_TODO: DELETE_TODO_TYPE = 'TODO_APP/DELETE_TODO';\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/index.tsx",
    "content": "import * as React from 'react';\nimport { Dispatch, bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport { FormControlEventTarget } from '../../types';\nimport { State } from '../../state';\nimport actionCreators from './actionCreators';\nimport Presentation from './presentation';\nimport { Todo, Input as In, ActionCreatorTypes, ActionTypes, Index } from './types';\nimport {\n  selectTodos,\n  selectInput,\n} from './selectors';\n\nconst mapStateToProps = (state: State): StateProps => ({\n  todos: selectTodos(state),\n  input: selectInput(state),\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch<ActionTypes>): DispatchProps => ({\n  actions: bindActionCreators(\n    actionCreators,\n    dispatch,\n  ),\n});\n\nexport interface StateProps extends React.Props<TodoApp> {\n  todos: Todo[],\n  input: In,\n}\nexport interface DispatchProps {\n  actions: ActionCreatorTypes;\n}\nexport type Props = DispatchProps & StateProps;\nclass TodoApp extends React.Component<Props, undefined> {\n  constructor() {\n    super();\n    this.handleAddition = this.handleAddition.bind(this);\n    this.handleInput = this.handleInput.bind(this);\n    this.handleDeletion = this.handleDeletion.bind(this);\n  }\n  private handleAddition(e: React.KeyboardEvent<undefined>) {\n    if (e.key === 'Enter') {\n      e.preventDefault();\n      const { input, actions } = this.props;\n      actions.addTodo({ text: input });\n    }\n  }\n  private handleInput(e: React.SyntheticEvent<undefined>) {\n    e.preventDefault();\n    const input = (e.target as FormControlEventTarget).value;\n    this.props.actions.input(input);\n  }\n  private handleDeletion(i: Index) {\n    this.props.actions.deleteTodo(i);\n  }\n  public render() {\n    return (\n      <Presentation\n        todos={this.props.todos}\n        input={this.props.input}\n        onInput={this.handleInput}\n        onAddition={this.handleAddition}\n        onDeletion={this.handleDeletion}\n      />\n    );\n  }\n}\n\nexport default connect(\n  mapStateToProps,\n  mapDispatchToProps,\n)(TodoApp);\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/presentation.tsx",
    "content": "import * as React from 'react';\nimport { StateProps } from './types';\nimport {\n  Container,\n  DeleteButton,\n  Section,\n  Input,\n  Header,\n  InnerContainer,\n  Ul,\n  Li,\n  Todos,\n  Todo as TodoLabel,\n  H1,\n} from './styles';\n\ninterface Props extends StateProps {\n  onInput: React.EventHandler<React.FormEvent<HTMLInputElement>>;\n  onDeletion: (index: number) => void;\n  onAddition: React.EventHandler<React.KeyboardEvent<HTMLInputElement>>;\n}\nclass TodoAppPresentation extends React.Component<Props, undefined> {\n  public render() {\n    const {\n      todos,\n      input,\n      onInput,\n      onDeletion,\n      onAddition,\n    } = this.props;\n    return (\n      <Container>\n        <H1>\n          Example Todo App\n        </H1>\n        <InnerContainer>\n          <Section>\n            <Header>\n              <Input\n                value={input}\n                onChange={onInput}\n                onKeyPress={onAddition}\n                autoFocus\n                placeholder=\"Start typing to add a Todo...\"\n              />\n            </Header>\n            <Todos>\n              <Ul>\n                {todos && todos.map((item, i) =>\n                  <Li key={i}>\n                    <TodoLabel>\n                      {item.text}\n                    </TodoLabel>\n                    <DeleteButton\n                      onClick={() => onDeletion(i)}\n                    />\n                  </Li>,\n                )}\n              </Ul>\n            </Todos>\n          </Section>\n        </InnerContainer>\n      </Container>\n    );\n  }\n}\n\nexport default TodoAppPresentation;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/reducer.ts",
    "content": "import { Reducer } from 'redux';\nimport * as T from './constants';\nimport { ActionTypes } from './actions';\nimport { State, initialState } from './state';\n\nconst reducer: Reducer<State> = (state: State = initialState, action: ActionTypes) => {\n  switch (action.type) {\n  case T.ADD_TODO:\n    return {\n      ...state,\n      input: '',\n      todos: [\n        ...state.todos,\n        action.todo,\n      ],\n    };\n  case T.INPUT:\n    return {\n      ...state,\n      input: action.input,\n    };\n  case T.DELETE_TODO:\n    return {\n      ...state,\n      todos: [\n        ...state.todos.slice(0, action.index),\n        ...state.todos.slice(action.index + 1),\n      ],\n    };\n  default:\n    return state;\n  }\n};\n\nexport default reducer;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/selectors.ts",
    "content": "import { createSelector, Selector } from 'reselect';\nimport { State } from '../../state';\nimport { State as TodoAppState, Todo } from './types';\n\nconst selectTodoApp = () => (state: State): TodoAppState  => state.todoApp;\n\nexport const selectTodos: Selector<State, Todo[]> = createSelector(\n  selectTodoApp(),\n  (todoApp) => todoApp.todos,\n);\n\nexport const selectInput: Selector<State, string> = createSelector(\n  selectTodoApp(),\n  (todoApp) => todoApp.input,\n);\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/state.ts",
    "content": "import { Todo, Input } from './types';\n\nexport interface State {\n  todos?: Todo[];\n  input?: Input;\n}\n\nexport const initialState: State = {\n  todos: [],\n  input: '',\n};\n\nexport default State;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Container = styled.div`\n  min-height: 100vh;\n  background: #f5f5f5;\n  width: 100%;\n`;\n\nexport const InnerContainer = styled.div`\n  line-height: 1.4em;\n  color: #4d4d4d;\n  min-width: 230px;\n  max-width: 550px;\n  margin: 0 auto;\n  font-smoothing: antialiased;\n  font-weight: 300;\n  padding-top: 130px;\n  min-height: 100vh;\n`;\n\nexport const Section = styled.section`\n  background: #fff;\n  position: relative;\n  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);\n`;\n\nexport const Header = styled.header`\n  display: block;\n`;\n\nexport const Input = styled.input`\n  padding: 16px 16px 16px 60px;\n  border: none;\n  background: rgba(0, 0, 0, 0.003);\n  box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03);\n  position: relative;\n  margin: 0;\n  width: 100%;\n  font-size: 24px;\n  font-family: inherit;\n  font-weight: inherit;\n  line-height: 1.4em;\n  border: 0;\n  outline: none;\n  color: inherit;\n  border: 1px solid #999;\n  box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2);\n  box-sizing: border-box;\n  font-smoothing: antialiased;\n`;\n\nexport const Todos = styled.section`\n  position: relative;\n  z-index: 2;\n  border-top: 1px solid #e6e6e6;\n`;\n\nexport const Ul = styled.ul`\n  margin: 0;\n  padding: 0;\n  list-style: none;\n`;\n\nexport const Li = styled.li`\n  position: relative;\n  font-size: 24px;\n  border-bottom: 1px solid #ededed;\n`;\n\nexport const Todo = styled.label`\n  white-space: pre-line;\n  word-break: break-all;\n  padding: 15px 60px 15px 15px;\n  margin-left: 45px;\n  display: block;\n  line-height: 1.2;\n  transition: color 0.4s;\n`;\n\nexport const DeleteButton = styled.button`\n  cursor: pointer;\n  position: absolute;\n  top: 0;\n  right: 10px;\n  bottom: 0;\n  width: 40px;\n  height: 35px;\n  margin: auto 0;\n  font-size: 30px;\n  color: #cc9a9a;\n  margin-bottom: 11px;\n  transition: color 0.2s ease-out;\n  border: none;\n  background: transparent;\n  font-size: 16px;\n  &:after {\n    content: '✕';\n  }\n  &:hover {\n    color: #af5b5e;\n  }\n`;\n\nexport const H1 = styled.h1`\n  text-align: center;\n  font-size: 48px;\n  margin: 0;\n  padding-top: 60px;\n  text-align: center;\n  color: #000000;\n`;\n"
  },
  {
    "path": "packages/docs/src/client/containers/TodoApp/types.ts",
    "content": "import { Props, StateProps } from './';\nimport { State } from './state';\nimport { ActionCreatorTypes } from './actionCreators';\nimport { ActionTypes } from './actions';\n\nexport interface Todo {\n  text: string;\n}\n\nexport type Input = string;\n\nexport type Index = number;\n\nexport { Props, State, ActionCreatorTypes, ActionTypes, StateProps };\n"
  },
  {
    "path": "packages/docs/src/client/containers/index.ts",
    "content": "/* GENERATOR-IMPORT */\nimport Blog from './Blog';\nimport BlogPost from './BlogPost';\nimport App from './App';\nimport Home from './Home';\nimport Docs from './Docs';\nimport Features from './Features';\nimport About from './About';\nimport TodoApp from './TodoApp';\n\nexport {\n  /* GENERATOR-EXPORT */\n  Blog,\n  BlogPost,\n  App,\n  Home,\n  Docs,\n  Features,\n  About,\n  TodoApp,\n};\n"
  },
  {
    "path": "packages/docs/src/client/index.tsx",
    "content": "import * as React from 'react';\nimport { render } from 'react-dom';\nimport RouterApp from './routes';\nimport { AppContainer } from 'react-hot-loader';\nimport './theming/globalCss';\n\ndeclare var module: {\n  hot: {\n    accept: (s: string, f: () => void) => void,\n  },\n};\n\nconst rootEl = document.getElementById('app');\n\nrender(\n  <AppContainer>\n    <RouterApp />\n  </AppContainer>,\n  rootEl,\n);\n\nif (module.hot) {\n  const NextApp = require('./routes').default;\n  module.hot.accept('./routes', () => {\n    render(\n      <AppContainer>\n        <NextApp />\n      </AppContainer>,\n      rootEl,\n    );\n  });\n}\n"
  },
  {
    "path": "packages/docs/src/client/logic.ts",
    "content": "import docsLogic from './containers/Docs/logic';\n\nconst rootLogic = [\n  ...docsLogic,\n];\n\nexport default rootLogic;\n"
  },
  {
    "path": "packages/docs/src/client/reducers.ts",
    "content": "import { combineReducers, Reducer } from 'redux';\nimport { routerReducer } from 'react-router-redux';\nimport client from './apolloClient';\n/* GENERATOR-IMPORT-REDUCER */\nimport blogPostReducer from 'containers/BlogPost/reducer';\nimport appReducer from 'containers/App/reducer';\nimport docsReducer from 'containers/Docs/reducer';\nimport todoAppReducer from 'containers/TodoApp/reducer';\n\nexport const rootReducer = combineReducers({\n  /* GENERATOR-EXPORT-REDUCER */\n  todoApp: todoAppReducer,\n  blogPost: blogPostReducer,\n  app: appReducer,\n  docs: docsReducer,\n  routing: routerReducer,\n  apollo: client.reducer() as Reducer<undefined>,\n});\n"
  },
  {
    "path": "packages/docs/src/client/routes.tsx",
    "content": "import * as React from 'react';\nimport { ApolloProvider } from 'react-apollo';\nimport { ThemeProvider } from 'styled-components';\nimport { Route, IndexRoute, Router as ReactRouter } from 'react-router';\nimport client from './apolloClient';\nimport store, { history } from './store';\nimport { App, Home, Docs, About, TodoApp, Blog, BlogPost } from './containers';\nimport colors from './theming';\n\nimport ReactGA from 'react-ga';\n\nif (typeof window !== 'undefined') {\n  ReactGA.initialize('UA-89939143-1');\n}\n\nconst logPage = () => {\n  if (typeof window !== 'undefined') {\n    window.scrollTo(0, 0);\n    ReactGA.set({ page: window.location.pathname });\n    ReactGA.pageview(window.location.pathname);\n  }\n};\n\nexport const routes = (\n  <Route path=\"/\" component={App}>\n    <IndexRoute component={Home} />\n    <Route path=\"/docs\" component={Docs} />\n    <Route path=\"/about\" component={About} />\n    <Route path=\"/blog\" component={Blog} />\n    <Route path=\"/blog/posts/:postId\" component={BlogPost} />\n    <Route path=\"/todo-app\" component={TodoApp} />\n    <Route path=\"*\" component={Home} />\n  </Route>\n);\n\nconst RouterApp = () => (\n  <ApolloProvider store={store} client={client}>\n    <ThemeProvider theme={colors}>\n      <ReactRouter\n        onUpdate={logPage}\n        history={history}\n        routes={routes}\n      />\n    </ThemeProvider>\n  </ApolloProvider>\n);\n\nexport default RouterApp;\n"
  },
  {
    "path": "packages/docs/src/client/shared/actionCreators.ts",
    "content": "import {DefaultAction} from './actions';\nimport * as types from './constants';\n\nexport const defaultAction = (): DefaultAction => ({\n  type: types.DEFAULT_ACTION_TYPE,\n});\n"
  },
  {
    "path": "packages/docs/src/client/shared/actions.ts",
    "content": "import { Action } from 'redux';\nimport * as types from './constants';\n\nexport interface DefaultAction extends Action {\n  type: types.DEFAULT_ACTION_TYPE\n}\n\nexport interface PayloadAction<P> extends Action {\n  type: string;\n  payload?: P;\n}\n"
  },
  {
    "path": "packages/docs/src/client/shared/constants.ts",
    "content": "export type DEFAULT_ACTION_TYPE = '';\nexport const DEFAULT_ACTION_TYPE: DEFAULT_ACTION_TYPE = '';\n"
  },
  {
    "path": "packages/docs/src/client/state.ts",
    "content": "/* GENERATOR-IMPORT-STATE */\nimport { initialState as appState, State as AppState } from './containers/App/state';\nimport { initialState as docsState, State as DocsState } from './containers/Docs/state';\nimport { initialState as todoAppState, State as TodoAppState } from './containers/TodoApp/state';\nimport { initialState as blogPostState, State as BlogPostState } from './containers/BlogPost/state';\n\nexport interface State {\n  /* GENERATOR-EXPORT-STATE-TYPE */\n  todoApp: TodoAppState;\n  app: AppState;\n  docs: DocsState;\n  blogPost: BlogPostState;\n}\n\nexport const initialState: State = {\n  /* GENERATOR-EXPORT-STATE */\n  app: appState,\n  docs: docsState,\n  todoApp: todoAppState,\n  blogPost: blogPostState,\n};\n"
  },
  {
    "path": "packages/docs/src/client/store.tsx",
    "content": "import { createStore, applyMiddleware, Middleware, GenericStoreEnhancer, compose } from 'redux';\nimport { syncHistoryWithStore } from 'react-router-redux';\nimport { browserHistory } from 'react-router';\nimport { createLogicMiddleware } from 'redux-logic';\nimport { rootReducer} from './reducers';\nimport { initialState as defaultInitialState} from './state';\nimport apolloClient from './apolloClient';\nimport rootLogic from './logic';\nimport axios from 'axios';\n\nconst isClient = typeof document !== 'undefined';\n\ndeclare var window: { __INITIAL_STATE__: {} };\nconst initialState = isClient ? window.__INITIAL_STATE__ : defaultInitialState;\n\nfunction createThunkMiddleware() {\n  return ({ dispatch, getState }) => (next) => (action) => {\n    if (typeof action === 'function') {\n      return action(dispatch, getState);\n    }\n\n    return next(action);\n  };\n}\n\nconst dependencies = {\n  httpClient: axios,\n};\n\nconst thunk = createThunkMiddleware();\nconst logicMiddleware = createLogicMiddleware(rootLogic, dependencies);\nconst apolloClientMiddleware = apolloClient.middleware();\n\nconst middlewares: Middleware[] = [\n  thunk,\n  apolloClientMiddleware,\n  logicMiddleware,\n];\n\nconst enhancers: GenericStoreEnhancer[] = [\n  applyMiddleware(...middlewares),\n];\n\nconst ReduxExtentionComposeName: string = '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__';\nconst composeEnhancers =\n  process.env.NODE_ENV !== 'production' &&\n  typeof window === 'object' &&\n    window[ReduxExtentionComposeName] ?\n    window[ReduxExtentionComposeName] : compose;\n\nconst store = createStore(\n  rootReducer,\n  initialState,\n  composeEnhancers(...enhancers),\n);\n\nexport const history = isClient ?\n  syncHistoryWithStore(browserHistory, store) : undefined;\n\nexport default store;\n"
  },
  {
    "path": "packages/docs/src/client/test/mockstore.ts",
    "content": "\nimport configureMockStore from 'redux-mock-store';\nimport { Middleware } from 'redux';\nimport { createLogicMiddleware } from 'redux-logic';\nimport rootLogic from '../logic';\nimport axios from 'axios';\n\nconst dependencies = {\n  httpClient: axios,\n};\n\nconst logicMiddleware = createLogicMiddleware(rootLogic, dependencies);\n\nconst middlewares: Middleware[] = [\n  logicMiddleware,\n];\n\nconst mockStore = configureMockStore(middlewares);\n\nexport default mockStore;\n"
  },
  {
    "path": "packages/docs/src/client/theming/colorMap.ts",
    "content": "import { ThemeColorMap } from './types';\n\nconst colorMap: ThemeColorMap = {\n  dark1: '#293953',\n  dark2: '#6B4E71',\n  dark3: '#829399',\n  light1: '#34E4EA',\n  light2: '#D6DBB2',\n  light3: '#6D72C3',\n  primary: '#007acc',\n  secondary: '#c05b4d',\n  ok: '#8cc800',\n  warning: '#ffd602',\n  error: '#ff324d',\n  white1: '#fff',\n  white2: '#f3f3f3',\n  white3: '#e6e8ec',\n  offwhite: '#f5f5f5',\n  black1: '#0a0a0a',\n  black2: '#2d2d2d',\n  black3: '#555555',\n};\n\nexport default colorMap;\n"
  },
  {
    "path": "packages/docs/src/client/theming/globalCss.ts",
    "content": "import { injectGlobal } from 'styled-components';\n\nconst globalCss = injectGlobal`\n  * {\n    box-sizing: border-box;\n  }\n\n  body {\n    overflow: scroll;\n    overflow-x: hidden;\n    padding: 0;\n    margin: 0;\n    font-family: Hind,sans-serif;\n    font-weight: 400;\n    line-height: 1.5;\n    color: #0a0a0a;\n    background: #fff;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  html {\n    font-size: 100%;\n    box-sizing: border-box;\n    overflow-x: hidden;\n  }\n\n  .markdown-body {\n    max-width: 100% !important;\n  }\n`;\n\nexport default globalCss;\n"
  },
  {
    "path": "packages/docs/src/client/theming/index.ts",
    "content": "import colorMap from './colorMap';\n\nexport default colorMap;\n"
  },
  {
    "path": "packages/docs/src/client/theming/types.ts",
    "content": "export interface ThemeColorMap {\n  dark1: string,\n  dark2: string,\n  dark3: string,\n  light1: string,\n  light2: string,\n  light3: string,\n  primary: string,\n  secondary: string,\n  ok: string,\n  warning: string,\n  error: string,\n  white1: string,\n  white2: string,\n  white3: string,\n  offwhite: string,\n  black1: string,\n  black2: string,\n  black3: string,\n}\n"
  },
  {
    "path": "packages/docs/src/client/types.ts",
    "content": "import { Action } from 'redux';\n/* GENERATOR-IMPORT */\nimport * as AppTypes from 'containers/App/types';\nimport * as TodoAppTypes from 'containers/TodoApp/types';\nimport * as BlogPostTypes from 'containers/BlogPost/types';\nimport * as BlogTypes from 'containers/Blog/types';\nimport * as DocsTypes from 'containers/Docs/types';\nimport * as FeaturesTypes from 'containers/Features/types';\nimport * as HomeTypes from 'containers/Home/types';\nexport { ThemeColorMap } from './theming/types';\n\nexport interface PayloadAction<P> extends Action {\n  type: string;\n  payload?: P;\n}\n\nexport interface FormControlEventTarget extends EventTarget {\n  value: string;\n}\n\nexport {\n  /* GENERATOR-EXPORT */\n  AppTypes,\n  TodoAppTypes,\n  DocsTypes,\n  BlogPostTypes,\n  BlogTypes,\n  FeaturesTypes,\n  HomeTypes,\n};\n"
  },
  {
    "path": "packages/docs/src/server/db/index.ts",
    "content": "import mongoose from 'mongoose';\nimport path from 'path';\nimport PostModel from './models/post';\n\nfunction seedPosts() {\n  return [\n    {\n      title: 'Welcome!',\n      content: 'Hey there!  Welcome to the blog of Scalable-React-TypeScript! ' +\n        'This is just an introductory post, but stay tuned for more!',\n      image: 'https://raw.githubusercontent.com/RyanCCollins/cdn/master/stsb-images/ts-resized-2.png',\n    },\n  ];\n}\n\nfunction createSeedPosts() {\n  return new Promise((res, rej) => {\n    PostModel.find().exec((err, docs) => {\n      if (docs.length === 0) {\n        PostModel.create(\n          seedPosts(),\n          (err, data) => {\n            if (err) {\n              rej(err);\n            }\n            res(data);\n          },\n        );\n      }\n    });\n  });\n}\n\nfunction createSeedData() {\n  return new Promise((res, rej) => {\n    createSeedPosts().then(() => {\n      res();\n    }).catch((err) => rej(err));\n  });\n}\n\nconst env = require('node-env-file');\n\nenv(path.join(process.cwd(), '.env'));\n\nconst dbUri = process.env.MONGODB_URI;\n\nmongoose.Promise = global.Promise;\n\nmongoose.connect(dbUri);\nmongoose.connection.on('connected', () => {\n  console.info(`Mongoose connection open to ${dbUri}`);\n  createSeedData();\n});\n\nprocess.on('SIGINT', () => {\n  mongoose.connection.close(() => {\n    console.info('Mongoose connection disconnected through app termination');\n    process.exit(0);\n  });\n});\n"
  },
  {
    "path": "packages/docs/src/server/db/models/comment.ts",
    "content": "import mongoose from 'mongoose';\n\nconst CommentSchema = new mongoose.Schema({\n  author: String,\n  body: String,\n  post: {\n    type: String,\n    ref: 'Post',\n  },\n});\n\nexport default mongoose.model('Comment', CommentSchema);\n"
  },
  {
    "path": "packages/docs/src/server/db/models/post.ts",
    "content": "import mongoose from 'mongoose';\n\nconst PostSchema = new mongoose.Schema({\n  title: {\n    type: String,\n  },\n  image: {\n    type: String,\n  },\n  content: {\n    type: String,\n  },\n  comments: [{ type: String, ref: 'Comment' }],\n});\n\nexport default mongoose.model('Post', PostSchema);\n"
  },
  {
    "path": "packages/docs/src/server/db/utils/uuid.ts",
    "content": "// tslint:disable\nexport default function uuid() {\n  var i;\n  var random;\n  var uuid = '';\n  for (i = 0; i < 32; i++) {\n    random = Math.random() * 16 | 0;\n    if (i === 8 || i === 12 || i === 16 || i === 20) {\n      uuid += '-';\n    }\n\n    uuid += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16);\n  }\n\n  return uuid;\n}"
  },
  {
    "path": "packages/docs/src/server/graph/index.ts",
    "content": "import {\n  GraphQLObjectType,\n  GraphQLSchema,\n} from 'graphql';\n\nimport queries from './queries';\nimport mutations from './mutations';\n\nconst RootQuery: GraphQLObjectType = new GraphQLObjectType({\n  name: 'Query',\n  fields: () => queries,\n});\n\nconst RootMutation: GraphQLObjectType = new GraphQLObjectType({\n  name: 'Mutation',\n  fields: () => mutations,\n});\n\nexport default new GraphQLSchema({\n  query: RootQuery,\n  mutation: RootMutation,\n});\n"
  },
  {
    "path": "packages/docs/src/server/graph/mutations/comment/createComment.ts",
    "content": "import {\n  GraphQLNonNull,\n  GraphQLBoolean,\n} from 'graphql';\n\nimport types from '../../types';\nimport CommentModel from '../../../db/models/comment';\n\nexport default {\n  type: GraphQLBoolean,\n  args: {\n    data: {\n      type: new GraphQLNonNull(types.commentInputType),\n    },\n  },\n  async resolve(_, args, __) {\n    const model = new CommentModel(args.data);\n    const newComment = await model.save();\n    if (!newComment) {\n      throw new Error('Error saving comment');\n    }\n    return true;\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/mutations/comment/index.ts",
    "content": "import createComment from './createComment';\n\nexport default {\n  createComment,\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/mutations/index.ts",
    "content": "import commentMutations from './comment';\n\nexport default {\n  ...commentMutations,\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/comment/comment.ts",
    "content": "import {\n  GraphQLNonNull,\n  GraphQLID,\n} from 'graphql';\n\nimport types from '../../types/';\nimport CommentModel from '../../../db/models/comment';\n\nexport default {\n  type: types.commentType,\n  args: {\n    id: {\n      type: new GraphQLNonNull(GraphQLID),\n    },\n  },\n  resolve(_, args, __) {\n    return CommentModel\n      .findById(args.id)\n      .exec();\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/comment/comments.ts",
    "content": "import {\n  GraphQLList,\n  GraphQLNonNull,\n  GraphQLID,\n} from 'graphql';\nimport types from '../../types/';\nimport CommentModel from '../../../db/models/comment';\n\nexport default {\n  type: new GraphQLList(types.commentType),\n  args: {\n    postId: {\n      type: new GraphQLNonNull(GraphQLID),\n    },\n  },\n  resolve(_, args, __) {\n    return CommentModel\n      .find({\n        post: args.postId,\n      })\n      .exec();\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/comment/index.ts",
    "content": "import comment from './comment';\nimport comments from './comments';\n\nexport default {\n  comment,\n  comments,\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/index.ts",
    "content": "import posts from './post';\nimport comment from './comment';\n\nexport default {\n  ...posts,\n  ...comment,\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/post/index.ts",
    "content": "import post from './post';\nimport posts from './posts';\n\nexport default {\n  post,\n  posts,\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/post/post.ts",
    "content": "import {\n  GraphQLNonNull,\n  GraphQLID,\n} from 'graphql';\n\nimport types from '../../types';\nimport PostModel from '../../../db/models/post';\n\nexport default {\n  type: types.postType,\n  args: {\n    id: {\n      type: new GraphQLNonNull(GraphQLID),\n    },\n  },\n  resolve(_, args, __) {\n    return PostModel\n      .findById(args.id)\n      .populate('comments')\n      .exec();\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/queries/post/posts.ts",
    "content": "import {\n  GraphQLList,\n} from 'graphql';\n\nimport types from '../../types';\nimport PostModel from '../../../db/models/post';\n\nexport default {\n  type: new GraphQLList(types.postType),\n  args: {},\n  resolve() {\n    return PostModel\n      .find()\n      .exec();\n  },\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/schema.json",
    "content": "{\n  \"data\": {\n    \"__schema\": {\n      \"queryType\": {\n        \"name\": \"Query\"\n      },\n      \"mutationType\": null,\n      \"subscriptionType\": null,\n      \"types\": [\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Query\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"posts\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"Post\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Post\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"id\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"title\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"snippet\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"recommendations\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"Recommendation\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"tags\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"Tag\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"uniqueSlug\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"image\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"SCALAR\",\n          \"name\": \"String\",\n          \"description\": \"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Recommendation\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Tag\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"slug\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Schema\",\n          \"description\": \"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.\",\n          \"fields\": [\n            {\n              \"name\": \"types\",\n              \"description\": \"A list of all types supported by this server.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__Type\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"queryType\",\n              \"description\": \"The type that query operations will be rooted at.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"__Type\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"mutationType\",\n              \"description\": \"If this server supports mutation, the type that mutation operations will be rooted at.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"OBJECT\",\n                \"name\": \"__Type\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"subscriptionType\",\n              \"description\": \"If this server support subscription, the type that subscription operations will be rooted at.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"OBJECT\",\n                \"name\": \"__Type\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"directives\",\n              \"description\": \"A list of all directives supported by this server.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__Directive\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Type\",\n          \"description\": \"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\\n\\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.\",\n          \"fields\": [\n            {\n              \"name\": \"kind\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"ENUM\",\n                  \"name\": \"__TypeKind\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"fields\",\n              \"description\": null,\n              \"args\": [\n                {\n                  \"name\": \"includeDeprecated\",\n                  \"description\": null,\n                  \"type\": {\n                    \"kind\": \"SCALAR\",\n                    \"name\": \"Boolean\",\n                    \"ofType\": null\n                  },\n                  \"defaultValue\": \"false\"\n                }\n              ],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__Field\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"interfaces\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__Type\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"possibleTypes\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__Type\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"enumValues\",\n              \"description\": null,\n              \"args\": [\n                {\n                  \"name\": \"includeDeprecated\",\n                  \"description\": null,\n                  \"type\": {\n                    \"kind\": \"SCALAR\",\n                    \"name\": \"Boolean\",\n                    \"ofType\": null\n                  },\n                  \"defaultValue\": \"false\"\n                }\n              ],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__EnumValue\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"inputFields\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__InputValue\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ofType\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"OBJECT\",\n                \"name\": \"__Type\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"ENUM\",\n          \"name\": \"__TypeKind\",\n          \"description\": \"An enum describing what kind of type a given `__Type` is.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": [\n            {\n              \"name\": \"SCALAR\",\n              \"description\": \"Indicates this type is a scalar.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"OBJECT\",\n              \"description\": \"Indicates this type is an object. `fields` and `interfaces` are valid fields.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INTERFACE\",\n              \"description\": \"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"UNION\",\n              \"description\": \"Indicates this type is a union. `possibleTypes` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ENUM\",\n              \"description\": \"Indicates this type is an enum. `enumValues` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INPUT_OBJECT\",\n              \"description\": \"Indicates this type is an input object. `inputFields` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"LIST\",\n              \"description\": \"Indicates this type is a list. `ofType` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"NON_NULL\",\n              \"description\": \"Indicates this type is a non-null. `ofType` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"SCALAR\",\n          \"name\": \"Boolean\",\n          \"description\": \"The `Boolean` scalar type represents `true` or `false`.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Field\",\n          \"description\": \"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"args\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__InputValue\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"type\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"__Type\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"isDeprecated\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"deprecationReason\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__InputValue\",\n          \"description\": \"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"type\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"__Type\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"defaultValue\",\n              \"description\": \"A GraphQL-formatted string representing the default value for this input value.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__EnumValue\",\n          \"description\": \"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"isDeprecated\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"deprecationReason\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Directive\",\n          \"description\": \"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\\n\\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"locations\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"ENUM\",\n                      \"name\": \"__DirectiveLocation\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"args\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__InputValue\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"onOperation\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": true,\n              \"deprecationReason\": \"Use `locations`.\"\n            },\n            {\n              \"name\": \"onFragment\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": true,\n              \"deprecationReason\": \"Use `locations`.\"\n            },\n            {\n              \"name\": \"onField\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": true,\n              \"deprecationReason\": \"Use `locations`.\"\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"ENUM\",\n          \"name\": \"__DirectiveLocation\",\n          \"description\": \"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": [\n            {\n              \"name\": \"QUERY\",\n              \"description\": \"Location adjacent to a query operation.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"MUTATION\",\n              \"description\": \"Location adjacent to a mutation operation.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"SUBSCRIPTION\",\n              \"description\": \"Location adjacent to a subscription operation.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FIELD\",\n              \"description\": \"Location adjacent to a field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FRAGMENT_DEFINITION\",\n              \"description\": \"Location adjacent to a fragment definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FRAGMENT_SPREAD\",\n              \"description\": \"Location adjacent to a fragment spread.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INLINE_FRAGMENT\",\n              \"description\": \"Location adjacent to an inline fragment.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"SCHEMA\",\n              \"description\": \"Location adjacent to a schema definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"SCALAR\",\n              \"description\": \"Location adjacent to a scalar definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"OBJECT\",\n              \"description\": \"Location adjacent to an object type definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FIELD_DEFINITION\",\n              \"description\": \"Location adjacent to a field definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ARGUMENT_DEFINITION\",\n              \"description\": \"Location adjacent to an argument definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INTERFACE\",\n              \"description\": \"Location adjacent to an interface definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"UNION\",\n              \"description\": \"Location adjacent to a union definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ENUM\",\n              \"description\": \"Location adjacent to an enum definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ENUM_VALUE\",\n              \"description\": \"Location adjacent to an enum value definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INPUT_OBJECT\",\n              \"description\": \"Location adjacent to an input object type definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INPUT_FIELD_DEFINITION\",\n              \"description\": \"Location adjacent to an input object field definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"possibleTypes\": null\n        }\n      ],\n      \"directives\": [\n        {\n          \"name\": \"include\",\n          \"description\": \"Directs the executor to include this field or fragment only when the `if` argument is true.\",\n          \"locations\": [\n            \"FIELD\",\n            \"FRAGMENT_SPREAD\",\n            \"INLINE_FRAGMENT\"\n          ],\n          \"args\": [\n            {\n              \"name\": \"if\",\n              \"description\": \"Included when true.\",\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"defaultValue\": null\n            }\n          ]\n        },\n        {\n          \"name\": \"skip\",\n          \"description\": \"Directs the executor to skip this field or fragment when the `if` argument is true.\",\n          \"locations\": [\n            \"FIELD\",\n            \"FRAGMENT_SPREAD\",\n            \"INLINE_FRAGMENT\"\n          ],\n          \"args\": [\n            {\n              \"name\": \"if\",\n              \"description\": \"Skipped when true.\",\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"defaultValue\": null\n            }\n          ]\n        },\n        {\n          \"name\": \"deprecated\",\n          \"description\": \"Marks an element of a GraphQL schema as no longer supported.\",\n          \"locations\": [\n            \"FIELD_DEFINITION\",\n            \"ENUM_VALUE\"\n          ],\n          \"args\": [\n            {\n              \"name\": \"reason\",\n              \"description\": \"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).\",\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"defaultValue\": \"\\\"No longer supported\\\"\"\n            }\n          ]\n        }\n      ]\n    }\n  }\n}"
  },
  {
    "path": "packages/docs/src/server/graph/types/comment/comment.ts",
    "content": "import {\n  GraphQLObjectType,\n  GraphQLString,\n  GraphQLNonNull,\n  GraphQLID,\n} from 'graphql';\n\nexport default new GraphQLObjectType({\n  name: 'Comment',\n  fields: () => ({\n    author: { type: GraphQLString },\n    body: { type: GraphQLString },\n    post: { type: new GraphQLNonNull(GraphQLID) },\n  }),\n});\n"
  },
  {
    "path": "packages/docs/src/server/graph/types/comment/commentInput.ts",
    "content": "import {\n  GraphQLInputObjectType,\n  GraphQLString,\n  GraphQLID,\n  GraphQLNonNull,\n} from 'graphql';\n\nexport default new GraphQLInputObjectType({\n  name: 'CommentInput',\n  fields: () => ({\n    author: { type: GraphQLString },\n    body: { type: GraphQLString },\n    post: { type: new GraphQLNonNull(GraphQLID) },\n  }),\n});\n"
  },
  {
    "path": "packages/docs/src/server/graph/types/index.ts",
    "content": "import postType from './post/post';\nimport postInputType from './post/postInput';\nimport commentType from './comment/comment';\nimport commentInputType from './comment/commentInput';\n\nexport default {\n  postType,\n  postInputType,\n  commentType,\n  commentInputType,\n};\n"
  },
  {
    "path": "packages/docs/src/server/graph/types/post/post.ts",
    "content": "import {\n  GraphQLObjectType,\n  GraphQLList,\n  GraphQLString,\n  GraphQLID,\n} from 'graphql';\nimport commentType from '../comment/comment';\n\nexport default new GraphQLObjectType({\n  name: 'Post',\n  fields: () => ({\n    _id: { type: GraphQLID },\n    title: { type: GraphQLString },\n    content: { type: GraphQLString },\n    comments: { type: new GraphQLList(commentType) },\n    image: { type: GraphQLString },\n  }),\n});\n"
  },
  {
    "path": "packages/docs/src/server/graph/types/post/postInput.ts",
    "content": "import {\n  GraphQLInputObjectType,\n  GraphQLString,\n} from 'graphql';\n\nexport default new GraphQLInputObjectType({\n  name: 'PostInput',\n  fields: () => ({\n    title: { type: GraphQLString },\n    content: { type: GraphQLString },\n    image: { type: GraphQLString },\n  }),\n});\n"
  },
  {
    "path": "packages/docs/src/server/graphqlEntry.ts",
    "content": "import 'babel-polyfill';\nimport path from 'path';\nimport fs from 'fs';\nimport * as express from 'express';\nimport { graphql } from 'graphql';\nimport { introspectionQuery } from 'graphql/utilities';\nimport bodyParser from 'body-parser';\nimport cors from 'cors';\nimport { graphiqlExpress, graphqlExpress } from 'graphql-server-express';\nimport schema from './graph';\n\nfunction createSchema() {\n  return new Promise<string>((res, rej) => {\n    graphql(schema, introspectionQuery)\n      .then((json) => {\n        fs.writeFile(\n          path.join(__dirname, './graph/schema.json'),\n          JSON.stringify(json, null, 2),\n          (err) => {\n            if (err) {\n              rej(`Error occured while creating graphql schema. ${err}`);\n            }\n            res('Schema successfully created');\n          },\n        );\n      });\n  });\n}\n\nexport default function graphqlEntry(app): Promise<express.Application> {\n  return new Promise<express.Application>(async (res, rej) => {\n    app.use(bodyParser.json());\n    app.use(bodyParser.urlencoded({ extended: true }));\n    app.use('/api', cors(), graphqlExpress({\n      schema,\n    }));\n\n    app.use('/graphql-ui', graphiqlExpress({\n      endpointURL: '/api',\n    }));\n    await createSchema().catch((err) => rej(err));\n    res(app);\n  });\n};\n"
  },
  {
    "path": "packages/docs/src/server/index.tsx",
    "content": "import * as React from 'react';\nimport { ApolloClient, createNetworkInterface } from 'apollo-client';\nimport { renderToString, renderToStaticMarkup } from 'react-dom/server';\nimport { match, RouterContext } from 'react-router';\nimport morgan from 'morgan';\nimport express from 'express';\nimport compression from 'compression';\nimport path from 'path';\nimport { ThemeProvider } from 'styled-components';\nimport theme from '../client/theming';\nimport { ApolloProvider, getDataFromTree } from 'react-apollo';\nimport store from '../client/store';\nimport { routes } from '../client/routes';\nimport Html from '../client/components/Html';\nimport graphQlEntry from './graphqlEntry';\nimport 'isomorphic-fetch';\n\nconst env = require('node-env-file');\nenv(path.join(process.cwd(), '.env'));\nrequire('./db');\n\nconst styleSheet = require('styled-components/lib/models/StyleSheet');\nconst manifest = require('../../public/manifest.json');\n\nconst expressApp = express();\ngraphQlEntry(expressApp).then((app) => {\n  app.use(compression());\n\n  // Need to set this to your api url\n  const IP = process.env.IP || '0.0.0.0';\n  const PORT = process.env.PORT || 1338;\n  const API_URL = process.env.API_URL;\n  const apiUrl = API_URL || `http://${IP}:${PORT}/api`;\n  const debug = process.env.DEBUG === 'true' || false;\n  if (debug) {\n    app.use(morgan('combined'));\n  }\n  app.use('/public', express.static(path.join(__dirname, '../../public')));\n\n  app.use((req, res) => {\n    match({ routes, location: req.url },\n      (error, redirectLocation, renderProps) => {\n        if (redirectLocation) {\n          res.redirect(redirectLocation.pathname + redirectLocation.search);\n        } else if (error) {\n          console.error('ROUTER ERROR:', error); // eslint-disable-line no-console\n          res.status(500);\n        } else if (renderProps) {\n          const styles = !process.env.browser\n            ? styleSheet.rules().map((rule) => rule.cssText).join('\\n')\n            : null;\n\n          const networkInterface = createNetworkInterface({\n            uri: apiUrl,\n            opts: {\n              headers: req.headers,\n              credentials: 'same-origin',\n            },\n          });\n\n          const client = new ApolloClient({\n            networkInterface,\n            ssrMode: true,\n          });\n\n          const component = (\n            <ApolloProvider store={store} client={client}>\n              <ThemeProvider theme={theme}>\n                <RouterContext {...renderProps} />\n              </ThemeProvider>\n            </ApolloProvider>\n          );\n          getDataFromTree(component).then(() => {\n            const content = renderToString(component);\n            const state = { apollo: client.getInitialState() };\n            const html = (\n              <Html\n                content={content}\n                scriptHash={manifest['/main.js']}\n                vendorHash={manifest['/vendor.js']}\n                cssHash={manifest['/main.css']}\n                styles={styles}\n                state={state}\n              />\n            );\n            res.status(200).send(`<!doctype html>\\n${renderToStaticMarkup(html)}`);\n          }).catch((err) => console.error(`Server rendering error: ${err}`));\n        } else {\n          res.status(404).send('Not found');\n        }\n      });\n  });\n\n  app.listen(PORT, IP, (err) => {\n    if (err) {\n      throw err;\n    }\n    return console.info(`==> 😎 Listening on port ${PORT}. Open http://${IP}:${PORT} in your browser.`);\n  });\n})\n.catch((err) => console.error(err));\n"
  },
  {
    "path": "packages/docs/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \"src/client\",\n    \"module\": \"es6\",\n    \"target\": \"es6\",\n    \"moduleResolution\": \"node\",\n    \"allowSyntheticDefaultImports\": true,\n    \"noImplicitAny\": false,\n    \"sourceMap\": true,\n    \"outDir\": \"build/src\",\n    \"jsx\": \"preserve\",\n    \"allowJs\": true,\n    \"noUnusedLocals\": true,\n    \"paths\": {\n      \"components/*\": [\"./components/*\"],\n      \"containers/*\": [\"./containers/*\"],\n      \"test/*\": [\"./test/*\"],\n      \"shared/*\": [\"./shared/*\"],\n      \"root/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\n    \"src/**/*\"\n  ],\n  \"exclude\": [\n    \"node_modules\",\n    \"**/*.test.*\",\n    \"**/*.mock.*\"\n  ]\n}"
  },
  {
    "path": "packages/docs/webpack.config.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\nconst ROOT_PATH = path.resolve(__dirname);\n\nmodule.exports = {\n  devtool: 'cheap-module-source-map',\n  entry: [\n    'react-hot-loader/patch',\n    'webpack-hot-middleware/client',\n    './src/client/index.tsx'\n  ],\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'app.js',\n    publicPath: '/',\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.jsx'],\n    alias: {\n      components: path.resolve(ROOT_PATH, 'src/client/components'),\n      containers: path.resolve(ROOT_PATH, 'src/client/containers'),\n      test: path.resolve(ROOT_PATH, 'src/client/test'),\n      shared: path.resolve(ROOT_PATH, 'src/client/shared'),\n      root: path.resolve(ROOT_PATH, 'src/client/'),\n    },\n  },\n  module: {\n    rules: [\n      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: [path.join(__dirname, 'src'), path.resolve(__dirname, 'packages')] },\n      { test: /\\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'], include: path.join(__dirname, 'src') },\n      { test: /\\.css$/, loader: 'style-loader!css-loader' },\n      { test: /\\.json$/, loader: 'json-loader' },\n      { test: /\\.md$/, loader: 'html!markdown-loader' },\n    ],\n  },\n  plugins: [\n    new webpack.HotModuleReplacementPlugin(),\n  ]\n};\n"
  },
  {
    "path": "packages/docs/webpack.config.prod.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\nconst HtmlwebpackPlugin = require('html-webpack-plugin');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst autoprefixer = require('autoprefixer');\nconst precss = require('precss');\nconst ManifestPlugin = require('webpack-manifest-plugin');\n\nconst ROOT_PATH = path.resolve(__dirname);\n\nmodule.exports = {\n  devtool: 'source-map',\n  entry: {\n    main: [\n      './src/client/index.tsx'\n    ],\n    vendor: [\n      'react',\n      'react-dom',\n      'styled-components',\n      'react-redux',\n      'react-router',\n      'react-router-redux',\n      'react-markdown',\n      'redux-connect',\n      'redux',\n      'rxjs',\n      'axios',\n      'redux-logic',\n      'react-apollo',\n      'graphql-tag',\n      'apollo-client',\n    ]\n  },\n  output: {\n    path: path.resolve(ROOT_PATH, './build/public'),\n    publicPath: '/',\n    filename: '[name].[chunkhash].js',\n    chunkFilename: '[name].[chunkhash].chunk.js',\n  },\n  stats: {\n    chunks: true,\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.jsx'],\n    alias: {\n      components: path.resolve(ROOT_PATH, 'src/client/components'),\n      containers: path.resolve(ROOT_PATH, 'src/client/containers'),\n      shared: path.resolve(ROOT_PATH, 'src/client/shared'),\n      test: path.resolve(ROOT_PATH, 'src/client/test'),\n      root: path.resolve(ROOT_PATH, 'src/client/'),\n    },\n  },\n  module: {\n    loaders: [\n      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: [path.join(__dirname, 'src'), path.resolve(__dirname, 'packages')] },\n      { test: /\\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'], include: path.join(__dirname, 'src') },\n      {\n        test: /\\.css$/,\n        loader: ExtractTextPlugin.extract({\n          fallback: 'style-loader',\n          use: 'css-loader!postcss-loader'\n        }),\n      },\n      { test: /\\.json$/, loader: 'json-loader' },\n      { test: /\\.md$/, loader: 'html!markdown-loader' },\n    ]\n  },\n  plugins: [\n    new ManifestPlugin({\n      fileName: 'manifest.json',\n      basePath: '/'\n    }),\n    new ExtractTextPlugin('[name].[contenthash].css'),\n    new webpack.optimize.CommonsChunkPlugin({\n      name: 'vendor',\n      children: true,\n      minChunks: 2,\n      async: true,\n    }),\n    new webpack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),\n      'process.env.API_URL': JSON.stringify(process.env.API_URL || 'http://localhost:1338/api'),\n    }),\n    new webpack.optimize.OccurrenceOrderPlugin(true),\n    new webpack.LoaderOptionsPlugin({\n      debug: false,\n      minimize: true,\n      debug: false,\n      options: {\n        /**\n         * Legacy postCSS config\n         * @reference https://github.com/azat-io/webpack2-css-modules-demo/blob/master/scripts/webpack.config.babel.js\n         */\n        postcss: function () {\n         return {\n           defaults: [precss, autoprefixer],\n           cleaner:  [autoprefixer({ browsers: [] })]\n         };\n        },\n      }\n    }),\n  ]\n};\n"
  },
  {
    "path": "packages/docs/webpack.config.server.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\nconst ROOT_PATH = path.resolve(__dirname);\n\nmodule.exports = {\n  target: 'node',\n  entry: [\n    './src/server/index.tsx'\n  ],\n  output: {\n    path: path.resolve(__dirname, 'public'),\n    filename: '../build/server.js',\n    publicPath: '/public/',\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.jsx', '.css'],\n    alias: {\n      components: path.resolve(ROOT_PATH, 'build/src/client/components'),\n      containers: path.resolve(ROOT_PATH, 'build/src/client/containers'),\n      test: path.resolve(ROOT_PATH, 'build/src/client/test'),\n      shared: path.resolve(ROOT_PATH, 'build/src/client/shared'),\n      root: path.resolve(ROOT_PATH, 'build/src/client/'),\n    },\n  },\n  module: {\n    rules: [\n      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: [path.join(__dirname, 'src'), path.resolve(__dirname, 'packages')] },\n      { test: /\\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'], include: path.join(__dirname, 'src') },\n      { test: /\\.css$/, loader: 'style-loader!css-loader' },\n      { test: /\\.json$/, loader: 'json-loader' },\n      { test: /\\.md$/, loader: 'html!markdown-loader' },\n    ],\n  },\n  plugins: [\n    new webpack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),\n      'process.env.API_URL': JSON.stringify(process.env.API_URL || 'http://localhost:1338/api'),\n    }),\n  ]\n};\n"
  },
  {
    "path": "packages/openui/package.json",
    "content": "{\n  \"name\": \"openui\",\n  \"version\": \"1.0.4\",\n  \"description\": \"An open ui kit made with React and TypeScript\",\n  \"main\": \"dist/index.js\",\n  \"types\": \"dist/index.d.ts\",\n  \"repository\": \"https://github.com/scalable-react/scalable-react-typescript-boilerplate\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"prepublish\": \"rimraf dist && tsc\"\n  },\n  \"dependencies\": {\n    \"github-markdown-css\": \"^2.4.1\",\n    \"react\": \"^15.4.2\",\n    \"react-dom\": \"^15.4.2\",\n    \"react-markdown\": \"^2.4.5\",\n    \"rimraf\": \"^2.6.1\",\n    \"styled-components\": \"^1.4.4\"\n  },\n  \"devDependencies\": {\n    \"yarn\": \"^0.21.3\",\n    \"typescript\": \"^2.2.1\"\n  }\n}\n"
  },
  {
    "path": "packages/openui/src/Anchor/__tests__/__mocks__/anchorMocks.mock.ts",
    "content": "export const hrefProps = {\n  href: 'https://github.com/RyanCCollins/scalable-react-ts-boilerplate',\n  label: 'Scalable React',\n  color: '#fff',\n};\n\nexport default {\n  path: '/docs',\n  label: 'Docs',\n  color: '#fff',\n};\n"
  },
  {
    "path": "packages/openui/src/Anchor/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Anchor /> should render href props 1`] = `\n<Anchor\n  color=\"#fff\"\n  href=\"https://github.com/RyanCCollins/scalable-react-ts-boilerplate\"\n  label=\"Scalable React\"\n  method=\"push\"\n/>\n`;\n\nexports[`<Anchor /> should render path props 1`] = `\n<Anchor\n  color=\"#fff\"\n  label=\"Docs\"\n  method=\"push\"\n  path=\"/docs\"\n/>\n`;\n\nexports[`<Anchor /> should render with children 1`] = `\n<Anchor\n  method=\"push\"\n  path=\"/about\"\n>\n  About 👶\n</Anchor>\n`;\n\nexports[`<Anchor /> should render with default props 1`] = `\n<Anchor\n  method=\"push\"\n/>\n`;\n"
  },
  {
    "path": "packages/openui/src/Anchor/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Anchor from '../';\nimport pathProps, { hrefProps } from './__mocks__/anchorMocks.mock';\n\ndescribe('<Anchor />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Anchor />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render path props', () => {\n    const wrapper = shallow(\n      <Anchor {...pathProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render href props', () => {\n    const wrapper = shallow(\n      <Anchor {...hrefProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with children', () => {\n    const wrapper = shallow(\n      <Anchor path=\"/about\">\n        About 👶\n      </Anchor>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Anchor/index.tsx",
    "content": "import * as React from 'react';\nimport { withRouter, InjectedRouter } from 'react-router';\nimport Component from './styles';\n\nconst MethodTypePush = 'push';\nconst MethodTypeReplace = 'replace';\nexport type Method = 'push' | 'replace';\nexport interface Props extends React.Props<typeof Anchor> {\n  path?: string;\n  plain?: boolean;\n  href?: string;\n  label?: string;\n  color?: string;\n  method?: Method;\n  router?: InjectedRouter;\n}\n\nexport class Anchor extends React.Component<Props, undefined> {\n  public static defaultProps: Props = {\n    method: MethodTypePush,\n  };\n\n  private handleClick = (e: React.MouseEvent<HTMLAnchorElement>): void => {\n    const { method, path, router } = this.props;\n    if (path) {\n      e.preventDefault();\n      if (method === MethodTypePush) {\n        router.push(path);\n      } else if (method === MethodTypeReplace) {\n        router.replace(path);\n      }\n    }\n  }\n\n  public render() {\n    const {\n      label,\n      children,\n      color,\n      href,\n      plain,\n    } = this.props;\n\n    return (\n      <Component\n        plain={plain}\n        href={href}\n        color={color}\n        onClick={this.handleClick}\n      >\n        {label || children}\n      </Component>\n    );\n  }\n}\n\nexport default withRouter(Anchor);\n"
  },
  {
    "path": "packages/openui/src/Anchor/styles.ts",
    "content": "import styled, { css } from 'styled-components';\nimport { Props } from './types';\n\nconst plainStyle = (plain: boolean) => {\n  if (plain) {\n    return css`\n      cursor: pointer;\n      line-height: inherit;\n      text-decoration: inherit;\n    `;\n  }\n  return css`\n    text-decoration: underline;\n    line-height: inherit;\n    cursor: pointer;\n  `;\n};\n\nconst colorStyle = (color: string) => {\n  if (color) {\n    return css`\n      color: ${color};\n    `;\n  }\n  return null;\n};\n\nexport default styled.a`\n  font-size: 1.1875rem;\n  line-height: 24px;\n  font-weight: 400;\n  ${(props: Props) => colorStyle(props.color)}\n  ${(props: Props) => plainStyle(props.plain || false)}\n`;\n"
  },
  {
    "path": "packages/openui/src/Anchor/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/openui/src/Article/__tests__/__mocks__/articleMocks.mock.ts",
    "content": "export default {\n  pad: 'medium',\n  size: 'large',\n  backgroundColor: '#f5f5f5',\n};\n"
  },
  {
    "path": "packages/openui/src/Article/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Article /> should render with content 1`] = `\n<styled.article\n  backgroundColor=\"#f5f5f5\"\n  className=\"markdown-body\"\n  pad=\"medium\"\n  size=\"large\"\n>\n  <Markdown\n    content=\"# Awesome\"\n  />\n</styled.article>\n`;\n\nexports[`<Article /> should render with default props 1`] = `\n<styled.article\n  className=\"markdown-body\"\n/>\n`;\n\nexports[`<Article /> should render with default props and children 1`] = `\n<styled.article\n  className=\"markdown-body\"\n>\n  👶👶👶\n</styled.article>\n`;\n\nexports[`<Article /> should render with different props 1`] = `\n<styled.article\n  backgroundColor=\"#f5f5f5\"\n  className=\"markdown-body\"\n  pad=\"medium\"\n  size=\"large\"\n>\n  👶👶👶\n</styled.article>\n`;\n"
  },
  {
    "path": "packages/openui/src/Article/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Article from '../';\nimport props from './__mocks__/articleMocks.mock';\n\ndescribe('<Article />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Article />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with default props and children', () => {\n    const wrapper = shallow(\n      <Article>\n        👶👶👶\n      </Article>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with different props', () => {\n    const wrapper = shallow(\n      <Article {...props}>\n        👶👶👶\n      </Article>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with content', () => {\n    const wrapper = shallow(\n      <Article {...props} content=\"# Awesome\" />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Article/index.tsx",
    "content": "import * as React from 'react';\nimport { Markdown } from '../';\nimport Component from './styles';\nimport BoxProps from '../Box/types';\n\nexport interface Props extends BoxProps {\n  content?: string;\n  children?: JSX.Element;\n}\nexport default function Article({\n  content,\n  children,\n  ...rest,\n}: Props) {\n  return (\n    <Component {...rest} className=\"markdown-body\">\n      {content && typeof content === 'string' &&\n        <Markdown content={content} />\n      }\n      {children}\n    </Component>\n  );\n}\n"
  },
  {
    "path": "packages/openui/src/Article/styles.ts",
    "content": "import styled from 'styled-components';\nimport {\n  BoxStyles,\n  Props,\n} from '../Box/styles';\n\nexport { Props }\nexport default styled.article`\n  ${BoxStyles}\n  box-shadow: 0 2px 4px 0 rgba(46, 61, 73, 0.2);\n  border: 1px solid #dbe2e8;\n`;\n"
  },
  {
    "path": "packages/openui/src/Article/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/openui/src/Avatar/__tests__/__mocks__/avatarMocks.mock.ts",
    "content": "export default {\n  src: 'https://avatars3.githubusercontent.com/u/19292575',\n  name: 'Abhishek Ghosh',\n};\n"
  },
  {
    "path": "packages/openui/src/Avatar/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Avatar {...props} /> should render with default props 1`] = `\n<div\n  className=\"cTUymG\"\n  name=\"Abhishek Ghosh\"\n  src=\"https://avatars3.githubusercontent.com/u/19292575\"\n/>\n`;\n\nexports[`<Avatar {...props} /> should render with large size 1`] = `\n<div\n  className=\"fvqFji\"\n  name=\"Abhishek Ghosh\"\n  size=\"large\"\n  src=\"https://avatars3.githubusercontent.com/u/19292575\"\n/>\n`;\n\nexports[`<Avatar {...props} /> should render with medium size 1`] = `\n<div\n  className=\"cTUymG\"\n  name=\"Abhishek Ghosh\"\n  size=\"medium\"\n  src=\"https://avatars3.githubusercontent.com/u/19292575\"\n/>\n`;\n\nexports[`<Avatar {...props} /> should render with small size 1`] = `\n<div\n  className=\"iqQnQy\"\n  name=\"Abhishek Ghosh\"\n  size=\"small\"\n  src=\"https://avatars3.githubusercontent.com/u/19292575\"\n/>\n`;\n\nexports[`<Avatar {...props} /> should render with thumb size 1`] = `\n<div\n  className=\"dzEFZt\"\n  name=\"Abhishek Ghosh\"\n  size=\"thumb\"\n  src=\"https://avatars3.githubusercontent.com/u/19292575\"\n/>\n`;\n"
  },
  {
    "path": "packages/openui/src/Avatar/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Avatar from '../';\nimport props from './__mocks__/avatarMocks.mock';\n\ndescribe('<Avatar {...props} />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Avatar {...props} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with thumb size', () => {\n    const wrapper = shallow(\n      <Avatar {...props} size=\"thumb\" />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with small size', () => {\n    const wrapper = shallow(\n      <Avatar {...props} size=\"small\" />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with medium size', () => {\n    const wrapper = shallow(\n      <Avatar {...props} size=\"medium\" />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with large size', () => {\n    const wrapper = shallow(\n      <Avatar {...props} size=\"large\" />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Avatar/default.ts",
    "content": "// tslint:disable\nexport default 'https://cloud.githubusercontent.com/assets/13810084/23538009/f9e348ae-ff9d-11e6-9f7a-485e8247a026.png';"
  },
  {
    "path": "packages/openui/src/Avatar/index.tsx",
    "content": "import { AvatarStyle } from './styles';\nimport styled, { ThemeProps } from 'styled-components';\n\nexport { ThemeProps };\nexport type ImageSize = 'thumb' | 'small' | 'medium' | 'large';\nexport interface Props {\n  src: string;\n  name?: string;\n  size?: ImageSize;\n}\n\nconst Avatar = styled.div`\n${AvatarStyle}\n`;\n\nexport default Avatar;\n"
  },
  {
    "path": "packages/openui/src/Avatar/maps.ts",
    "content": "export default {\n  thumb: 50,\n  small: 100,\n  medium: 150,\n  large: 250,\n};\n"
  },
  {
    "path": "packages/openui/src/Avatar/styles.ts",
    "content": "import { css, InterpolationFunction, ThemeProps } from 'styled-components';\nimport remStringFromPx from '../utils';\nimport map from './maps';\nimport { Props } from './index';\nimport defaultUrl from './default';\n\nconst propsToSize = ({ size }: Props) => {\n  const imageSize = size || 'medium';\n  const px = map[imageSize];\n  const rem = remStringFromPx(px);\n  return css`\n    width: ${rem};\n    min-height: ${rem};\n  `;\n};\n\nexport { InterpolationFunction, ThemeProps };\nexport const AvatarStyle = css`\n  background: url(${({ src }: Props) => src || defaultUrl});\n  background-size: cover;\n  background-position: center;\n  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 50%;\n  ${propsToSize}\n`;\n"
  },
  {
    "path": "packages/openui/src/Avatar/types.ts",
    "content": "export { Props, ImageSize } from './index';\n"
  },
  {
    "path": "packages/openui/src/Box/__tests__/__mocks__/boxMocks.mock.ts",
    "content": "export default {\n  pad: 'medium',\n  size: 'large',\n};\n"
  },
  {
    "path": "packages/openui/src/Box/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Box /> should render with default props 1`] = `\n<styled.div>\n  <div />\n</styled.div>\n`;\n\nexports[`<Box /> should render with different props 1`] = `\n<styled.div\n  pad=\"medium\"\n  size=\"large\"\n>\n  <div />\n</styled.div>\n`;\n"
  },
  {
    "path": "packages/openui/src/Box/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Box from '../';\nimport props from './__mocks__/boxMocks.mock';\n\ndescribe('<Box />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Box>\n        <div />\n      </Box>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with different props', () => {\n    const wrapper = shallow(\n      <Box {...props}>\n        <div />\n      </Box>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Box/index.tsx",
    "content": "import * as React from 'react';\nimport Component from './styles';\nimport Props from './types';\n\nexport default function Box({\n  children,\n  ...rest,\n}: Props): JSX.Element {\n  return (\n    <Component {...rest}>\n      {children || null}\n    </Component>\n  );\n};\n"
  },
  {
    "path": "packages/openui/src/Box/maps.ts",
    "content": "export const SIZE_MAP = {\n  none: 0,\n  small: 12,\n  medium: 24,\n  large: 48,\n  xlarge: 96,\n};\n\nexport const BOX_SIZE_MAP = {\n  xxsmall: 48,\n  xsmall: 96,\n  small: 192,\n  medium: 384,\n  large: 576,\n  xlarge: 720,\n  xxlarge: 960,\n};\n\nexport const BREAKPOINTS = {\n  phone: 480,\n  tablet: 768,\n  desktop: 1024,\n};\n"
  },
  {
    "path": "packages/openui/src/Box/styleUtils.ts",
    "content": "import { css, InterpolationFunction, ThemeProps } from 'styled-components';\nimport Props from './types';\nimport { BREAKPOINTS } from './maps';\nimport {\n  Size,\n  SizeObject,\n  ResponsiveSize,\n  Breakpoint,\n  BoxSize,\n  BoxSizeObject,\n  Full,\n  WrapOption,\n  SizeStyle,\n  Rem,\n  Px,\n} from './types';\nimport { SIZE_MAP, BOX_SIZE_MAP } from './maps';\n\nconst rootRem: number = 16;\nconst remFromPX = (px: Px): Rem => (px / rootRem);\n\nexport function calculateFlexWrap(wrap?: boolean, reverse?: boolean): WrapOption {\n  if (wrap && reverse) {\n    return 'wrap-reverse';\n  } else if (wrap && !reverse) {\n    return 'wrap';\n  } else {\n    return 'nowrap';\n  }\n}\n\nexport function sizeToString(size: Size | SizeObject, smallSize: boolean = false): string {\n  let returnVal;\n  if (typeof size === 'string') {\n    returnVal = `${remFromPX(SIZE_MAP[size])}rem`;\n  } else if (typeof size === 'object') {\n    const horizontal = size.horizontal || 'none';\n    const vertical = size.vertical || 'none';\n    returnVal = `${remFromPX(SIZE_MAP[vertical])}rem ${remFromPX(SIZE_MAP[horizontal])}rem`;\n  } else {\n    returnVal = `0rem`;\n  }\n  return returnVal;\n}\n\nfunction stringBoxStyle(size: BoxSize): SizeStyle {\n  if (size === 'full') {\n    return {\n      width: '100vw',\n      height: 'auto',\n    };\n  } else {\n    return {\n      width: size ? `${remFromPX(BOX_SIZE_MAP[size])}rem` : '',\n      height: size ? `${remFromPX(BOX_SIZE_MAP[size])}rem` : '',\n    };\n  }\n}\n\nfunction objectBoxStyle(size: BoxSizeObject): SizeStyle {\n  let width = 'auto';\n  let height = 'auto';\n  if (size.vertical) {\n    height = size.vertical === 'full'\n      ? '100vh'\n      : `${remFromPX(BOX_SIZE_MAP[size.vertical])}rem`;\n  }\n  if (size.horizontal) {\n    width = size.horizontal === 'full'\n      ? '100vw'\n      : `${remFromPX(BOX_SIZE_MAP[size.horizontal])}rem`;\n  }\n  return {\n    width,\n    height,\n  };\n}\n\nexport function boxSizeToStyle(size: BoxSize | BoxSizeObject): SizeStyle {\n  if (typeof size === 'string') {\n    return stringBoxStyle(size);\n  } else if (typeof size === 'object') {\n    return objectBoxStyle(size);\n  } else {\n    return { width: 'auto', height: 'auto' };\n  }\n}\n\nexport function calculateFullStyle(full: Full, postFix: 'vw' | 'vh'): string {\n  if (typeof full === 'object') {\n    if (postFix === 'vw') {\n      return full.horizontal ? `100${postFix}` : 'auto';\n    } else {\n      return full.vertical ? `100${postFix}` : 'auto';\n    }\n  } else if (typeof full === 'boolean') {\n    return full ? `100${postFix}` : 'auto';\n  }\n  return 'auto';\n}\n\nexport { InterpolationFunction, ThemeProps };\nexport const breakPointCss = (breakPoint: Breakpoint) => {\n  const selector = breakPoint === 'desktop' ? 'min-width' : 'max-width';\n  return css`\n    @media screen and (${selector}: ${BREAKPOINTS.phone}) {\n      padding: ${({ pad }: Props) => sizeToString(pad)};\n    }\n  `;\n};\n\nexport const breakPoints = (size: ResponsiveSize) => {\n  if (size.desktop || size.mobile || size.tablet) {\n    const css = Object.keys(size).map((key) =>\n      breakPointCss(key as Breakpoint),\n    ).join('; \\n');\n    return css;\n  }\n  return '';\n};\n"
  },
  {
    "path": "packages/openui/src/Box/styles.ts",
    "content": "import styled, { css, InterpolationFunction, ThemeProps } from 'styled-components';\nimport Props from './types';\nimport {\n  calculateFlexWrap,\n  calculateFullStyle,\n  sizeToString,\n  boxSizeToStyle,\n} from './styleUtils';\n\nexport { ThemeProps, Props, InterpolationFunction };\nexport const BoxStyles = css`\n  display: flex;\n  background-color: ${({ backgroundColor }: Props) => backgroundColor || 'transparent'};\n  justify-content: ${({ justifyContent }: Props) => justifyContent || 'flex-start'};\n  align-items: ${({ alignItems }: Props) => alignItems || 'flex-start'};\n  flex-direction: ${({ flexDirection }: Props) => flexDirection || 'column'};\n  flex-wrap: ${({ flexWrap, reverse }: Props) => calculateFlexWrap(flexWrap, reverse)};\n  padding: ${({ pad }: Props) => sizeToString(pad)};\n  margin: ${({ margin }: Props) => sizeToString(margin)};\n  width: ${({ boxSize }: Props) => boxSizeToStyle(boxSize).width};\n  height: ${({ boxSize }: Props) => boxSizeToStyle(boxSize).height};\n  flex-basis: auto;\n  min-height: ${({ full }: Props) => calculateFullStyle(full, 'vh')};\n  min-width: ${({ full }: Props) => calculateFullStyle(full, 'vw')};\n  cursor: ${({ selectable }: Props) => selectable ? 'pointer' : 'inherit'};\n`;\n\nexport default styled.div`\n  ${BoxStyles}\n`;\n"
  },
  {
    "path": "packages/openui/src/Box/types.ts",
    "content": "export type Size = 'none' | 'small' | 'medium' | 'large' | 'xlarge';\nexport interface SizeObject { horizontal?: Size; vertical?: Size; };\nexport type Breakpoint = 'mobile' | 'tablet' | 'desktop';\nexport interface ResponsiveSize {\n  mobile?: Size | SizeObject,\n  tablet?: Size | SizeObject,\n  desktop?: Size | SizeObject,\n}\nexport type BoxSize =  'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'full';\nexport interface BoxSizeObject { horizontal?: BoxSize; vertical?: BoxSize; };\nexport interface FullObject { horizontal?: boolean; vertical?: boolean; };\nexport type Full = boolean | FullObject;\nexport type WrapOption = 'wrap' | 'wrap-reverse' | 'nowrap';\nexport type Rem = number;\nexport type Px = number;\n\nexport interface SizeStyle {\n  height: string;\n  width: string;\n}\n\nexport interface Props {\n  alignItems?: 'flex-start' | 'center' | 'flex-end' | 'baseline' | 'stretch';\n  flexDirection?: 'row' | 'column';\n  justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';\n  flexWrap?: boolean;\n  reverse?: boolean;\n  boxSize?: BoxSize | BoxSizeObject;\n  pad?: Size | SizeObject;\n  children?: JSX.Element;\n  margin?: Size | SizeObject;\n  backgroundColor?: string;\n  backgroundImage?: string;\n  full?: Full;\n  selectable?: boolean;\n  style?: {};\n  className?: string;\n};\n\nexport default Props;\n"
  },
  {
    "path": "packages/openui/src/Button/__tests__/__mocks__/buttonMocks.mock.ts",
    "content": "export const buttonProps = {\n  color: 'blue',\n  backgroundColor: '#ffffff',\n  borderColor: '#000000',\n  size: 300,\n};\n"
  },
  {
    "path": "packages/openui/src/Button/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Button /> default should render a plain button with default props 1`] = `\n<styled.button>\n  Button Text\n</styled.button>\n`;\n\nexports[`<Button /> default should render a plain button with other props 1`] = `\n<styled.button>\n  Button Text\n</styled.button>\n`;\n"
  },
  {
    "path": "packages/openui/src/Button/__tests__/index.test.tsx",
    "content": "import { shallow, mount } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Button from '../';\nimport { buttonProps } from './__mocks__/buttonMocks.mock';\n\ndescribe('<Button /> default', () => {\n  it('should render a plain button with default props', () => {\n    const wrapper = shallow(\n      <Button>\n        Button Text\n      </Button>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a plain button with other props', () => {\n    const wrapper = shallow(\n      <Button {...buttonProps}>\n        Button Text\n      </Button>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n\ndescribe('onClick event for plain button', () => {\n  let mockFunction;\n  let button;\n\n  beforeEach(() => {\n    mockFunction = jest.fn();\n    button = mount(\n      <Button onClick={mockFunction}>\n        Button Text\n      </Button>,\n    );\n  });\n\n  it('Button requires onClick prop', () => {\n    expect(button.props().onClick).toBeDefined();\n  });\n\n  it('Button renders button', () => {\n    const renderedButton = button.find('button').first();\n    expect(renderedButton).toBeDefined();\n  });\n\n  it('Button click calls mockFunction', () => {\n    const renderedButton = button.find('button').first();\n    renderedButton.simulate('click');\n    expect(mockFunction).toBeCalled();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Button/index.tsx",
    "content": "import * as React from 'react';\nimport { Anchor } from '../';\nimport ButtonComponent from './styles';\nimport { Size } from './types';\n\n// This is so that the onClick handler is accepted without type interferance\nexport interface Props extends React.HTMLProps<HTMLButtonElement & typeof Button> {\n  color?: string;\n  backgroundColor?: string;\n  fontSize?: Size;\n  borderColor?: string;\n  label?: string;\n  path?: string;\n}\n\nexport class Button extends React.Component<Props, undefined> {\n  public static defaultProps: Props = {\n    color: '#fefefe',\n    backgroundColor: '#c05b4d',\n    borderColor: '#732419',\n    fontSize: 'medium',\n  };\n  public render() {\n    const { children, label, path } = this.props;\n    const button = (\n      <ButtonComponent\n        onClick={this.props.onClick}\n      >\n        {children || label || ''}\n      </ButtonComponent>\n    );\n    if (path && path !== '') {\n      return (\n        <Anchor path={path} plain>\n          {button}\n        </Anchor>\n      );\n    }\n    return button;\n  }\n}\n\nexport default Button;\n"
  },
  {
    "path": "packages/openui/src/Button/maps.ts",
    "content": "export const sizeMap = {\n  xsmall: 10,\n  small: 12,\n  medium: 16,\n  large: 20,\n  xlarge: 24,\n};\n"
  },
  {
    "path": "packages/openui/src/Button/styles.ts",
    "content": "import styled from 'styled-components';\nimport remStringFromPX from '../utils';\nimport { sizeMap } from './maps';\nimport { Props } from './';\n\nexport default styled.button`\n  text-align: center;\n  background-color: ${(props: Props) => props.backgroundColor};\n  color: ${(props: Props) => props.color};\n  font-size: ${(props: Props) => remStringFromPX(sizeMap[props.fontSize])};\n  border: ${(props: Props) => props.borderColor ? `3px solid ${props.borderColor}` : 'none'};\n  color: white;\n  padding: 15px 32px;\n  text-align: center;\n  text-decoration: none;\n  display: inline-block;\n  cursor: pointer;\n`;\n"
  },
  {
    "path": "packages/openui/src/Button/types.ts",
    "content": "import { Props } from './';\n\nexport { Props };\nexport type Size = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n"
  },
  {
    "path": "packages/openui/src/Footer/__tests__/__mocks__/footerMocks.mock.ts",
    "content": "export default {\n  color: '#0b0b0b',\n};\n"
  },
  {
    "path": "packages/openui/src/Footer/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Footer /> should render with default props 1`] = `\n<styled.footer\n  color=\"#0a0a0a\"\n>\n  <div />\n</styled.footer>\n`;\n\nexports[`<Footer /> should render with different props 1`] = `\n<styled.footer\n  color=\"#0b0b0b\"\n>\n  <div />\n</styled.footer>\n`;\n"
  },
  {
    "path": "packages/openui/src/Footer/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Footer from '../';\nimport props from './__mocks__/footerMocks.mock';\n\ndescribe('<Footer />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Footer>\n        <div />\n      </Footer>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with different props', () => {\n    const wrapper = shallow(\n      <Footer {...props}>\n        <div />\n      </Footer>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Footer/index.tsx",
    "content": "import * as React from 'react';\nimport { FooterComponent } from './styles';\n\nexport interface Props extends React.Props<typeof Footer> {\n  color?: string;\n}\nexport default function Footer({\n  color,\n  children,\n}: Props): JSX.Element {\n  const colorProp = color || '#0a0a0a';\n  return (\n    <FooterComponent color={colorProp}>\n      {children}\n    </FooterComponent>\n  );\n};\n"
  },
  {
    "path": "packages/openui/src/Footer/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const FooterComponent = styled.footer`\n  background: ${(props) => props.color};\n  height: auto;\n  min-height: 100px;\n  width: 100%;\n`;\n"
  },
  {
    "path": "packages/openui/src/Footer/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/openui/src/Header/header.tsx",
    "content": "import * as React from 'react';\nimport styled from 'styled-components';\nimport headerStyles from './styles';\n\nexport interface Props {\n  backgroundColor?: string;\n  state?: string;\n  height: number;\n}\n\nconst HeaderComponent = styled.header`\n  ${headerStyles()}\n`;\n\nexport default function Header(props: Props): JSX.Element {\n  return (\n    <HeaderComponent {...props} />\n  );\n}\n"
  },
  {
    "path": "packages/openui/src/Header/index.tsx",
    "content": "import * as React from 'react';\nimport HeaderComponent from './header';\nimport getNextState, { HeaderState } from './utils';\n\nexport interface Props {\n  backgroundColor?: string;\n}\n\nexport interface State {\n  headerState: HeaderState;\n}\n\nexport default class Header extends React.Component<Props, State> {\n  public constructor() {\n    super();\n    this.handleScroll = this.handleScroll.bind(this);\n    this.backgroundColor = this.backgroundColor.bind(this);\n    this.state = {\n      headerState: {\n        state: 'Pinned',\n        position: 0,\n        height: 0,\n      },\n    };\n  }\n  public componentDidMount() {\n    if (typeof window !== 'undefined') {\n      window.addEventListener('scroll', this.handleScroll);\n    }\n  }\n  public componentWillUnmount() {\n    if (typeof window !== 'undefined') {\n      window.removeEventListener('scroll', this.handleScroll);\n    }\n  }\n  private handleScroll() {\n    const header = document.getElementsByTagName('header')[0];\n    const nextState = getNextState(window, header, this.state.headerState);\n    this.setState({\n      headerState: nextState,\n    });\n  }\n  private backgroundColor() {\n    const header = document.getElementsByTagName('header')[0];\n    if (typeof window !== 'undefined' && typeof header !== 'undefined') {\n      const isDocked = window.pageYOffset <= header.clientHeight + 100;\n      return !isDocked\n        ? '#0a0a0a'\n        : 'transparent';\n    }\n    return '';\n  }\n  public render() {\n    const {\n      children,\n      ...rest,\n    } = this.props;\n    const backgroundColor = this.backgroundColor();\n    return (\n      <HeaderComponent\n        {...rest}\n        backgroundColor={backgroundColor}\n        height={this.state.headerState.height}\n        state={this.state.headerState.state}\n      >\n        {children}\n      </HeaderComponent>\n    );\n  }\n}\n"
  },
  {
    "path": "packages/openui/src/Header/styles.ts",
    "content": "import { css, InterpolationFunction, ThemeProps } from 'styled-components';\nimport { HeaderComponentProps, Props } from './types';\n\nexport function translateStyle({ state, height }: HeaderComponentProps) {\n  const translate = state === 'Pinned' ? 0 : -height;\n  return css`\n    transform: translate3d(0px, ${translate}px, 0px);\n  `;\n}\n\nexport { InterpolationFunction, ThemeProps };\nexport type OwnProps = Props & HeaderComponentProps;\nexport default function headerStyles() {\n  return css`\n    ${(props: OwnProps) => translateStyle(props)}\n    padding: 20px;\n    position: fixed;\n    top: 0;\n    right: 0;\n    left: 0;\n    z-index: 8;\n    width: 100%;\n    will-change: transform;\n    transition: transform 600ms ease, background-color 600ms ease, height 600ms ease;\n    background-color: ${(props: OwnProps) => props.backgroundColor || 'rgba(245,245,245,.95)'};\n  `;\n}\n"
  },
  {
    "path": "packages/openui/src/Header/types.ts",
    "content": "export { Props } from './';\nexport { Props as HeaderComponentProps } from './header';\n"
  },
  {
    "path": "packages/openui/src/Header/utils.ts",
    "content": "export type State = 'Pinned' | 'Unpinned';\nexport interface HeaderState {\n  state: State;\n  position: number;\n  height: number;\n}\n\nexport type GetHeaderState = (\n  w: Window,\n  header: HTMLElement,\n  currentState: HeaderState,\n) => HeaderState;\nconst getHeaderState: GetHeaderState = (\n  w,\n  header,\n  currentState,\n) => {\n  if (typeof w !== 'undefined') {\n    const currentPosition = w.pageYOffset;\n    const headerHeight = header.offsetHeight;\n    let nextState: State = 'Unpinned';\n    if (currentPosition < headerHeight &&\n      (currentPosition === 0 || currentPosition > currentState.position)\n    ) {\n      nextState = 'Pinned';\n    } else if (currentPosition < currentState.position) {\n      nextState = 'Pinned';\n    } else if (currentPosition > currentState.position) {\n      nextState = 'Unpinned';\n    }\n    return {\n      state: nextState,\n      position: currentPosition,\n      height: header.clientHeight,\n    };\n  }\n  return currentState;\n};\n\nexport default getHeaderState;\n"
  },
  {
    "path": "packages/openui/src/Heading/__tests__/__mocks__/headingProps.mock.ts",
    "content": "import { Margin, HeadingProps } from '../../types';\nconst margin: Margin = 'none';\n\nexport const h2Props: HeadingProps = {\n  tag: 'h2',\n  upcase: false,\n  truncate: true,\n  textAlign: 'left',\n  color: '#333',\n  margin,\n};\n\nexport const h3Props: HeadingProps = {\n  tag: 'h3',\n  upcase: false,\n  truncate: true,\n  textAlign: 'left',\n  color: '#333',\n  margin,\n};\n\nexport const h4Props: HeadingProps = {\n  tag: 'h4',\n  upcase: false,\n  truncate: true,\n  textAlign: 'left',\n  color: '#333',\n  margin,\n};\n\nexport const h5Props: HeadingProps = {\n  tag: 'h5',\n  upcase: false,\n  truncate: true,\n  textAlign: 'left',\n  color: '#333',\n  margin,\n};\n"
  },
  {
    "path": "packages/openui/src/Heading/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Heading /> should render with default props 1`] = `\n<styled.h1\n  color=\"#666\"\n  margin=\"medium\"\n  tag=\"h1\"\n  textAlign=\"center\"\n  truncate={false}\n  upcase={false}\n>\n  Test\n</styled.h1>\n`;\n\nexports[`<Heading /> should render with h2 props 1`] = `\n<styled.h2\n  color=\"#333\"\n  margin=\"none\"\n  tag=\"h2\"\n  textAlign=\"left\"\n  truncate={true}\n  upcase={false}\n>\n  Test\n</styled.h2>\n`;\n\nexports[`<Heading /> should render with h3 props 1`] = `\n<styled.h3\n  color=\"#333\"\n  margin=\"none\"\n  tag=\"h3\"\n  textAlign=\"left\"\n  truncate={true}\n  upcase={false}\n>\n  Test\n</styled.h3>\n`;\n\nexports[`<Heading /> should render with h4 props 1`] = `\n<styled.h4\n  color=\"#333\"\n  margin=\"none\"\n  tag=\"h4\"\n  textAlign=\"left\"\n  truncate={true}\n  upcase={false}\n>\n  Test\n</styled.h4>\n`;\n\nexports[`<Heading /> should render with h5 props 1`] = `\n<styled.h5\n  color=\"#333\"\n  margin=\"none\"\n  tag=\"h5\"\n  textAlign=\"left\"\n  truncate={true}\n  upcase={false}\n>\n  Test\n</styled.h5>\n`;\n"
  },
  {
    "path": "packages/openui/src/Heading/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Heading from '../';\nimport { h2Props, h3Props, h4Props, h5Props } from './__mocks__/headingProps.mock';\n\ndescribe('<Heading />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Heading>\n        Test\n      </Heading>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with h2 props', () => {\n    const wrapper = shallow(\n      <Heading {...h2Props}>\n        Test\n      </Heading>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with h3 props', () => {\n    const wrapper = shallow(\n      <Heading {...h3Props}>\n        Test\n      </Heading>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with h4 props', () => {\n    const wrapper = shallow(\n      <Heading {...h4Props}>\n        Test\n      </Heading>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with h5 props', () => {\n    const wrapper = shallow(\n      <Heading {...h5Props}>\n        Test\n      </Heading>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Heading/index.tsx",
    "content": "import * as React from 'react';\nimport { Margin } from '../Paragraph/types';\nimport { H1, H2, H3, H4, H5 } from './styles';\n\nexport type Tag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n\nexport interface Props {\n  color?: string;\n  textAlign?: string;\n  tag?: Tag;\n  truncate?: boolean;\n  upcase?: boolean;\n  margin?: Margin;\n}\n\nclass Heading extends React.Component<Props, undefined> {\n  public static defaultProps: Props = {\n    color: '#666',\n    textAlign: 'center',\n    tag: 'h1',\n    truncate: false,\n    upcase: false,\n    margin: 'medium',\n  };\n  public render() {\n    const { children, tag, ...rest } = this.props;\n    switch (tag) {\n    case 'h2':\n      return (\n      <H2 tag={tag} {...rest}>\n        {children}\n      </H2>\n      );\n    case 'h3':\n      return (\n      <H3 tag={tag} {...rest}>\n        {children}\n      </H3>\n      );\n    case 'h4':\n      return (\n      <H4 tag={tag} {...rest}>\n        {children}\n      </H4>\n      );\n    case 'h5':\n      return (\n      <H5 tag={tag} {...rest}>\n        {children}\n      </H5>\n      );\n    default:\n      return (\n        <H1 tag={tag} {...rest}>\n          {children}\n        </H1>\n      );\n    }\n  }\n}\n\nexport default Heading;\n"
  },
  {
    "path": "packages/openui/src/Heading/styleUtils.ts",
    "content": "import { Tag } from './index';\nimport remStringFromPX from '../utils';\n\nconst sizeMap = {\n  h1: 36,\n  h2: 30,\n  h3: 24,\n  h4: 18,\n  h5: 16,\n};\n\nexport const calculateSize = (tag: Tag): string => remStringFromPX(sizeMap[tag]);\n"
  },
  {
    "path": "packages/openui/src/Heading/styles.ts",
    "content": "import styled, { css } from 'styled-components';\nimport { marginCss } from '../Paragraph/styles';\nimport { calculateSize } from './styleUtils';\nimport { Props } from './types';\n\nconst truncateCss = (truncate: boolean) => {\n  if (truncate) {\n    return css`\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    `;\n  }\n  return '';\n};\n\nconst textTransformCss = (upcase: boolean) => {\n  if (upcase) {\n    return css`\n      text-transform: uppercase;\n    `;\n  }\n  return '';\n};\n\nconst HeadingStyles = css`\n  font-size: ${(props: Props) => calculateSize(props.tag)};\n  text-align: ${(props: Props) => props.textAlign};\n  color: ${(props: Props) => props.color};\n  ${(props: Props) => truncateCss(props.truncate)};\n  ${(props: Props) => textTransformCss(props.upcase)};\n  ${(props: Props) => marginCss(props.margin)};\n`;\n\nexport const H1 = styled.h1`\n  ${HeadingStyles}\n`;\n\nexport const H2 = styled.h2`\n  ${HeadingStyles}\n`;\n\nexport const H3 = styled.h3`\n  ${HeadingStyles}\n`;\n\nexport const H4 = styled.h4`\n  ${HeadingStyles}\n`;\n\nexport const H5 = styled.h5`\n  ${HeadingStyles}\n`;\n"
  },
  {
    "path": "packages/openui/src/Heading/types.ts",
    "content": "export { Props, Tag } from './index';\n"
  },
  {
    "path": "packages/openui/src/Headline/__tests__/__mocks__/headlineProps.mock.ts",
    "content": "export default {\n  color: '#fff',\n};\n"
  },
  {
    "path": "packages/openui/src/Headline/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Headline /> should render with default props 1`] = `\n<styled.h1\n  color=\"#000000\"\n  fontSize=\"medium\"\n  fontWeight={400}\n  margin=\"medium\"\n  textAlign=\"center\"\n>\n  Headline\n</styled.h1>\n`;\n\nexports[`<Headline /> should render with different props 1`] = `\n<styled.h1\n  color=\"#fff\"\n  fontSize=\"medium\"\n  fontWeight={400}\n  margin=\"medium\"\n  textAlign=\"center\"\n>\n  Headline\n</styled.h1>\n`;\n"
  },
  {
    "path": "packages/openui/src/Headline/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Headline from '../';\nimport props from './__mocks__/headlineProps.mock';\n\ndescribe('<Headline />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Headline>\n        Headline\n      </Headline>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with different props', () => {\n    const wrapper = shallow(\n      <Headline {...props}>\n        Headline\n      </Headline>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Headline/index.tsx",
    "content": "import * as React from 'react';\nimport { HeadlineStyled } from './styles';\nimport { Margin } from '../Paragraph/types';\nimport { HeadlineSize, FontWeight } from './types';\n\nexport interface Props {\n  color?: string;\n  textAlign?: string;\n  fontSize?: HeadlineSize;\n  fontWeight?: FontWeight;\n  margin?: Margin;\n}\n\nclass Headline extends React.Component<Props, undefined> {\n  public static defaultProps: Props = {\n    color: '#000000',\n    textAlign: 'center',\n    fontSize: 'medium',\n    fontWeight: 400,\n    margin: 'medium',\n  };\n  public render() {\n    const { children, ...rest } = this.props;\n    return (\n      <HeadlineStyled {...rest}>\n        {children}\n      </HeadlineStyled>\n    );\n  }\n}\n\nexport default Headline;\n"
  },
  {
    "path": "packages/openui/src/Headline/styleUtils.ts",
    "content": "import remStringFromPX from '../utils';\n\nexport interface SizeMap {\n  small: number;\n  medium: number;\n  large: number;\n  xlarge: number;\n}\n\nconst sizeMap: SizeMap = {\n  small: 30,\n  medium: 48,\n  large: 60,\n  xlarge: 72,\n};\n\nexport type HeadlineSize = 'small' | 'medium' | 'xlage' | 'xlarge';\nexport default function calculateSize(size: HeadlineSize): string {\n  return remStringFromPX(sizeMap[size]);\n};\n"
  },
  {
    "path": "packages/openui/src/Headline/styles.ts",
    "content": "import { marginCss } from '../Paragraph/styles';\nimport calculateSize from './styleUtils';\nimport styled from 'styled-components';\nimport { Props } from './types';\n\nexport const HeadlineStyled = styled.h1`\n  text-align: center;\n  font-size: ${(props: Props) => calculateSize(props.fontSize)};\n  text-align: ${(props: Props) => props.textAlign};\n  color: ${(props: Props) => props.color};\n  font-weight: ${(props: Props) => props.fontWeight};\n  ${(props: Props) => marginCss(props.margin)};\n`;\n"
  },
  {
    "path": "packages/openui/src/Headline/types.ts",
    "content": "export { Props } from './index';\nexport { SizeMap, HeadlineSize } from './styleUtils';\n\nexport type TextAligment = 'center' | 'left' | 'right' | 'justify';\nexport type FontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;\n"
  },
  {
    "path": "packages/openui/src/Hero/__tests__/__mocks__/heroMocks.mock.ts",
    "content": "export const heroProps = {\n  backgroundColor: 'ff6600',\n};\n"
  },
  {
    "path": "packages/openui/src/Hero/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Hero /> rendering behavior should render the Hero component with default props 1`] = `\n<styled.div\n  backgroundColor=\"#2d2d2d\"\n  full={false}\n>\n  Some content\n</styled.div>\n`;\n\nexports[`<Hero /> rendering behavior should render with other props 1`] = `\n<styled.div\n  backgroundColor=\"ff6600\"\n  full={false}\n>\n  Some content\n</styled.div>\n`;\n"
  },
  {
    "path": "packages/openui/src/Hero/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Hero from '../';\nimport { heroProps } from './__mocks__/heroMocks.mock';\n\ndescribe('<Hero /> rendering behavior', () => {\n  it('should render the Hero component with default props', () => {\n    const wrapper = shallow(\n      <Hero>\n        Some content\n      </Hero>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with other props', () => {\n    const wrapper = shallow(\n      <Hero {...heroProps}>\n        Some content\n      </Hero>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with the provided prop values', () => {\n    const wrapper = shallow(\n      <Hero {...heroProps}>\n        Some content\n      </Hero>,\n    );\n    expect(shallowToJson(wrapper).props.backgroundColor).toEqual(heroProps.backgroundColor);\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Hero/index.tsx",
    "content": "import * as React from 'react';\nimport Component from './styles';\n\nexport interface Props extends React.HTMLProps<typeof Hero> {\n  backgroundColor?: string;\n  backgroundImage?: string;\n  full?: boolean;\n  height?: string | number;\n}\nexport default function Hero({\n  children,\n  backgroundColor,\n  full = false,\n  backgroundImage,\n  height,\n}: Props): JSX.Element {\n  const colorProp = backgroundColor || '#2d2d2d';\n  const props = { height, backgroundImage, backgroundColor: colorProp, full };\n  return (\n    <Component {...props}>\n      {children}\n    </Component>\n  );\n};\n"
  },
  {
    "path": "packages/openui/src/Hero/styles.ts",
    "content": "import styled, { css } from 'styled-components';\nimport { Props } from './types';\n\nfunction background(props: Props) {\n  if (props.backgroundImage) {\n    return css`\n      background: ${(props: Props) => `url(${props.backgroundImage})`} center center / cover no-repeat;\n    `;\n  } else if (props.backgroundColor) {\n    return css`\n      background-color: ${(props: Props) => props.backgroundColor};\n    `;\n  }\n}\n\nfunction height(props: Props) {\n  if (props.height) {\n    const height = typeof props.height === 'string'\n      ? props.height\n      : `${props.height}px`;\n    return css`\n      height: ${height};\n    `;\n  }\n  if (props.full) {\n    return css`\n      height: 100vh;\n    `;\n  }\n  return css`\n    height: auto;\n    min-height: 350px;\n  `;\n}\n\nexport default styled.div`\n  text-align: center;\n  width: 100%;\n  ${(props: Props) => background(props)}\n  ${(props: Props) => height(props)}\n`;\n"
  },
  {
    "path": "packages/openui/src/Hero/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/openui/src/Image/__tests__/__mocks__/imageMocks.mock.ts",
    "content": "import { ImageProps } from '../../types';\n\nexport const MockImageProps: ImageProps = {\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsThumb: ImageProps = {\n  size: 'thumb',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsXXSmall: ImageProps = {\n  size: 'xxsmall',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsXSmall: ImageProps = {\n  size: 'xsmall',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsSmall: ImageProps = {\n  size: 'small',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsMedium: ImageProps = {\n  size: 'medium',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsLarge: ImageProps = {\n  size: 'large',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsXLarge: ImageProps = {\n  size: 'xlarge',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n\nexport const MockImagePropsFull: ImageProps = {\n  size: 'full',\n  src: 'A source string',\n  alt: 'Some alt text',\n};\n"
  },
  {
    "path": "packages/openui/src/Image/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Image /> should render a default image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a full image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"full\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a large image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"large\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a medium image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"medium\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a small image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"small\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a thumbnail image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"thumb\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a xlarge image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"xlarge\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a xsmall image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"xsmall\"\n  src=\"A source string\"\n/>\n`;\n\nexports[`<Image /> should render a xxsmall image 1`] = `\n<img\n  alt=\"Some alt text\"\n  className=\"ddORmD\"\n  size=\"xxsmall\"\n  src=\"A source string\"\n/>\n`;\n"
  },
  {
    "path": "packages/openui/src/Image/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Image from '../';\nimport * as Props from './__mocks__/imageMocks.mock';\n\ndescribe('<Image />', () => {\n  it('should render a default image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImageProps} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a thumbnail image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsThumb} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a xxsmall image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsXXSmall} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a xsmall image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsXSmall} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a small image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsSmall} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a medium image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsMedium} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a large image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsLarge} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a xlarge image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsXLarge} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render a full image', () => {\n    const wrapper = shallow(\n      <Image {...Props.MockImagePropsFull} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Image/index.tsx",
    "content": "import styled from 'styled-components';\nimport { imageStyle } from './styles';\n\nexport type ImageSize = 'thumb' | 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'full';\n\nexport interface Props {\n  imageSize?: ImageSize;\n  src: string;\n  alt: string;\n}\n\nconst Image = styled.img`\n  ${(props: Props) => imageStyle(props)}\n`;\n\nexport default Image;\n"
  },
  {
    "path": "packages/openui/src/Image/styles.ts",
    "content": "import styled, { css } from 'styled-components';\nimport remStringFromPx from '../utils';\nimport { Props } from './index';\n\nconst imageSizeMap = {\n  thumb: 50,\n  xxsmall: 100,\n  xsmall: 200,\n  small: 300,\n  medium: 400,\n  large: 500,\n  xlarge: 600,\n  full: 1200,\n};\n\nexport const imageStyle = ({ imageSize }: Props) => {\n  const sizeWithDefault = imageSize || 'small';\n  const px = imageSizeMap[sizeWithDefault];\n  const rem = remStringFromPx(px);\n  if (sizeWithDefault === 'full') {\n    return css`\n      width: 100vw;\n      height: auto;\n    `;\n  }\n  if (sizeWithDefault === 'thumb') {\n    return css`\n      width: ${rem};\n      height: ${rem};\n      flex: 0 0 auto;\n      object-fit: cover;\n    `;\n  }\n  return css`\n    max-width: 100%;\n    height: auto;\n    min-width: ${rem};\n    max-height: ${rem};\n    display: block;\n  `;\n};\n\nexport const Img = styled.img`\n  ${(props: Props) => imageStyle(props)}\n`;\n"
  },
  {
    "path": "packages/openui/src/Image/types.ts",
    "content": "export { Props, ImageSize } from './index';\n"
  },
  {
    "path": "packages/openui/src/LoadingIndicator/__tests__/__mocks__/loadingIndicatorMocks.mock.ts",
    "content": ""
  },
  {
    "path": "packages/openui/src/LoadingIndicator/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<LoadingIndicator /> default should render the element when isLoading is true 1`] = `\n<Box\n  alignItems=\"center\"\n  boxSize={\n    Object {\n      \"horizontal\": \"small\",\n    }\n  }\n  justifyContent=\"center\"\n  pad=\"medium\"\n>\n  <styled.svg\n    viewBox=\"0 0 48 48\"\n  >\n    <styled.circle\n      cx=\"24\"\n      cy=\"24\"\n      fill=\"none\"\n      r=\"21\"\n      stroke=\"#007acc\"\n      strokeWidth=\"6\"\n    />\n  </styled.svg>\n</Box>\n`;\n"
  },
  {
    "path": "packages/openui/src/LoadingIndicator/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport LoadingIndicator from '../';\n\ndescribe('<LoadingIndicator /> default', () => {\n  it('should render the element when isLoading is true', () => {\n    const wrapper = shallow(\n      <LoadingIndicator isLoading={true} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should return null when isLoading is false', () => {\n    const wrapper = shallow(\n      <LoadingIndicator isLoading={false} />,\n    );\n    expect(shallowToJson(wrapper)).toBeNull();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/LoadingIndicator/index.tsx",
    "content": "// Adapted from https://grommet.github.io/docs/spinning\nimport * as React from 'react';\nimport { Box } from '../';\nimport SvgIcon, { Circle } from './styles';\n\nexport interface Props extends React.Props<typeof LoadingIndicator> {\n  isLoading: boolean;\n}\nexport default function LoadingIndicator({\n  isLoading,\n}: Props): JSX.Element {\n  if (!isLoading) {\n    return null;\n  }\n  return (\n    <Box\n      boxSize={{ horizontal: 'small' }}\n      pad=\"medium\"\n      alignItems=\"center\"\n      justifyContent=\"center\"\n    >\n      <SvgIcon viewBox=\"0 0 48 48\">\n        <Circle\n          cx=\"24\"\n          cy=\"24\"\n          r=\"21\"\n          stroke=\"#007acc\"\n          strokeWidth=\"6\"\n          fill=\"none\"\n        />\n      </SvgIcon>\n    </Box>\n  );\n};\n"
  },
  {
    "path": "packages/openui/src/LoadingIndicator/styles.ts",
    "content": "import styled, { keyframes } from 'styled-components';\n\nconst draw = keyframes`\n  0% {\n    transform: rotate(-90deg);\n    stroke-dashoffset: 151px;\n  }\n\n  100% {\n    stroke-dashoffset: -131px\n  }\n`;\n\nconst color = keyframes`\n  0% {\n    stroke: #007acc;\n  }\n\n  100% {\n    stroke: #293953;\n  }\n`;\n\nexport const Circle = styled.circle`\n  animation: ${color} 1s alternate infinite ease-in-out;\n`;\n\nexport default styled.svg`\n  width: 48px;\n  height: 48px;\n  stroke-dasharray: 151px 151px;\n  stroke-dashoffset: 0;\n  transform: rotate(270deg);\n  animation: ${draw} 4s alternate infinite ease-in-out;\n`;\n"
  },
  {
    "path": "packages/openui/src/LoadingIndicator/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/openui/src/Markdown/index.tsx",
    "content": "import * as React from 'react';\nimport Component from './styles';\nimport ReactMarkdown from 'react-markdown';\n\nexport interface Props extends React.Props<typeof Markdown> {\n  content: string;\n}\nexport default function Markdown({\n  content,\n}: Props): JSX.Element {\n  if (typeof ReactMarkdown === 'undefined') {\n    return (\n      <Component className=\"markdown-body\">\n        {content}\n      </Component>\n    );\n  }\n  return (\n    <Component className=\"markdown-body\">\n      <ReactMarkdown source={content} />\n    </Component>\n  );\n}\n"
  },
  {
    "path": "packages/openui/src/Markdown/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport default styled.div`\n  box-sizing: border-box;\n  display: block;\n`;\n"
  },
  {
    "path": "packages/openui/src/Markdown/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "packages/openui/src/Notification/__tests__/__mocks__/notificationMocks.mock.ts",
    "content": "export const NotificationPropsRequired = {\n  message: 'Mock error message',\n};\n\nexport const NotificationPropsOther = {\n  message: 'Mock error message',\n  onClick: jest.fn(),\n};\n"
  },
  {
    "path": "packages/openui/src/Notification/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Notification /> default should render an Notification element with only the required props 1`] = `\n<Styled(Box)\n  alignItems=\"center\"\n  boxSize={\n    Object {\n      \"horizontal\": \"medium\",\n    }\n  }\n  pad=\"small\"\n  selectable={true}\n  status=\"none\"\n>\n  <styled.p\n    color=\"white\"\n    paragraphSize=\"large\"\n  >\n    Mock error message\n  </styled.p>\n</Styled(Box)>\n`;\n\nexports[`<Notification /> default should render an Notification element with other props 1`] = `\n<Styled(Box)\n  alignItems=\"center\"\n  boxSize={\n    Object {\n      \"horizontal\": \"medium\",\n    }\n  }\n  onClick={[Function]}\n  pad=\"small\"\n  selectable={true}\n  status=\"none\"\n>\n  <styled.p\n    color=\"white\"\n    paragraphSize=\"large\"\n  >\n    Mock error message\n  </styled.p>\n</Styled(Box)>\n`;\n"
  },
  {
    "path": "packages/openui/src/Notification/__tests__/index.test.tsx",
    "content": "import { shallow, mount } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Notification from '../';\nimport { NotificationPropsRequired, NotificationPropsOther } from './__mocks__/notificationMocks.mock';\n\ndescribe('<Notification /> default', () => {\n  it('should render an Notification element with only the required props', () => {\n    const wrapper = shallow(\n      <Notification {...NotificationPropsRequired} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render an Notification element with other props', () => {\n    const wrapper = shallow(\n      <Notification {...NotificationPropsOther} />,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n\ndescribe('The onClick prop should trigger with an onClick event', () => {\n  let mockFunction;\n  let notification;\n\n  beforeEach(() => {\n    mockFunction = jest.fn();\n    notification = mount(\n      <Notification {...NotificationPropsRequired} onClick={mockFunction} />,\n    );\n  });\n\n  it('Notification requires onClick prop', () => {\n    expect(notification.props().onClick).toBeDefined();\n  });\n\n  it('Notification rendered with Box - an HTML div element', () => {\n    const renderedNotification = notification.find('div').first();\n    expect(renderedNotification).toBeDefined();\n  });\n\n  it('Notification click calls mockFunction', () => {\n    const renderedNotification = notification.find('div').first();\n    renderedNotification.simulate('click');\n    expect(mockFunction).toBeCalled();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Notification/index.tsx",
    "content": "import * as React from 'react';\nimport Box from './styles';\nimport { Paragraph } from '../';\nimport { Status } from './types';\n\nexport interface Props extends React.HTMLProps<typeof Notification> {\n  message: JSX.Element | string;\n  status?: Status;\n}\nexport default function Notification({\n  message,\n  status,\n  ...rest,\n}: Props): JSX.Element {\n  const stat = status || 'none';\n  return (\n    <Box\n      status={stat}\n      boxSize={{ horizontal: 'medium' }}\n      pad=\"small\"\n      alignItems=\"center\"\n      selectable\n      {...rest}\n    >\n      <Paragraph paragraphSize=\"large\" color=\"white\">{message}</Paragraph>\n    </Box>\n  );\n};\n"
  },
  {
    "path": "packages/openui/src/Notification/styles.ts",
    "content": "const styled = require('styled-components').default;\nconst { css } = require('styled-components');\nimport Box from '../Box';\nimport { Status } from './types';\nimport colorMap from '../theming/colorMap';\n\nconst backgroundColor = (status: Status) => css`\n  background-color: ${colorMap[status] || colorMap.offwhite};\n`;\n\nexport default styled(Box)`\n  ${(props) => backgroundColor(props.status)}\n`;\n"
  },
  {
    "path": "packages/openui/src/Notification/types.ts",
    "content": "export { Props } from './';\nexport type Status = 'none' | 'ok' | 'warning' | 'error';\n"
  },
  {
    "path": "packages/openui/src/Paragraph/index.tsx",
    "content": "import styled, { ThemeProps } from 'styled-components';\nimport { style } from './styles';\n\nexport type ParagraphSize = 'small' | 'medium' | 'large' | 'xlarge';\nexport type Margin = 'none' | 'small' | 'medium' | 'large';\n\nexport interface SizeMap {\n  small: number;\n  medium: number;\n  large: number;\n  xlarge: number;\n}\n\nexport interface MarginSizeMap {\n  none: number;\n  small: number;\n  medium: number;\n  large: number;\n}\n\nexport interface Props {\n  color?: string;\n  textAlign?: string;\n  paragraphSize?: ParagraphSize;\n  margin?: Margin;\n}\n\nexport { ThemeProps };\nconst Paragraph = styled.p`\n  ${style}\n`;\n\nexport default Paragraph;\n"
  },
  {
    "path": "packages/openui/src/Paragraph/styleUtils.ts",
    "content": "import { ParagraphSize, SizeMap, Margin, MarginSizeMap } from './types';\nimport remStringFromPX from '../utils';\n\nconst sizeMap: SizeMap = {\n  small: 14,\n  medium: 16,\n  large: 24,\n  xlarge: 32,\n};\n\nconst marginSizeMap: MarginSizeMap = {\n  none: 0,\n  small: 12,\n  medium: 24,\n  large: 48,\n};\n\nexport function calculateMargin(margin: Margin): string {\n  return remStringFromPX(marginSizeMap[margin]);\n};\n\nexport default function calculateSize(size: ParagraphSize): string {\n  return remStringFromPX(sizeMap[size]);\n};\n"
  },
  {
    "path": "packages/openui/src/Paragraph/styles.ts",
    "content": "import { css, InterpolationFunction, ThemeProps } from 'styled-components';\nimport { Margin, Props } from './types';\nimport calculateSize, { calculateMargin } from './styleUtils';\n\nconst defaultProps: Props = {\n  color: '#666',\n  textAlign: 'center',\n  paragraphSize: 'medium',\n  margin: 'medium',\n};\n\nexport function marginCss(margin: Margin) {\n  return css`\n    margin-top: ${calculateMargin(margin)};\n    margin-bottom: ${calculateMargin(margin)};\n  `;\n};\n\nexport { ThemeProps, InterpolationFunction };\nexport const style = css`\n  max-width: 630px;\n  text-align: ${(props: Props) => props.textAlign || defaultProps.textAlign};\n  color: ${(props: Props) => props.color || defaultProps.color};\n  ${(props: Props) => marginCss(props.margin || defaultProps.margin)};\n  font-size: ${(props: Props) => calculateSize(props.paragraphSize || defaultProps.paragraphSize)};\n`;\n\nexport default style;\n"
  },
  {
    "path": "packages/openui/src/Paragraph/types.ts",
    "content": "export { Props, ParagraphSize, Margin, SizeMap, MarginSizeMap } from './index';\n"
  },
  {
    "path": "packages/openui/src/Section/__tests__/__mocks__/sectionMocks.mock.ts",
    "content": "export default {\n  pad: 'medium',\n  size: 'large',\n  backgroundColor: '#f5f5f5',\n};\n"
  },
  {
    "path": "packages/openui/src/Section/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Section /> should render with default props 1`] = `\n<styled.section>\n  <div />\n</styled.section>\n`;\n\nexports[`<Section /> should render with different props 1`] = `\n<styled.section\n  backgroundColor=\"#f5f5f5\"\n  pad=\"medium\"\n  size=\"large\"\n>\n  <div />\n</styled.section>\n`;\n"
  },
  {
    "path": "packages/openui/src/Section/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Section from '../';\nimport props from './__mocks__/sectionMocks.mock';\n\ndescribe('<Section />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Section>\n        <div />\n      </Section>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with different props', () => {\n    const wrapper = shallow(\n      <Section {...props}>\n        <div />\n      </Section>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Section/index.tsx",
    "content": "import * as React from 'react';\nimport Component from './styles';\nimport BoxProps from '../Box/types';\n\nexport default function Section({\n  children,\n  ...rest,\n}: BoxProps): JSX.Element {\n  return (\n    <Component {...rest}>\n      {children}\n    </Component>\n  );\n};\n"
  },
  {
    "path": "packages/openui/src/Section/styles.ts",
    "content": "import styled from 'styled-components';\n\nimport {\n  BoxStyles,\n  Props,\n} from '../Box/styles';\n\nexport { Props };\nexport default styled.section`\n  ${BoxStyles}\n`;\n"
  },
  {
    "path": "packages/openui/src/SvgIcon/index.tsx",
    "content": "import * as React from 'react';\nimport { SvgProps } from './types';\n\nexport type Props = SvgProps & React.HTMLProps<typeof SvgIcon>;\nexport default function SvgIcon({\n  children,\n  viewBox,\n  ...rest,\n}: Props): JSX.Element {\n  const viewBoxProps = viewBox || '0 0 24 24';\n  return (\n    <svg\n      {...rest}\n      viewBox={viewBoxProps}\n    >\n      {children}\n    </svg>\n  );\n}\n"
  },
  {
    "path": "packages/openui/src/SvgIcon/types.ts",
    "content": "export { Props } from './index';\nexport interface SvgProps extends React.SVGProps {\n  viewBox?: string;\n}\n"
  },
  {
    "path": "packages/openui/src/Toast/__tests__/__mocks__/toast.mock.ts",
    "content": "export default {\n  status: 'ok',\n  onClose: jest.fn(),\n};\n"
  },
  {
    "path": "packages/openui/src/Toast/__tests__/__snapshots__/index.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`<Toast /> should render with default props 1`] = `\n<styled.div\n  isUnmounting={false}\n  isVisible={true}\n  status=\"none\"\n>\n  <Box\n    alignItems=\"center\"\n    boxSize={60}\n    flexDirection=\"row\"\n    justifyContent=\"center\"\n    pad=\"medium\"\n    style={\n      Object {\n        \"width\": \"100vw\",\n      }\n    }\n  >\n    <Box\n      style={\n        Object {\n          \"flexGrow\": 2,\n        }\n      }\n    >\n      Jello\n    </Box>\n    <Box\n      alignItems=\"center\"\n      justifyContent=\"center\"\n    >\n      <styled.button\n        onClick={[Function]}\n      >\n        ✕\n      </styled.button>\n    </Box>\n  </Box>\n</styled.div>\n`;\n\nexports[`<Toast /> should render with different props 1`] = `\n<styled.div\n  isUnmounting={false}\n  isVisible={true}\n  status=\"ok\"\n>\n  <Box\n    alignItems=\"center\"\n    boxSize={60}\n    flexDirection=\"row\"\n    justifyContent=\"center\"\n    pad=\"medium\"\n    style={\n      Object {\n        \"width\": \"100vw\",\n      }\n    }\n  >\n    <Box\n      style={\n        Object {\n          \"flexGrow\": 2,\n        }\n      }\n    >\n      Foobar\n    </Box>\n    <Box\n      alignItems=\"center\"\n      justifyContent=\"center\"\n    >\n      <styled.button\n        onClick={[Function]}\n      >\n        ✕\n      </styled.button>\n    </Box>\n  </Box>\n</styled.div>\n`;\n"
  },
  {
    "path": "packages/openui/src/Toast/__tests__/index.test.tsx",
    "content": "import { shallow } from 'enzyme';\nimport { shallowToJson } from 'enzyme-to-json';\nimport * as React from 'react';\nimport Toast from '../';\nimport { Status } from '../types';\nimport props from './__mocks__/toast.mock';\n\ndescribe('<Toast />', () => {\n  it('should render with default props', () => {\n    const wrapper = shallow(\n      <Toast>\n        Jello\n      </Toast>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n  it('should render with different props', () => {\n    const wrapper = shallow(\n      <Toast {...props} status={props.status as Status}>\n        Foobar\n      </Toast>,\n    );\n    expect(shallowToJson(wrapper)).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "packages/openui/src/Toast/index.tsx",
    "content": "import * as React from 'react';\nimport Box from '../Box';\nimport Component, { Button } from './styles';\nimport BoxProps from '../Box/types';\nimport { Status } from './types';\n\nexport interface Props extends BoxProps {\n  message?: JSX.Element | string;\n  children?: JSX.Element;\n  onClose?: () => void;\n  status?: Status;\n}\n\nexport interface State {\n  isVisible: boolean;\n  isUnmounting: boolean;\n}\n\nexport default class Toast extends React.Component<Props, State> {\n  public static defaultProps = {\n    status: 'none' as Status,\n  };\n  constructor() {\n    super();\n    this.handleClose = this.handleClose.bind(this);\n    this.state = {\n      isVisible: true,\n      isUnmounting: false,\n    };\n  }\n  public componentDidMount() {\n    setTimeout(() => {\n      this.handleClose();\n    }, 5000);\n  }\n  private handleClose() {\n    this.setState({\n      isUnmounting: true,\n    });\n    setTimeout(() => {\n      if (this.props.onClose) {\n        this.props.onClose();\n      }\n      this.setState({\n        isUnmounting: false,\n        isVisible: false,\n      });\n    }, 1000);\n  }\n  public render() {\n    const { isVisible } = this.state;\n    const { message, children, status } = this.props;\n    if (!isVisible) {\n      return null;\n    }\n    return (\n      <Component status={status} {...this.state}>\n        <Box\n          alignItems=\"center\"\n          justifyContent=\"center\"\n          flexDirection=\"row\"\n          boxSize={60}\n          pad=\"medium\"\n          style={{ width: '100vw' }}\n        >\n          <Box style={{ flexGrow: 2 }}>\n            {message && message}\n            {children && children}\n          </Box>\n          <Box alignItems=\"center\" justifyContent=\"center\">\n            <Button onClick={this.handleClose}>\n              ✕\n            </Button>\n          </Box>\n        </Box>\n      </Component>\n    );\n  }\n}\n"
  },
  {
    "path": "packages/openui/src/Toast/styles.ts",
    "content": "const styled = require('styled-components').default;\nconst { keyframes, css } = require('styled-components');\nimport { Status } from './types';\nimport colorMap from '../theming/colorMap';\n\nconst backgroundColor = (status: Status) => css`\n  background-color: ${colorMap[status] || colorMap.offwhite};\n`;\n\nconst unmount = keyframes`\n  0% { transform: translateY(0%); }\n  100% { transform: translateY(-100%); }\n`;\n\nconst mount = keyframes`\n  0% { transform: translateY(-100%); }\n  100% { transform: translateY(0%); }\n`;\n\nexport const Button = styled.button`\n  background-color: transparent;\n  border: 0px;\n  color: #333;\n  cursor: pointer;\n  font-size: 2rem;\n`;\n\nexport default styled.div`\n  position: fixed;\n  font-size: 1.3rem;\n  top: 0;\n  left: 0;\n  right: 0;\n  z-index: 100;\n  display: flex;\n  flex-direction: row;\n  ${(props) => backgroundColor(props.status)};\n  animation: ${(props) => props.isUnmounting ? unmount : mount} 1s;\n`;\n"
  },
  {
    "path": "packages/openui/src/Toast/types.ts",
    "content": "export { Props } from './index';\n\nexport type Status = 'ok' | 'warning' | 'error' | 'none';\n"
  },
  {
    "path": "packages/openui/src/WithAnimation/animation.ts",
    "content": "import styled, { css } from 'styled-components';\nimport { Props } from './types';\n\nfunction styles(props: Props) {\n  const opacity = props.isVisible ? 1.0 : 0.0;\n  const transform = props.isVisible ? 0 : 20;\n  switch (props.type) {\n  case 'fadeIn':\n    return css`\n      opacity: ${opacity};\n    `;\n  case 'fadeInUp':\n    return css`\n      opacity: ${opacity};\n      transform: translateY(${transform}%);\n      will-change: transform, opacity;\n    `;\n  default:\n    return '';\n  }\n}\n\nfunction transition(props: Props) {\n  const duration = 600;\n  return css`\n    transition: transform ${duration / 2}ms ease, opacity ${duration}ms ease-out;\n  `;\n}\n\nfunction delay({ delay }: Props) {\n  return css`\n    transition-delay: ${delay}ms;\n  `;\n}\n\nexport default styled.div`\n  ${(props: Props) => styles(props)}\n  ${(props: Props) => transition(props)}\n  ${(props: Props) => delay(props)}\n  ${(props: Props) => props.css}\n`;\n"
  },
  {
    "path": "packages/openui/src/WithAnimation/index.tsx",
    "content": "import * as React from 'react';\nimport { ThemedCssFunction } from 'styled-components';\nimport Animation from './animation';\nimport { AnimationType } from './types';\n\nexport interface Props {\n  type?: AnimationType;\n  isVisible: boolean;\n  children?: JSX.Element;\n  duration?: number;\n  delay?: number;\n  css?: ThemedCssFunction<{}>;\n}\n\nexport type HOC = (props: Props) => JSX.Element;\nconst WithAnimation: HOC = ({\n  duration = 1000,\n  type = 'fadeIn',\n  children,\n  delay = 0,\n  ...props,\n}) => (\n  <Animation delay={delay} type={type} duration={duration} {...props}>\n    {children}\n  </Animation>\n);\n\nexport default WithAnimation;\n"
  },
  {
    "path": "packages/openui/src/WithAnimation/types.ts",
    "content": "export { Props } from './';\n\nexport type AnimationType = 'fadeIn' | 'fadeInUp';\n"
  },
  {
    "path": "packages/openui/src/index.ts",
    "content": "import Anchor from './Anchor';\nimport Article from './Article';\nimport Avatar from './Avatar';\nimport Box from './Box';\nimport Button from './Button';\nimport Notification from './Notification';\nimport Footer from './Footer';\nimport Heading from './Heading';\nimport Headline from './Headline';\nimport Header from './Header';\nimport Hero from './Hero';\nimport Image from './Image';\nimport LoadingIndicator from './LoadingIndicator';\nimport Markdown from './Markdown';\nimport Paragraph from './Paragraph';\nimport Section from './Section';\nimport SvgIcon from './SvgIcon';\nimport Toast from './Toast';\nimport WithAnimation from './WithAnimation';\n\nexport {\n  Anchor,\n  Article,\n  Avatar,\n  Box,\n  Button,\n  Notification,\n  Footer,\n  Heading,\n  Headline,\n  Header,\n  Hero,\n  Image,\n  LoadingIndicator,\n  Markdown,\n  Paragraph,\n  Section,\n  SvgIcon,\n  Toast,\n  WithAnimation,\n};\n"
  },
  {
    "path": "packages/openui/src/theming/colorMap.ts",
    "content": "import { ThemeColorMap } from './types';\n\nconst colorMap: ThemeColorMap = {\n  dark1: '#293953',\n  dark2: '#6B4E71',\n  dark3: '#829399',\n  light1: '#34E4EA',\n  light2: '#D6DBB2',\n  light3: '#6D72C3',\n  primary: '#007acc',\n  secondary: '#c05b4d',\n  ok: '#8cc800',\n  warning: '#ffd602',\n  error: '#ff324d',\n  white1: '#fff',\n  white2: '#f3f3f3',\n  white3: '#e6e8ec',\n  offwhite: '#f5f5f5',\n  black1: '#0a0a0a',\n  black2: '#2d2d2d',\n  black3: '#555555',\n};\n\nexport default colorMap;\n"
  },
  {
    "path": "packages/openui/src/theming/globalCss.ts",
    "content": "import { injectGlobal } from 'styled-components';\n\nconst globalCss = injectGlobal`\n  * {\n    box-sizing: border-box;\n  }\n\n  body {\n    overflow: scroll;\n    overflow-x: hidden;\n    padding: 0;\n    margin: 0;\n    font-family: Hind,sans-serif;\n    font-weight: 400;\n    line-height: 1.5;\n    color: #0a0a0a;\n    background: #fff;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  html {\n    font-size: 100%;\n    box-sizing: border-box;\n    overflow-x: hidden;\n  }\n\n  a {\n    text-decoration: none;\n    line-height: inherit;\n    cursor: pointer;\n  }\n`;\n\nexport default globalCss;\n"
  },
  {
    "path": "packages/openui/src/theming/index.ts",
    "content": "import colorMap from './colorMap';\n\nexport default colorMap;\n"
  },
  {
    "path": "packages/openui/src/theming/types.ts",
    "content": "export interface ThemeColorMap {\n  dark1: string,\n  dark2: string,\n  dark3: string,\n  light1: string,\n  light2: string,\n  light3: string,\n  primary: string,\n  secondary: string,\n  ok: string,\n  warning: string,\n  error: string,\n  white1: string,\n  white2: string,\n  white3: string,\n  offwhite: string,\n  black1: string,\n  black2: string,\n  black3: string,\n}\n"
  },
  {
    "path": "packages/openui/src/utils/index.ts",
    "content": "import remStringFromPx from './remStringFromPx';\n\nexport default remStringFromPx;\n"
  },
  {
    "path": "packages/openui/src/utils/remStringFromPx.ts",
    "content": "type Px = number;\ntype Rem = number;\n\nconst rootRem: number = 16;\nconst calculateRem = (px: Px): Rem => (px / rootRem);\nexport default (px: Px): string => `${calculateRem(px)}rem`;\n"
  },
  {
    "path": "packages/openui/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \"src\",\n    \"module\": \"commonjs\",\n    \"target\": \"es6\",\n    \"moduleResolution\": \"node\",\n    \"allowSyntheticDefaultImports\": true,\n    \"noImplicitAny\": false,\n    \"sourceMap\": true,\n    \"outDir\": \"dist\",\n    \"jsx\": \"react\",\n    \"noUnusedLocals\": true,\n    \"declaration\": true\n  },\n  \"include\": [\n    \"src/**/*\"\n  ],\n  \"exclude\": [\n    \"node_modules\",\n    \"**/*.test.*\",\n    \"**/*.mock.*\",\n    \"dist\"\n  ]\n}\n"
  },
  {
    "path": "server.js",
    "content": "require('babel-core/register');\nrequire('./config/ignoreAssets');\nvar app = require('./build/src/server/index.jsx');\n"
  },
  {
    "path": "src/client/apolloClient.ts",
    "content": "import { ApolloClient, createNetworkInterface } from 'apollo-client';\n\ndeclare var window: {\n  __INITIAL_STATE__: string,\n};\n\nconst uri = process.env.API_URL || 'http://0.0.0.0:1338/api';\n\nconst client = new ApolloClient({\n  networkInterface: createNetworkInterface({\n    uri,\n  }),\n  initialState: typeof window !== 'undefined' ? window.__INITIAL_STATE__ : null, // eslint-disable-line\n  ssrForceFetchDelay: 100,\n});\n\nexport default client;\n"
  },
  {
    "path": "src/client/components/Html/index.tsx",
    "content": "import * as React from 'react';\nimport serialize from 'serialize-javascript';\n\nexport interface Props {\n  content: string;\n  state: {};\n  scriptHash: string;\n  vendorHash: string;\n  cssHash: string;\n  styles: string;\n}\nexport default function Html({\n  content,\n  state,\n  scriptHash,\n  vendorHash,\n  cssHash,\n  styles,\n}: Props) {\n  return (\n    <html lang=\"en\">\n      <head>\n        <meta charSet=\"UTF-8\" />\n        <meta httpEquiv=\"Content-Language\" content=\"en\" />\n        <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n        <title>Scalable React TypeScript Boilerplate</title>\n        <link href=\"https://fonts.googleapis.com/css?family=Hind|Montserrat|Roboto+Mono\" rel=\"stylesheet\" />\n        <link href={`public${cssHash}`} rel=\"stylesheet\" />\n        <style dangerouslySetInnerHTML={{ __html: styles }} />\n      </head>\n      <body>\n        <div id=\"app\" dangerouslySetInnerHTML={{ __html: content }} />\n        <script src={`public${scriptHash}`} charSet=\"UTF-8\" />\n        <script src={`public${vendorHash}`} type=\"text/javascript\" />\n        <script\n          dangerouslySetInnerHTML={{\n            __html: `window.__INITIAL_STATE__=${serialize(state, { isJSON: true })};`,\n          }}\n          charSet=\"UTF-8\"\n        />\n      </body>\n    </html>\n  );\n};\n"
  },
  {
    "path": "src/client/components/index.ts",
    "content": "/* GENERATOR-IMPORT */\nimport Html from './Html';\n\nexport {\n  /* GENERATOR-EXPORT */\n  Html,\n};\n"
  },
  {
    "path": "src/client/features/Landing/index.tsx",
    "content": "import * as React from 'react';\nimport Presentation from './presentation';\n\nexport interface Props {\n  title: string;\n}\n\nclass Landing extends React.Component<Props, undefined> {\n  public render() {\n    return (\n      <Presentation title=\"Welcome\" {...this.props} />\n    );\n  }\n}\n\nexport default Landing;\n"
  },
  {
    "path": "src/client/features/Landing/presentation.tsx",
    "content": "import * as React from 'react';\nimport { Heading, Paragraph } from 'openui';\nimport { Props } from './types';\nimport { Section } from './styles';\n\nexport default function LandingPresentation({ title }: Props) {\n  return (\n    <Section>\n      <Heading>\n        {title}\n      </Heading>\n      <Paragraph>\n        You can find me in `/src/client/features/landing`\n      </Paragraph>\n    </Section>\n  );\n}\n"
  },
  {
    "path": "src/client/features/Landing/styles.ts",
    "content": "import styled from 'styled-components';\n\nexport const Section = styled.section`\n  padding: 60px;\n  background-color: #f5f5f5;\n  min-height: 100vh;\n  align-items: center;\n  justify-content: center;\n  display: flex;\n  flex-direction: column;\n  h1, p {\n    color: #666 !important;\n  }\n`;\n"
  },
  {
    "path": "src/client/features/Landing/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "src/client/features/Layout/index.tsx",
    "content": "import * as React from 'react';\nimport LayoutPresentation from './presentation';\n\nexport interface Props {\n  children: JSX.Element;\n}\n\nclass Layout extends React.Component<Props, undefined> {\n  public render() {\n    return (\n      <LayoutPresentation {...this.props} />\n    );\n  }\n}\n\nexport default Layout;\n"
  },
  {
    "path": "src/client/features/Layout/main.ts",
    "content": "import styled from 'styled-components';\nimport styles from './styles';\n\nexport default styled.main`\n  ${styles}\n`;\n"
  },
  {
    "path": "src/client/features/Layout/presentation.tsx",
    "content": "import * as React from 'react';\nimport { Props } from './types';\nimport Main from './main';\n\nexport default function LayoutPresentation({ children }: Props): JSX.Element {\n  return (\n    <Main>\n      {React.cloneElement(children)}\n    </Main>\n  );\n}\n"
  },
  {
    "path": "src/client/features/Layout/styles.ts",
    "content": "import { css } from 'styled-components';\n\nexport default css`\n  min-height: 100vh;\n`;\n"
  },
  {
    "path": "src/client/features/Layout/types.ts",
    "content": "export { Props } from './';\n"
  },
  {
    "path": "src/client/features/index.ts",
    "content": "/* GENERATOR-IMPORT */\nimport Landing from './Landing';\nimport Layout from './Layout';\n\nexport {\n  /* GENERATOR-EXPORT */\n  Landing,\n  Layout,\n};\n"
  },
  {
    "path": "src/client/index.tsx",
    "content": "import * as React from 'react';\nimport { render } from 'react-dom';\nimport RouterApp from './routes';\nimport { AppContainer } from 'react-hot-loader';\nimport './theming/globalCss';\n\ndeclare var module: {\n  hot: {\n    accept: (s: string, f: () => void) => void,\n  },\n};\n\nconst rootEl = document.getElementById('app');\n\nrender(\n  <AppContainer>\n    <RouterApp />\n  </AppContainer>,\n  rootEl,\n);\n\nif (module.hot) {\n  const NextApp = require('./routes').default;\n  module.hot.accept('./routes', () => {\n    render(\n      <AppContainer>\n        <NextApp />\n      </AppContainer>,\n      rootEl,\n    );\n  });\n}\n"
  },
  {
    "path": "src/client/logic.ts",
    "content": "\r\nconst rootLogic = [\r\n];\r\n\r\nexport default rootLogic;\r\n"
  },
  {
    "path": "src/client/reducers.ts",
    "content": "import { combineReducers, Reducer } from 'redux';\nimport { routerReducer } from 'react-router-redux';\nimport client from './apolloClient';\n/* GENERATOR-IMPORT-REDUCER */\n\nexport const rootReducer = combineReducers({\n  /* GENERATOR-EXPORT-REDUCER */\n  routing: routerReducer,\n  apollo: client.reducer() as Reducer<undefined>,\n});\n"
  },
  {
    "path": "src/client/routes.tsx",
    "content": "import * as React from 'react';\nimport { ApolloProvider } from 'react-apollo';\nimport { ThemeProvider } from 'styled-components';\nimport { Route, IndexRoute, Router as ReactRouter } from 'react-router';\nimport client from './apolloClient';\nimport store, { history } from './store';\nimport { Layout, Landing } from 'features';\nimport colors from './theming';\n\nimport ReactGA from 'react-ga';\n\nif (typeof window !== 'undefined') {\n  ReactGA.initialize('UA-89939143-1');\n}\n\nconst logPage = () => {\n  if (typeof window !== 'undefined') {\n    window.scrollTo(0, 0);\n    ReactGA.set({ page: window.location.pathname });\n    ReactGA.pageview(window.location.pathname);\n  }\n};\n\nexport const routes = (\n  <Route path=\"/\" component={Layout}>\n    <IndexRoute component={Landing} />\n  </Route>\n);\n\nconst RouterApp = () => (\n  <ApolloProvider store={store} client={client}>\n    <ThemeProvider theme={colors}>\n      <ReactRouter\n        onUpdate={logPage}\n        history={history}\n        routes={routes}\n      />\n    </ThemeProvider>\n  </ApolloProvider>\n);\n\nexport default RouterApp;\n"
  },
  {
    "path": "src/client/shared/actionCreators.ts",
    "content": "import {DefaultAction} from './actions';\nimport * as types from './constants';\n\nexport const defaultAction = (): DefaultAction => ({\n  type: types.DEFAULT_ACTION_TYPE,\n});\n"
  },
  {
    "path": "src/client/shared/actions.ts",
    "content": "import { Action } from 'redux';\nimport * as types from './constants';\n\nexport interface DefaultAction extends Action {\n  type: types.DEFAULT_ACTION_TYPE\n}\n\nexport interface PayloadAction<P> extends Action {\n  type: string;\n  payload?: P;\n}\n"
  },
  {
    "path": "src/client/shared/constants.ts",
    "content": "export type DEFAULT_ACTION_TYPE = '';\nexport const DEFAULT_ACTION_TYPE: DEFAULT_ACTION_TYPE = '';\n"
  },
  {
    "path": "src/client/state.ts",
    "content": "/* GENERATOR-IMPORT-STATE */\r\n\r\nexport interface State {\r\n  /* GENERATOR-EXPORT-STATE-TYPE */\r\n}\r\n\r\nexport const initialState: State = {\r\n  /* GENERATOR-EXPORT-STATE */\r\n};\r\n"
  },
  {
    "path": "src/client/store.tsx",
    "content": "import { createStore, applyMiddleware, Middleware, GenericStoreEnhancer, compose } from 'redux';\nimport { syncHistoryWithStore } from 'react-router-redux';\nimport { browserHistory } from 'react-router';\nimport { createLogicMiddleware } from 'redux-logic';\nimport { rootReducer } from './reducers';\nimport { initialState as defaultInitialState} from './state';\nimport apolloClient from './apolloClient';\nimport rootLogic from './logic';\nimport axios from 'axios';\n\nconst isClient = typeof document !== 'undefined';\n\ndeclare var window: { __INITIAL_STATE__: {} };\nconst initialState = isClient ? window.__INITIAL_STATE__ : defaultInitialState;\n\nfunction createThunkMiddleware() {\n  return ({ dispatch, getState }) => (next) => (action) => {\n    if (typeof action === 'function') {\n      return action(dispatch, getState);\n    }\n\n    return next(action);\n  };\n}\n\nconst dependencies = {\n  httpClient: axios,\n};\n\nconst thunk = createThunkMiddleware();\nconst logicMiddleware = createLogicMiddleware(rootLogic, dependencies);\nconst apolloClientMiddleware = apolloClient.middleware();\n\nconst middlewares: Middleware[] = [\n  thunk,\n  apolloClientMiddleware,\n  logicMiddleware,\n];\n\nconst enhancers: GenericStoreEnhancer[] = [\n  applyMiddleware(...middlewares),\n];\n\nconst ReduxExtentionComposeName: string = '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__';\nconst composeEnhancers =\n  process.env.NODE_ENV !== 'production' &&\n  typeof window === 'object' &&\n    window[ReduxExtentionComposeName] ?\n    window[ReduxExtentionComposeName] : compose;\n\nconst store = createStore(\n  rootReducer,\n  initialState,\n  composeEnhancers(...enhancers),\n);\n\nexport const history = isClient ?\n  syncHistoryWithStore(browserHistory, store) : undefined;\n\nexport default store;\n"
  },
  {
    "path": "src/client/test/mockstore.ts",
    "content": "\r\nimport configureMockStore from 'redux-mock-store';\r\nimport { Middleware } from 'redux';\r\nimport { createLogicMiddleware } from 'redux-logic';\r\nimport rootLogic from '../logic';\r\nimport axios from 'axios';\r\n\r\nconst dependencies = {\r\n  httpClient: axios,\r\n};\r\n\r\nconst logicMiddleware = createLogicMiddleware(rootLogic, dependencies);\r\n\r\nconst middlewares: Middleware[] = [\r\n  logicMiddleware,\r\n];\r\n\r\nconst mockStore = configureMockStore(middlewares);\r\n\r\nexport default mockStore;\r\n"
  },
  {
    "path": "src/client/theming/colorMap.ts",
    "content": "import { ThemeColorMap } from './types';\n\nconst colorMap: ThemeColorMap = {\n  dark1: '#293953',\n  dark2: '#6B4E71',\n  dark3: '#829399',\n  light1: '#34E4EA',\n  light2: '#D6DBB2',\n  light3: '#6D72C3',\n  primary: '#007acc',\n  secondary: '#c05b4d',\n  ok: '#8cc800',\n  warning: '#ffd602',\n  error: '#ff324d',\n  white1: '#fff',\n  white2: '#f3f3f3',\n  white3: '#e6e8ec',\n  offwhite: '#f5f5f5',\n  black1: '#0a0a0a',\n  black2: '#2d2d2d',\n  black3: '#555555',\n};\n\nexport default colorMap;\n"
  },
  {
    "path": "src/client/theming/globalCss.ts",
    "content": "import { injectGlobal } from 'styled-components';\n\nconst globalCss = injectGlobal`\n  * {\n    box-sizing: border-box;\n  }\n\n  body {\n    overflow: scroll;\n    overflow-x: hidden;\n    padding: 0;\n    margin: 0;\n    font-family: Hind,sans-serif;\n    font-weight: 400;\n    line-height: 1.5;\n    color: #0a0a0a;\n    background: #fff;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n\n  html {\n    font-size: 100%;\n    box-sizing: border-box;\n    overflow-x: hidden;\n  }\n\n  .markdown-body {\n    max-width: 100% !important;\n  }\n`;\n\nexport default globalCss;\n"
  },
  {
    "path": "src/client/theming/index.ts",
    "content": "import colorMap from './colorMap';\n\nexport default colorMap;\n"
  },
  {
    "path": "src/client/theming/types.ts",
    "content": "export interface ThemeColorMap {\n  dark1: string,\n  dark2: string,\n  dark3: string,\n  light1: string,\n  light2: string,\n  light3: string,\n  primary: string,\n  secondary: string,\n  ok: string,\n  warning: string,\n  error: string,\n  white1: string,\n  white2: string,\n  white3: string,\n  offwhite: string,\n  black1: string,\n  black2: string,\n  black3: string,\n}\n"
  },
  {
    "path": "src/client/types.ts",
    "content": "import { Action } from 'redux';\n/* GENERATOR-IMPORT */\nimport * as LandingTypes from 'features/Landing/types';\nimport * as LayoutTypes from 'features/Layout/types';\nexport { ThemeColorMap } from './theming/types';\n\nexport interface PayloadAction<P> extends Action {\n  type: string;\n  payload?: P;\n}\n\nexport interface FormControlEventTarget extends EventTarget {\n  value: string;\n}\n\nexport {\n  /* GENERATOR-EXPORT */\n  LandingTypes,\n  LayoutTypes,\n};\n"
  },
  {
    "path": "src/server/db/index.ts",
    "content": "import mongoose from 'mongoose';\nimport path from 'path';\nimport PostModel from './models/post';\n\nfunction seedPosts() {\n  return [\n    {\n      title: 'Welcome!',\n      content: 'Hey there!  Welcome to the blog of Scalable-React-TypeScript! ' +\n        'This is just an introductory post, but stay tuned for more!',\n      image: 'https://raw.githubusercontent.com/RyanCCollins/cdn/master/stsb-images/ts-resized-2.png',\n    },\n  ];\n}\n\nfunction createSeedPosts() {\n  return new Promise((res, rej) => {\n    PostModel.find().exec((err, docs) => {\n      if (docs.length === 0) {\n        PostModel.create(\n          seedPosts(),\n          (err, data) => {\n            if (err) {\n              rej(err);\n            }\n            res(data);\n          },\n        );\n      }\n    });\n  });\n}\n\nfunction createSeedData() {\n  return new Promise((res, rej) => {\n    createSeedPosts().then(() => {\n      res();\n    }).catch((err) => rej(err));\n  });\n}\n\nconst env = require('node-env-file');\n\nenv(path.join(process.cwd(), '.env'));\n\nconst dbUri = process.env.MONGODB_URI;\n\nmongoose.Promise = global.Promise;\n\nmongoose.connect(dbUri);\nmongoose.connection.on('connected', () => {\n  console.info(`Mongoose connection open to ${dbUri}`);\n  createSeedData();\n});\n\nprocess.on('SIGINT', () => {\n  mongoose.connection.close(() => {\n    console.info('Mongoose connection disconnected through app termination');\n    process.exit(0);\n  });\n});\n"
  },
  {
    "path": "src/server/db/models/post.ts",
    "content": "import mongoose from 'mongoose';\n\nconst PostSchema = new mongoose.Schema({\n  title: {\n    type: String,\n  },\n  image: {\n    type: String,\n  },\n  content: {\n    type: String,\n  },\n  comments: [{ type: String, ref: 'Comment' }],\n});\n\nexport default mongoose.model('Post', PostSchema);\n"
  },
  {
    "path": "src/server/db/utils/uuid.ts",
    "content": "// tslint:disable\nexport default function uuid() {\n  var i;\n  var random;\n  var uuid = '';\n  for (i = 0; i < 32; i++) {\n    random = Math.random() * 16 | 0;\n    if (i === 8 || i === 12 || i === 16 || i === 20) {\n      uuid += '-';\n    }\n\n    uuid += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16);\n  }\n\n  return uuid;\n}"
  },
  {
    "path": "src/server/graph/index.ts",
    "content": "import {\n  GraphQLObjectType,\n  GraphQLSchema,\n} from 'graphql';\n\nimport queries from './queries';\nimport mutations from './mutations';\n\nconst RootQuery: GraphQLObjectType = new GraphQLObjectType({\n  name: 'Query',\n  fields: () => queries,\n});\n\nconst RootMutation: GraphQLObjectType = new GraphQLObjectType({\n  name: 'Mutation',\n  fields: () => mutations,\n});\n\nexport default new GraphQLSchema({\n  query: RootQuery,\n  mutation: RootMutation,\n});\n"
  },
  {
    "path": "src/server/graph/mutations/index.ts",
    "content": "\nexport default {\n\n};\n"
  },
  {
    "path": "src/server/graph/queries/index.ts",
    "content": "\nexport default {\n\n};\n"
  },
  {
    "path": "src/server/graph/schema.json",
    "content": "{\n  \"data\": {\n    \"__schema\": {\n      \"queryType\": {\n        \"name\": \"Query\"\n      },\n      \"mutationType\": null,\n      \"subscriptionType\": null,\n      \"types\": [\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Query\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"posts\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"Post\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Post\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"id\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"title\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"snippet\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"recommendations\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"Recommendation\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"tags\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"Tag\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"uniqueSlug\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"image\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"SCALAR\",\n          \"name\": \"String\",\n          \"description\": \"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Recommendation\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"Tag\",\n          \"description\": null,\n          \"fields\": [\n            {\n              \"name\": \"slug\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Schema\",\n          \"description\": \"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.\",\n          \"fields\": [\n            {\n              \"name\": \"types\",\n              \"description\": \"A list of all types supported by this server.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__Type\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"queryType\",\n              \"description\": \"The type that query operations will be rooted at.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"__Type\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"mutationType\",\n              \"description\": \"If this server supports mutation, the type that mutation operations will be rooted at.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"OBJECT\",\n                \"name\": \"__Type\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"subscriptionType\",\n              \"description\": \"If this server support subscription, the type that subscription operations will be rooted at.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"OBJECT\",\n                \"name\": \"__Type\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"directives\",\n              \"description\": \"A list of all directives supported by this server.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__Directive\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Type\",\n          \"description\": \"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\\n\\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.\",\n          \"fields\": [\n            {\n              \"name\": \"kind\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"ENUM\",\n                  \"name\": \"__TypeKind\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"fields\",\n              \"description\": null,\n              \"args\": [\n                {\n                  \"name\": \"includeDeprecated\",\n                  \"description\": null,\n                  \"type\": {\n                    \"kind\": \"SCALAR\",\n                    \"name\": \"Boolean\",\n                    \"ofType\": null\n                  },\n                  \"defaultValue\": \"false\"\n                }\n              ],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__Field\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"interfaces\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__Type\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"possibleTypes\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__Type\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"enumValues\",\n              \"description\": null,\n              \"args\": [\n                {\n                  \"name\": \"includeDeprecated\",\n                  \"description\": null,\n                  \"type\": {\n                    \"kind\": \"SCALAR\",\n                    \"name\": \"Boolean\",\n                    \"ofType\": null\n                  },\n                  \"defaultValue\": \"false\"\n                }\n              ],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__EnumValue\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"inputFields\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"LIST\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"NON_NULL\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"OBJECT\",\n                    \"name\": \"__InputValue\",\n                    \"ofType\": null\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ofType\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"OBJECT\",\n                \"name\": \"__Type\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"ENUM\",\n          \"name\": \"__TypeKind\",\n          \"description\": \"An enum describing what kind of type a given `__Type` is.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": [\n            {\n              \"name\": \"SCALAR\",\n              \"description\": \"Indicates this type is a scalar.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"OBJECT\",\n              \"description\": \"Indicates this type is an object. `fields` and `interfaces` are valid fields.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INTERFACE\",\n              \"description\": \"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"UNION\",\n              \"description\": \"Indicates this type is a union. `possibleTypes` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ENUM\",\n              \"description\": \"Indicates this type is an enum. `enumValues` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INPUT_OBJECT\",\n              \"description\": \"Indicates this type is an input object. `inputFields` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"LIST\",\n              \"description\": \"Indicates this type is a list. `ofType` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"NON_NULL\",\n              \"description\": \"Indicates this type is a non-null. `ofType` is a valid field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"SCALAR\",\n          \"name\": \"Boolean\",\n          \"description\": \"The `Boolean` scalar type represents `true` or `false`.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Field\",\n          \"description\": \"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"args\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__InputValue\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"type\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"__Type\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"isDeprecated\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"deprecationReason\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__InputValue\",\n          \"description\": \"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"type\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"OBJECT\",\n                  \"name\": \"__Type\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"defaultValue\",\n              \"description\": \"A GraphQL-formatted string representing the default value for this input value.\",\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__EnumValue\",\n          \"description\": \"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"isDeprecated\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"deprecationReason\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"OBJECT\",\n          \"name\": \"__Directive\",\n          \"description\": \"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\\n\\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"String\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"description\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"locations\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"ENUM\",\n                      \"name\": \"__DirectiveLocation\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"args\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"LIST\",\n                  \"name\": null,\n                  \"ofType\": {\n                    \"kind\": \"NON_NULL\",\n                    \"name\": null,\n                    \"ofType\": {\n                      \"kind\": \"OBJECT\",\n                      \"name\": \"__InputValue\",\n                      \"ofType\": null\n                    }\n                  }\n                }\n              },\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"onOperation\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": true,\n              \"deprecationReason\": \"Use `locations`.\"\n            },\n            {\n              \"name\": \"onFragment\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": true,\n              \"deprecationReason\": \"Use `locations`.\"\n            },\n            {\n              \"name\": \"onField\",\n              \"description\": null,\n              \"args\": [],\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"isDeprecated\": true,\n              \"deprecationReason\": \"Use `locations`.\"\n            }\n          ],\n          \"inputFields\": null,\n          \"interfaces\": [],\n          \"enumValues\": null,\n          \"possibleTypes\": null\n        },\n        {\n          \"kind\": \"ENUM\",\n          \"name\": \"__DirectiveLocation\",\n          \"description\": \"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.\",\n          \"fields\": null,\n          \"inputFields\": null,\n          \"interfaces\": null,\n          \"enumValues\": [\n            {\n              \"name\": \"QUERY\",\n              \"description\": \"Location adjacent to a query operation.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"MUTATION\",\n              \"description\": \"Location adjacent to a mutation operation.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"SUBSCRIPTION\",\n              \"description\": \"Location adjacent to a subscription operation.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FIELD\",\n              \"description\": \"Location adjacent to a field.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FRAGMENT_DEFINITION\",\n              \"description\": \"Location adjacent to a fragment definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FRAGMENT_SPREAD\",\n              \"description\": \"Location adjacent to a fragment spread.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INLINE_FRAGMENT\",\n              \"description\": \"Location adjacent to an inline fragment.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"SCHEMA\",\n              \"description\": \"Location adjacent to a schema definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"SCALAR\",\n              \"description\": \"Location adjacent to a scalar definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"OBJECT\",\n              \"description\": \"Location adjacent to an object type definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"FIELD_DEFINITION\",\n              \"description\": \"Location adjacent to a field definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ARGUMENT_DEFINITION\",\n              \"description\": \"Location adjacent to an argument definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INTERFACE\",\n              \"description\": \"Location adjacent to an interface definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"UNION\",\n              \"description\": \"Location adjacent to a union definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ENUM\",\n              \"description\": \"Location adjacent to an enum definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"ENUM_VALUE\",\n              \"description\": \"Location adjacent to an enum value definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INPUT_OBJECT\",\n              \"description\": \"Location adjacent to an input object type definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            },\n            {\n              \"name\": \"INPUT_FIELD_DEFINITION\",\n              \"description\": \"Location adjacent to an input object field definition.\",\n              \"isDeprecated\": false,\n              \"deprecationReason\": null\n            }\n          ],\n          \"possibleTypes\": null\n        }\n      ],\n      \"directives\": [\n        {\n          \"name\": \"include\",\n          \"description\": \"Directs the executor to include this field or fragment only when the `if` argument is true.\",\n          \"locations\": [\n            \"FIELD\",\n            \"FRAGMENT_SPREAD\",\n            \"INLINE_FRAGMENT\"\n          ],\n          \"args\": [\n            {\n              \"name\": \"if\",\n              \"description\": \"Included when true.\",\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"defaultValue\": null\n            }\n          ]\n        },\n        {\n          \"name\": \"skip\",\n          \"description\": \"Directs the executor to skip this field or fragment when the `if` argument is true.\",\n          \"locations\": [\n            \"FIELD\",\n            \"FRAGMENT_SPREAD\",\n            \"INLINE_FRAGMENT\"\n          ],\n          \"args\": [\n            {\n              \"name\": \"if\",\n              \"description\": \"Skipped when true.\",\n              \"type\": {\n                \"kind\": \"NON_NULL\",\n                \"name\": null,\n                \"ofType\": {\n                  \"kind\": \"SCALAR\",\n                  \"name\": \"Boolean\",\n                  \"ofType\": null\n                }\n              },\n              \"defaultValue\": null\n            }\n          ]\n        },\n        {\n          \"name\": \"deprecated\",\n          \"description\": \"Marks an element of a GraphQL schema as no longer supported.\",\n          \"locations\": [\n            \"FIELD_DEFINITION\",\n            \"ENUM_VALUE\"\n          ],\n          \"args\": [\n            {\n              \"name\": \"reason\",\n              \"description\": \"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).\",\n              \"type\": {\n                \"kind\": \"SCALAR\",\n                \"name\": \"String\",\n                \"ofType\": null\n              },\n              \"defaultValue\": \"\\\"No longer supported\\\"\"\n            }\n          ]\n        }\n      ]\n    }\n  }\n}"
  },
  {
    "path": "src/server/graph/types/index.ts",
    "content": "\nexport default {\n\n};\n"
  },
  {
    "path": "src/server/graphqlEntry.ts",
    "content": "import 'babel-polyfill';\nimport path from 'path';\nimport fs from 'fs';\nimport * as express from 'express';\nimport { graphql } from 'graphql';\nimport { introspectionQuery } from 'graphql/utilities';\nimport bodyParser from 'body-parser';\nimport cors from 'cors';\nimport { graphiqlExpress, graphqlExpress } from 'graphql-server-express';\nimport schema from './graph';\n\nfunction createSchema() {\n  return new Promise<string>((res, rej) => {\n    graphql(schema, introspectionQuery)\n      .then((json) => {\n        fs.writeFile(\n          path.join(__dirname, './graph/schema.json'),\n          JSON.stringify(json, null, 2),\n          (err) => {\n            if (err) {\n              rej(`Error occured while creating graphql schema. ${err}`);\n            }\n            res('Schema successfully created');\n          },\n        );\n      });\n  });\n}\n\nexport default function graphqlEntry(app): Promise<express.Application> {\n  return new Promise<express.Application>(async (res, rej) => {\n    app.use(bodyParser.json());\n    app.use(bodyParser.urlencoded({ extended: true }));\n    app.use('/api', cors(), graphqlExpress({\n      schema,\n    }));\n\n    app.use('/graphql-ui', graphiqlExpress({\n      endpointURL: '/api',\n    }));\n    await createSchema().catch((err) => rej(err));\n    res(app);\n  });\n};\n"
  },
  {
    "path": "src/server/index.tsx",
    "content": "import * as React from 'react';\nimport { ApolloClient, createNetworkInterface } from 'apollo-client';\nimport { renderToString, renderToStaticMarkup } from 'react-dom/server';\nimport { match, RouterContext } from 'react-router';\nimport morgan from 'morgan';\nimport express from 'express';\nimport compression from 'compression';\nimport path from 'path';\nimport { ThemeProvider } from 'styled-components';\nimport theme from '../client/theming';\nimport { ApolloProvider, getDataFromTree } from 'react-apollo';\nimport store from '../client/store';\nimport { routes } from '../client/routes';\nimport Html from '../client/components/Html';\nimport graphQlEntry from './graphqlEntry';\nimport 'isomorphic-fetch';\n\nconst env = require('node-env-file');\nenv(path.join(process.cwd(), '.env'));\nrequire('./db');\n\nconst styleSheet = require('styled-components/lib/models/StyleSheet');\nconst manifest = require('../../public/manifest.json');\n\nconst expressApp = express();\ngraphQlEntry(expressApp).then((app) => {\n  app.use(compression());\n\n  // Need to set this to your api url\n  const IP = process.env.IP || '0.0.0.0';\n  const PORT = process.env.PORT || 1338;\n  const API_URL = process.env.API_URL;\n  const apiUrl = API_URL || `http://${IP}:${PORT}/api`;\n  const debug = process.env.DEBUG === 'true' || false;\n  if (debug) {\n    app.use(morgan('combined'));\n  }\n  app.use('/public', express.static(path.join(__dirname, '../../public')));\n\n  app.use((req, res) => {\n    match({ routes, location: req.url },\n      (error, redirectLocation, renderProps) => {\n        if (redirectLocation) {\n          res.redirect(redirectLocation.pathname + redirectLocation.search);\n        } else if (error) {\n          console.error('ROUTER ERROR:', error); // eslint-disable-line no-console\n          res.status(500);\n        } else if (renderProps) {\n          const styles = !process.env.browser\n            ? styleSheet.rules().map((rule) => rule.cssText).join('\\n')\n            : null;\n\n          const networkInterface = createNetworkInterface({\n            uri: apiUrl,\n            opts: {\n              headers: req.headers,\n              credentials: 'same-origin',\n            },\n          });\n\n          const client = new ApolloClient({\n            networkInterface,\n            ssrMode: true,\n          });\n\n          const component = (\n            <ApolloProvider store={store} client={client}>\n              <ThemeProvider theme={theme}>\n                <RouterContext {...renderProps} />\n              </ThemeProvider>\n            </ApolloProvider>\n          );\n          getDataFromTree(component).then(() => {\n            const content = renderToString(component);\n            const state = { apollo: client.getInitialState() };\n            const html = (\n              <Html\n                content={content}\n                scriptHash={manifest['/main.js']}\n                vendorHash={manifest['/vendor.js']}\n                cssHash={manifest['/main.css']}\n                styles={styles}\n                state={state}\n              />\n            );\n            res.status(200).send(`<!doctype html>\\n${renderToStaticMarkup(html)}`);\n          }).catch((err) => console.error(`Server rendering error: ${err}`));\n        } else {\n          res.status(404).send('Not found');\n        }\n      });\n  });\n\n  app.listen(PORT, IP, (err) => {\n    if (err) {\n      throw err;\n    }\n    return console.info(`==> 😎 Listening on port ${PORT}. Open http://${IP}:${PORT} in your browser.`);\n  });\n})\n.catch((err) => console.error(err));\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \"src/client\",\n    \"module\": \"es6\",\n    \"target\": \"es6\",\n    \"moduleResolution\": \"node\",\n    \"allowSyntheticDefaultImports\": true,\n    \"noImplicitAny\": false,\n    \"sourceMap\": true,\n    \"outDir\": \"build/src\",\n    \"jsx\": \"preserve\",\n    \"allowJs\": true,\n    \"noUnusedLocals\": true,\n    \"paths\": {\n      \"components/*\": [\"./components/*\"],\n      \"features/*\": [\"./features/*\"],\n      \"test/*\": [\"./test/*\"],\n      \"shared/*\": [\"./shared/*\"],\n      \"root/*\": [\"./*\"]\n    }\n  },\n  \"include\": [\n    \"src/**/*\"\n  ],\n  \"exclude\": [\n    \"node_modules\",\n    \"**/*.test.*\",\n    \"**/*.mock.*\"\n  ]\n}"
  },
  {
    "path": "tslint.json",
    "content": "{\n  \"extends\": [\n    \"tslint:latest\",\n    \"tslint-react\",\n    \"tslint-eslint-rules\"\n  ],\n  \"rules\": {\n    \"ter-indent\": [true, 2],\n    \"quotemark\": [\n      true,\n      \"single\",\n      \"jsx-double\"\n    ],\n    \"no-var-requires\": false,\n    \"ordered-imports\": [false],\n    \"member-ordering\": [\n      false\n    ],\n    \"class-name\": true,\n    \"curly\": true,\n    \"eofline\": true,\n    \"forin\": true,\n    \"ban\": true,\n    \"label-position\": true,\n    \"no-any\": true,\n    \"max-line-length\": [\n      true,\n      120\n    ],\n    \"semicolon\": [\n      true,\n      \"always\",\n      \"ignore-bound-class-methods\",\n      \"ignore-interfaces\"\n    ],\n    \"no-arg\": true,\n    \"no-consecutive-blank-lines\": [\n      true\n    ],\n    \"object-literal-sort-keys\": false,\n    \"no-shadowed-variable\": false,\n    \"no-console\": [\n      false\n    ],\n    \"no-construct\": true,\n    \"no-debugger\": true,\n    \"no-duplicate-variable\": true,\n    \"no-empty\": true,\n    \"no-eval\": true,\n    \"ban-types\": true,\n    \"no-string-literal\": true,\n    \"no-switch-case-fall-through\": true,\n    \"no-trailing-whitespace\": true,\n    \"no-unused-expression\": true,\n    \"no-use-before-declare\": true,\n    \"no-unused-variable\":[true, \"react\"],\n    \"radix\": true,\n    \"switch-default\": true,\n    \"interface-name\": [true, \"never-prefix\"],\n    \"jsx-alignment\": [\n      true\n    ],\n    \"jsx-no-lambda\": [\n      false\n    ],\n    \"jsx-wrap-multiline\": [\n      false\n    ],\n    \"jsx-no-multiline-js\": [\n      false\n    ],\n    \"jsx-boolean-value\": [\n      false\n    ]\n  }\n}\n"
  },
  {
    "path": "webpack.config.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\n\nconst ROOT_PATH = path.resolve(__dirname);\n\nmodule.exports = {\n  devtool: 'cheap-module-source-map',\n  entry: [\n    'react-hot-loader/patch',\n    'webpack-hot-middleware/client',\n    './src/client/index.tsx'\n  ],\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'app.js',\n    publicPath: '/',\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.jsx'],\n    alias: {\n      components: path.resolve(ROOT_PATH, 'src/client/components'),\n      features: path.resolve(ROOT_PATH, 'src/client/features'),\n      ui: path.resolve(ROOT_PATH, 'packages/ui/src'),\n      test: path.resolve(ROOT_PATH, 'src/client/test'),\n      shared: path.resolve(ROOT_PATH, 'src/client/shared'),\n      root: path.resolve(ROOT_PATH, 'src/client/'),\n    },\n  },\n  module: {\n    rules: [\n      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: [path.join(__dirname, 'src'), path.resolve(__dirname, 'packages')] },\n      { test: /\\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'], include: path.join(__dirname, 'src') },\n      { test: /\\.css$/, loader: 'style-loader!css-loader' },\n      { test: /\\.json$/, loader: 'json-loader' },\n      { test: /\\.md$/, loader: 'html!markdown-loader' },\n    ],\n  },\n  plugins: [\n    new webpack.HotModuleReplacementPlugin(),\n  ]\n};\n"
  },
  {
    "path": "webpack.config.prod.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\nconst HtmlwebpackPlugin = require('html-webpack-plugin');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst autoprefixer = require('autoprefixer');\nconst precss = require('precss');\nconst ManifestPlugin = require('webpack-manifest-plugin');\n\nconst ROOT_PATH = path.resolve(__dirname);\n\nmodule.exports = {\n  devtool: 'source-map',\n  entry: {\n    main: [\n      './src/client/index.tsx'\n    ],\n    vendor: [\n      'react',\n      'react-dom',\n      'styled-components',\n      'react-redux',\n      'react-router',\n      'react-router-redux',\n      'react-markdown',\n      'redux-connect',\n      'redux',\n      'rxjs',\n      'axios',\n      'redux-logic',\n      'react-apollo',\n      'graphql-tag',\n      'apollo-client',\n    ]\n  },\n  output: {\n    path: path.resolve(ROOT_PATH, './build/public'),\n    publicPath: '/',\n    filename: '[name].[chunkhash].js',\n    chunkFilename: '[name].[chunkhash].chunk.js',\n  },\n  stats: {\n    chunks: true,\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.jsx'],\n    alias: {\n      components: path.resolve(ROOT_PATH, 'src/client/components'),\n      features: path.resolve(ROOT_PATH, 'src/client/features'),\n      shared: path.resolve(ROOT_PATH, 'src/client/shared'),\n      ui: path.resolve(ROOT_PATH, 'packages/ui/src'),\n      test: path.resolve(ROOT_PATH, 'src/client/test'),\n      root: path.resolve(ROOT_PATH, 'src/client/'),\n    },\n  },\n  module: {\n    loaders: [\n      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: [path.join(__dirname, 'src'), path.resolve(__dirname, 'packages')] },\n      { test: /\\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'], include: path.join(__dirname, 'src') },\n      {\n        test: /\\.css$/,\n        loader: ExtractTextPlugin.extract({\n          fallback: 'style-loader',\n          use: 'css-loader!postcss-loader'\n        }),\n      },\n      { test: /\\.json$/, loader: 'json-loader' },\n      { test: /\\.md$/, loader: 'html!markdown-loader' },\n    ]\n  },\n  plugins: [\n    new ManifestPlugin({\n      fileName: 'manifest.json',\n      basePath: '/'\n    }),\n    new ExtractTextPlugin('[name].[contenthash].css'),\n    new webpack.optimize.CommonsChunkPlugin({\n      name: 'vendor',\n      children: true,\n      minChunks: 2,\n      async: true,\n    }),\n    new webpack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),\n      'process.env.API_URL': JSON.stringify(process.env.API_URL || 'http://localhost:1338/api'),\n    }),\n    new webpack.optimize.OccurrenceOrderPlugin(true),\n    new webpack.optimize.UglifyJsPlugin({\n      sourceMap: false\n    }),\n    new webpack.LoaderOptionsPlugin({\n      debug: false,\n      minimize: true,\n      debug: false,\n      options: {\n        /**\n         * Legacy postCSS config\n         * @reference https://github.com/azat-io/webpack2-css-modules-demo/blob/master/scripts/webpack.config.babel.js\n         */\n        postcss: function () {\n         return {\n           defaults: [precss, autoprefixer],\n           cleaner:  [autoprefixer({ browsers: [] })]\n         };\n        },\n      }\n    }),\n  ]\n};\n"
  },
  {
    "path": "webpack.config.server.js",
    "content": "const webpack = require('webpack');\nconst path = require('path');\nconst ROOT_PATH = path.resolve(__dirname);\n\nmodule.exports = {\n  target: 'node',\n  entry: [\n    './src/server/index.tsx'\n  ],\n  output: {\n    path: path.resolve(__dirname, 'public'),\n    filename: '../build/server.js',\n    publicPath: '/public/',\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.jsx', '.css'],\n    alias: {\n      components: path.resolve(ROOT_PATH, 'build/src/client/components'),\n      features: path.resolve(ROOT_PATH, 'build/src/client/features'),\n      ui: path.resolve(ROOT_PATH, 'packages/ui/dist'),\n      test: path.resolve(ROOT_PATH, 'build/src/client/test'),\n      shared: path.resolve(ROOT_PATH, 'build/src/client/shared'),\n      root: path.resolve(ROOT_PATH, 'build/src/client/'),\n    },\n  },\n  module: {\n    rules: [\n      { test: /\\.tsx?$/, loaders: ['babel-loader', 'ts-loader'], include: [path.join(__dirname, 'src'), path.resolve(__dirname, 'packages')] },\n      { test: /\\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'], include: path.join(__dirname, 'src') },\n      { test: /\\.css$/, loader: 'style-loader!css-loader' },\n      { test: /\\.json$/, loader: 'json-loader' },\n      { test: /\\.md$/, loader: 'html!markdown-loader' },\n    ],\n  },\n  plugins: [\n    new webpack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),\n      'process.env.API_URL': JSON.stringify(process.env.API_URL || 'http://localhost:1338/api'),\n    }),\n  ]\n};\n"
  }
]