[
  {
    "path": ".babelrc",
    "content": "{\n  \"presets\": [\"es2015\", \"stage-2\", \"react\"],\n  \"plugins\": [\"react-require\"]\n}"
  },
  {
    "path": ".eslintrc",
    "content": "{\n  \"parser\": \"babel-eslint\",\n\n  \"plugins\": [\n    \"babel\", \"react\"\n  ],\n\n  \"env\": {\n    \"es6\": true,\n    \"node\": true\n  },\n\n  \"ecmaFeatures\": {\n    \"arrowFunctions\": true,\n    \"binaryLiterals\": true,\n    \"blockBindings\": true,\n    \"classes\": true,\n    \"defaultParams\": true,\n    \"destructuring\": true,\n    \"experimentalObjectRestSpread\": true,\n    \"forOf\": true,\n    \"generators\": true,\n    \"globalReturn\": true,\n    \"jsx\": true,\n    \"modules\": true,\n    \"objectLiteralComputedProperties\": true,\n    \"objectLiteralDuplicateProperties\": true,\n    \"objectLiteralShorthandMethods\": true,\n    \"objectLiteralShorthandProperties\": true,\n    \"octalLiterals\": true,\n    \"regexUFlag\": true,\n    \"regexYFlag\": true,\n    \"restParams\": true,\n    \"spread\": true,\n    \"superInFunctions\": true,\n    \"templateStrings\": true,\n    \"unicodeCodePointEscapes\": true\n  },\n\n  \"rules\": {\n    \"babel/arrow-parens\": [2, \"as-needed\"],\n\n    \"array-bracket-spacing\": [2, \"always\"],\n    \"arrow-spacing\": 2,\n    \"block-scoped-var\": 0,\n    \"brace-style\": [2, \"1tbs\", {\"allowSingleLine\": true}],\n    \"callback-return\": 2,\n    \"camelcase\": [2, {\"properties\": \"always\"}],\n    \"comma-dangle\": 0,\n    \"comma-spacing\": 0,\n    \"comma-style\": [2, \"last\"],\n    \"complexity\": 0,\n    \"computed-property-spacing\": [2, \"never\"],\n    \"consistent-return\": 0,\n    \"consistent-this\": 0,\n    \"curly\": [2, \"all\"],\n    \"default-case\": 0,\n    \"dot-location\": [2, \"property\"],\n    \"dot-notation\": 0,\n    \"eol-last\": 2,\n    \"eqeqeq\": 2,\n    \"func-names\": 0,\n    \"func-style\": 0,\n    \"generator-star-spacing\": [0, {\"before\": true, \"after\": false}],\n    \"guard-for-in\": 2,\n    \"handle-callback-err\": [2, \"error\"],\n    \"id-length\": 0,\n    \"id-match\": [2, \"^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$\"],\n    \"indent\": [2, 2, {\"SwitchCase\": 1}],\n    \"init-declarations\": 0,\n    \"key-spacing\": [2, {\"beforeColon\": false, \"afterColon\": true}],\n    \"linebreak-style\": 2,\n    \"lines-around-comment\": 0,\n    \"max-depth\": 0,\n    \"max-len\": [2, 80, 4],\n    \"max-nested-callbacks\": 0,\n    \"max-params\": 0,\n    \"max-statements\": 0,\n    \"new-cap\": 0,\n    \"new-parens\": 2,\n    \"newline-after-var\": 0,\n    \"no-alert\": 2,\n    \"no-array-constructor\": 2,\n    \"no-bitwise\": 0,\n    \"no-caller\": 2,\n    \"no-catch-shadow\": 0,\n    \"no-class-assign\": 2,\n    \"no-cond-assign\": 2,\n    \"no-console\": 1,\n    \"no-const-assign\": 2,\n    \"no-constant-condition\": 2,\n    \"no-continue\": 0,\n    \"no-control-regex\": 0,\n    \"no-debugger\": 1,\n    \"no-delete-var\": 2,\n    \"no-div-regex\": 2,\n    \"no-dupe-args\": 2,\n    \"no-dupe-keys\": 2,\n    \"no-duplicate-case\": 2,\n    \"no-else-return\": 2,\n    \"no-empty\": 2,\n    \"no-empty-character-class\": 2,\n    \"no-empty-label\": 2,\n    \"no-eq-null\": 0,\n    \"no-eval\": 2,\n    \"no-ex-assign\": 2,\n    \"no-extend-native\": 2,\n    \"no-extra-bind\": 2,\n    \"no-extra-boolean-cast\": 2,\n    \"no-extra-parens\": 0,\n    \"no-extra-semi\": 2,\n    \"no-fallthrough\": 2,\n    \"no-floating-decimal\": 2,\n    \"no-func-assign\": 2,\n    \"no-implicit-coercion\": 2,\n    \"no-implied-eval\": 2,\n    \"no-inline-comments\": 0,\n    \"no-inner-declarations\": [2, \"functions\"],\n    \"no-invalid-regexp\": 2,\n    \"no-invalid-this\": 0,\n    \"no-irregular-whitespace\": 2,\n    \"no-iterator\": 2,\n    \"no-label-var\": 2,\n    \"no-labels\": 0,\n    \"no-lone-blocks\": 2,\n    \"no-lonely-if\": 2,\n    \"no-loop-func\": 0,\n    \"no-mixed-requires\": [2, true],\n    \"no-mixed-spaces-and-tabs\": 2,\n    \"no-multi-spaces\": 2,\n    \"no-multi-str\": 2,\n    \"no-multiple-empty-lines\": 0,\n    \"no-native-reassign\": 0,\n    \"no-negated-in-lhs\": 2,\n    \"no-nested-ternary\": 0,\n    \"no-new\": 2,\n    \"no-new-func\": 0,\n    \"no-new-object\": 2,\n    \"no-new-require\": 2,\n    \"no-new-wrappers\": 2,\n    \"no-obj-calls\": 2,\n    \"no-octal\": 2,\n    \"no-octal-escape\": 2,\n    \"no-param-reassign\": 2,\n    \"no-path-concat\": 2,\n    \"no-plusplus\": 0,\n    \"no-process-env\": 0,\n    \"no-process-exit\": 0,\n    \"no-proto\": 2,\n    \"no-redeclare\": 2,\n    \"no-regex-spaces\": 2,\n    \"no-restricted-modules\": 0,\n    \"no-return-assign\": 2,\n    \"no-script-url\": 2,\n    \"no-self-compare\": 0,\n    \"no-sequences\": 2,\n    \"no-shadow\": 2,\n    \"no-shadow-restricted-names\": 2,\n    \"no-spaced-func\": 2,\n    \"no-sparse-arrays\": 2,\n    \"no-sync\": 2,\n    \"no-ternary\": 0,\n    \"no-this-before-super\": 2,\n    \"no-throw-literal\": 2,\n    \"no-trailing-spaces\": 2,\n    \"no-undef\": 2,\n    \"no-undef-init\": 2,\n    \"no-undefined\": 0,\n    \"no-underscore-dangle\": 0,\n    \"no-unexpected-multiline\": 2,\n    \"no-unneeded-ternary\": 2,\n    \"no-unreachable\": 2,\n    \"no-unused-expressions\": 2,\n    \"no-unused-vars\": [2, {\"vars\": \"all\", \"args\": \"after-used\"}],\n    \"no-use-before-define\": 0,\n    \"no-useless-call\": 2,\n    \"no-var\": 0,\n    \"no-void\": 2,\n    \"no-warning-comments\": 0,\n    \"no-with\": 2,\n    \"object-curly-spacing\": [0, \"always\"],\n    \"object-shorthand\": [2, \"always\"],\n    \"one-var\": [2, \"never\"],\n    \"operator-assignment\": [2, \"always\"],\n    \"operator-linebreak\": [2, \"after\"],\n    \"padded-blocks\": 0,\n    \"prefer-const\": 0,\n    \"prefer-reflect\": 0,\n    \"prefer-spread\": 0,\n    \"quote-props\": [2, \"as-needed\"],\n    \"quotes\": [2, \"single\"],\n    \"radix\": 2,\n    \"require-yield\": 2,\n    \"semi\": [2, \"always\"],\n    \"semi-spacing\": [2, {\"before\": false, \"after\": true}],\n    \"sort-vars\": 0,\n    \"space-after-keywords\": [2, \"always\"],\n    \"space-before-blocks\": [2, \"always\"],\n    \"space-before-function-paren\": [2, {\"anonymous\": \"always\", \"named\": \"never\"}],\n    \"space-in-parens\": 0,\n    \"space-infix-ops\": [2, {\"int32Hint\": false}],\n    \"space-return-throw-case\": 2,\n    \"space-unary-ops\": [2, {\"words\": true, \"nonwords\": false}],\n    \"spaced-comment\": [2, \"always\"],\n    \"strict\": 0,\n    \"use-isnan\": 2,\n    \"valid-jsdoc\": 0,\n    \"valid-typeof\": 2,\n    \"vars-on-top\": 0,\n    \"wrap-iife\": 2,\n    \"wrap-regex\": 0,\n    \"yoda\": [2, \"never\", {\"exceptRange\": true}]\n  }\n}\n"
  },
  {
    "path": ".gitignore",
    "content": "*.swp\n*~\n*.iml\n.*.haste_cache.*\n.DS_Store\n.idea\nnpm-debug.log\nnode_modules\ndist"
  },
  {
    "path": ".npmignore",
    "content": "*.swp\n*~\n*.iml\n.*.haste_cache.*\n.DS_Store\n.idea\n.babelrc\n.eslintrc\nnpm-debug.log\nlib\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Change Log\n\n### v1.2.0\n2015-April-09\n\n* Add support for React v15.0.0\n\n### v1.1.0\n2016-Feb-18\n\n* Add SSR support with FlowRouter's SSR apis.\n\n### v1.0.0\n\nInitial Release\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016 Kadira Inc. <hello@kadira.io>\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\nall copies 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\nTHE SOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# React Mounter\n\nReact Mounter lets you mount React components to DOM easily.\n\n> React Mounter supports Server Side Rendering when used with [FlowRouter](https://github.com/kadirahq/flow-router).\n\nNormally, when you are rendering a React Component to the DOM, you need to do following things basically,\n\n* Create a root DOM node as the root node for React\n* Wait for the DOM to load properly\n* Then render the component\n\nReact Mounter does all these for you. You just ask it to render a component.\n\nAdditionally, React Mounter can work as a simple Layout Manager where you can use with [Flow Router](https://github.com/kadirahq/flow-router).\n\n## Basic Usage\n\nInstall with:\n\n```\nnpm i --save react-mounter react react-dom\n```\n\n> `react` and `react-dom` are peerDependencies of `react-mounter`. So, you need to install them into your app manually.\n\nThen let's mount a component.\n\n```js\nimport React from 'react';\nimport {mount} from 'react-mounter';\n\nconst WelcomeComponent = ({name}) => (<p>Hello, {name}</p>);\n\nmount(WelcomeComponent, {name: 'Arunoda'});\n```\n\n## Using as a Layout Manager\n\nYou can user `react-mounter` as a layout Manager for Flow Router. Here's how to do it.\n\nLet's say we've a layout called MainLayout.\n\n```js\nconst MainLayout = ({content}) => (\n    <div>\n      <header>\n        This is our header\n      </header>\n      <main>\n        {content}\n      </main>\n    </div>\n);\n```\n\nNow let's try render to our `WelcomeComponent` into the `MainLayout`.\n\n```js\nmount(MainLayout, {\n  content: <WelcomeComponent name=\"Arunoda\" />\n});\n```\n\nThat's it.\n\n### To use the React Context\n\nIn order to use the React context, you need to render the `content` component inside the layout. So we need to pass a function instead of the React element. Here's how to do it.\n\n```js\nconst MainLayout = ({content}) => (\n    <div>\n      <header>\n        This is our header\n      </header>\n      <main>\n        {content()}\n      </main>\n    </div>\n);\n```\n\n> See, now content is a function.\n\nThen, we can pass the Welcome component like this:\n\n```js\nmount(MainLayout, {\n  content: () => (<WelcomeComponent name=\"Arunoda\" />)\n});\n```\n\n## Configure Root DOM node\n\nBy default React Mounter render our components into a DOM node called `react-root`. But, you can configure if by like below:\n\n```js\nconst {mount, withOptions} from `react-mounter`;\nconst mount2 = withOptions({\n    rootId: 'the-root',\n    rootProps: {'className': 'some-class-name'}\n}, mount);\n\nmount2(WelcomeComponent, {name: 'Arunoda'});\n```\n\n## Server Side Rendering (SSR)\n\nSSR is supported when used with [FlowRouter SSR](https://github.com/kadirahq/flow-router/tree/ssr). Checkout this [sample app](https://github.com/kadira-samples/meteor-data-and-react).\n"
  },
  {
    "path": "index.js",
    "content": "module.exports = require('./dist/index');"
  },
  {
    "path": "lib/__tests__/client.js",
    "content": "import {describe, it} from 'mocha';\nimport {expect} from 'chai';\nimport mock from 'mock-require';\nimport {stub} from 'sinon';\nimport ReactDOM from 'react-dom/server';\n\nmock('domready', cb => {\n  setTimeout(cb, 100);\n});\n\nlet renderArgs;\nmock('react-dom', {\n  render: (...args) => {\n    renderArgs = args;\n  }\n});\n\nconst {\n  _ready,\n  _getRootNode,\n  mounter\n} = require('../client');\n\ndescribe('client', () => {\n  describe('_ready', () => {\n    describe('dom is not loaded', () => {\n      it('should wait and fire callback after ready', done => {\n        const start = Date.now();\n        _ready(() => {\n          const diff = Date.now() - start;\n          expect(diff >= 110).to.be.equal(true);\n          done();\n        });\n      });\n    });\n\n    describe('dom is already loaded', () => {\n      it('should fire callback immediately', () => {\n        let cnt = 0;\n        _ready(() => {\n          cnt = 100;\n        });\n        expect(cnt).to.be.equal(100);\n      });\n    });\n  });\n\n  describe('_getRootNode', () => {\n    describe('root node is already in the dom', () => {\n      it('should just return it', () => {\n        const node = {aa: 10};\n        global.document = {getElementById: stub()};\n        global.document.getElementById.returns(node);\n\n        const returnedNode = _getRootNode('the-id');\n        expect(returnedNode).to.be.equal(node);\n\n        const args = global.document.getElementById.args[0];\n        expect(args).to.be.deep.equal([ 'the-id' ]);\n      });\n    });\n\n    describe('root node is not in the dom', () => {\n      it('should create and return the dom node', () => {\n        const node = {aa: 10};\n        const doc = {\n          getElementsByTagName: stub(),\n          getElementById: stub()\n        };\n\n        const body = {\n          insertAdjacentHTML: stub()\n        };\n\n        doc.getElementsByTagName.returns([ body ]);\n        doc.getElementById\n          .onFirstCall().returns(null)\n          .onSecondCall().returns(node);\n\n        global.document = doc;\n\n        const returnedNode = _getRootNode('the-id');\n        expect(returnedNode).to.be.equal(node);\n        expect(body.insertAdjacentHTML.args[0]).to.be.deep.equal(\n          [ 'beforeend', '<div id=\\\"the-id\\\"></div>' ]\n        );\n      });\n    });\n  });\n\n  describe('mounter', () => {\n    it('should render the given layout and regions to the DOM', () => {\n      const node = {aa: 10};\n      global.document = {getElementById: stub()};\n      global.document.getElementById.returns(node);\n\n      const Layout = ({c}) => c;\n      const Item = () => (<p>Hello</p>);\n\n      mounter(Layout, {c: <Item />}, {rootId: 'amazing'});\n\n      const html = ReactDOM.renderToString(renderArgs[0]);\n      expect(html).to.match(/Hello/);\n      const rootId = global.document.getElementById.args[0][0];\n      expect(rootId).to.be.equal('amazing');\n      expect(renderArgs[1]).to.be.equal(node);\n    });\n  });\n});\n"
  },
  {
    "path": "lib/__tests__/index.js",
    "content": "import {describe, it} from 'mocha';\nimport {expect} from 'chai';\nimport mock from 'mock-require';\n\nmock('domready', cb => {\n  setTimeout(cb, 100);\n});\n\nmock('react-dom', {\n  render: () => {}\n});\n\nconst {\n  withOptions\n} = require('../');\n\ndescribe('index', () => {\n  describe('withOptions', () => {\n    it('should call the given function with options', done => {\n      const fn = (a, options) => {\n        expect(a).to.be.equal('abc');\n        expect(options).to.deep.equal({aa: 10});\n        done();\n      };\n\n      withOptions({aa: 10}, fn)('abc');\n    });\n  });\n});\n"
  },
  {
    "path": "lib/__tests__/server.js",
    "content": "import { describe, it } from 'mocha';\nimport { expect } from 'chai';\nimport { mounter } from '../server';\n\ndescribe('server', () => {\n  describe('mounter', () => {\n    describe('with FlowRouter', () => {\n      it('should set push rendered HTML string to FlowRouter', done => {\n        withFlowRouter(({getSSRedHTML}) => {\n          const Layout = ({c}) => c;\n          const Item = () => (<p>Hello</p>);\n\n          mounter(Layout, {c: <Item />}, {rootId: 'amazing'});\n          expect(getSSRedHTML()).to.match(/Hello/);\n          setTimeout(done, 0);\n        });\n      });\n    });\n\n    describe('without FlowRouter', () => {\n      it('should throw an Error', () => {\n        const run = () => {\n          const Layout = ({c}) => c;\n          const Item = () => (<p>Hello</p>);\n\n          mounter(Layout, {c: <Item />}, {rootId: 'amazing'});\n        };\n\n        global.Package = {};\n        expect(run).to.throw(/FlowRouter SSR is required/);\n        delete global.Package;\n      });\n    });\n\n    describe('outside of Meteor', () => {\n      it('should throw an Error', () => {\n        const run = () => {\n          const Layout = ({c}) => c;\n          const Item = () => (<p>Hello</p>);\n          mounter(Layout, {c: <Item />}, {rootId: 'amazing'});\n        };\n\n        expect(run).to.throw(/only available with Meteor/);\n      });\n    });\n  });\n});\n\nfunction withFlowRouter(run) {\n  let SSRedHTML = null;\n  const Package = {\n    'kadira:flow-router-ssr': {\n      FlowRouter: {\n        ssrContext: {\n          get() {\n            return {\n              setHtml(html) {\n                SSRedHTML = html;\n              }\n            };\n          }\n        }\n      }\n    }\n  };\n\n  const context = {\n    getSSRedHTML() {\n      return SSRedHTML;\n    }\n  };\n\n  global.Package = Package;\n  run(context);\n  delete global.Package;\n}\n"
  },
  {
    "path": "lib/__tests__/utils.js",
    "content": "import {describe, it} from 'mocha';\nimport {expect} from 'chai';\nimport { buildRootNode } from '../utils';\n\ndescribe('utils', () => {\n  describe('_buildRootNode', () => {\n    it('should build the rootNode with given id and props', () => {\n      const html = buildRootNode('the-id', {aa: 10});\n      expect(html).to.be.equal('<div aa=\"10\" id=\"the-id\"></div>');\n    });\n\n    it('should change className prop to class attribute', () => {\n      const html = buildRootNode('the-id', {aa: 10, className: 'abc'});\n      expect(html).to.be.equal('<div aa=\"10\" id=\"the-id\" class=\"abc\"></div>');\n    });\n  });\n});\n"
  },
  {
    "path": "lib/client.js",
    "content": "/* global document*/\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport domready from 'domready';\nimport { buildRootNode } from './utils';\n\nexport let _isDomReady = false;\nexport function _ready(cb) {\n  if (_isDomReady) {\n    return cb();\n  }\n\n  domready(() => {\n    _isDomReady = true;\n    setTimeout(cb, 10);\n  });\n}\n\nexport function _getRootNode(rootId, rootProps) {\n  const rootNode = document.getElementById(rootId);\n\n  if (rootNode) {\n    return rootNode;\n  }\n\n  const rootNodeHtml = buildRootNode(rootId, rootProps);\n  const body = document.getElementsByTagName('body')[0];\n  body.insertAdjacentHTML('beforeend', rootNodeHtml);\n\n  return document.getElementById(rootId);\n}\n\nexport function mounter(layoutClass, regions, options) {\n  _ready(() => {\n    const {rootId, rootProps} = options;\n    const rootNode = _getRootNode(rootId, rootProps);\n    const el = React.createElement(layoutClass, regions);\n    ReactDOM.render(el, rootNode);\n  });\n}\n"
  },
  {
    "path": "lib/index.js",
    "content": "let mounter = null;\nif (typeof window !== 'undefined') {\n  // now we are in the server\n  mounter = require('./client').mounter;\n} else {\n  mounter = require('./server').mounter;\n}\n\nexport function mount(layoutClass, regions, options = {}) {\n  options.rootId = options.rootId || 'react-root';\n  options.rootProps = options.rootProps || {};\n  mounter(layoutClass, regions, options);\n}\n\nexport function withOptions(options, fn) {\n  return function (...args) {\n    const newArgs = [ ...args, options ];\n    return fn(...newArgs);\n  };\n}\n"
  },
  {
    "path": "lib/server.js",
    "content": "/* global Package */\n\nimport React from 'react';\nimport ReactDOMServer from 'react-dom/server';\nimport { buildRootNode } from './utils';\n\nexport function mounter(layoutClass, regions, options) {\n  const el = React.createElement(layoutClass, regions);\n  const elHtml = ReactDOMServer.renderToString(el);\n\n  const {rootId, rootProps} = options;\n  var rootNodeHtml = buildRootNode(rootId, rootProps);\n  var html = rootNodeHtml.replace('</div>', elHtml + '</div>');\n\n  if (typeof Package === 'undefined') {\n    const error = 'Server side mounting in only available with Meteor.';\n    throw new Error(error);\n  }\n\n  if (!Package['kadira:flow-router-ssr']) {\n    const error =\n      'FlowRouter SSR is required to mount components in the server.';\n    throw new Error(error);\n  }\n\n  var FlowRouter = Package['kadira:flow-router-ssr'].FlowRouter;\n  var ssrContext = FlowRouter.ssrContext.get();\n  ssrContext.setHtml(html);\n}\n"
  },
  {
    "path": "lib/utils.js",
    "content": "export function buildRootNode(rootId, rootProps) {\n  const props = {...rootProps};\n  props.id = rootId;\n  if (props.className) {\n    props.class = props.className;\n    delete props.className;\n  }\n\n  let propsString = '';\n  for (const key in props) {\n    if (!(props.hasOwnProperty(key))) {\n      continue;\n    }\n\n    const value = props[key];\n    propsString += ` ${key}=\"${value}\"`;\n  }\n\n  return `<div${propsString}></div>`;\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"react-mounter\",\n  \"version\": \"1.2.0\",\n  \"description\": \"React Mounter lets you mount React components to DOM easily.\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/kadirahq/react-mounter.git\"\n  },\n  \"license\": \"MIT\",\n  \"options\": {\n    \"mocha\": \"--require scripts/mocha_runner lib/**/__tests__/**/*.js\"\n  },\n  \"scripts\": {\n    \"prepublish\": \". ./scripts/prepublish.sh\",\n    \"lint\": \"eslint ./lib\",\n    \"lintfix\": \"eslint ./lib --fix\",\n    \"testonly\": \"mocha $npm_package_options_mocha\",\n    \"test\": \"npm run lint && npm run testonly\"\n  },\n  \"devDependencies\": {\n    \"nodemon\": \"1.7.x\",\n    \"mocha\": \"2.x.x\",\n    \"chai\": \"3.x.x\",\n    \"eslint\": \"1.7.x\",\n    \"babel-eslint\": \"4.x.x\",\n    \"eslint-plugin-babel\": \"2.x.x\",\n    \"babel-cli\": \"6.x.x\",\n    \"babel-core\": \"6.x.x\",\n    \"babel-polyfill\": \"6.x.x\",\n    \"babel-preset-es2015\": \"6.x.x\",\n    \"babel-preset-stage-2\": \"6.x.x\",\n    \"babel-plugin-transform-runtime\": \"6.x.x\",\n    \"babel-preset-react\": \"6.x.x\",\n    \"babel-plugin-react-require\": \"2.x.x\",\n    \"react\": \"^15.0.0\",\n    \"react-dom\": \"^15.0.0\",\n    \"mock-require\": \"1.x.x\",\n    \"sinon\": \"1.17.x\",\n    \"eslint-plugin-react\": \"3.x.x\"\n  },\n  \"peerDependencies\": {\n    \"react\": \"0.14.x || 15.x.x\",\n    \"react-dom\": \"0.14.x || 15.x.x\"\n  },\n  \"dependencies\": {\n    \"babel-runtime\": \"6.x.x\",\n    \"domready\": \"1.x.x\"\n  }\n}\n"
  },
  {
    "path": "scripts/mocha_runner.js",
    "content": "require('babel-core/register');\nrequire('babel-polyfill');\n\nprocess.on('unhandledRejection', function (error) {\n  console.error('Unhandled Promise Rejection:');\n  console.error(error && error.stack || error);\n});\n"
  },
  {
    "path": "scripts/prepublish.sh",
    "content": "echo \"> Start transpiling ES2015\"\necho \"\"\n./node_modules/.bin/babel --plugins \"transform-runtime\" lib --ignore __tests__ --out-dir ./dist\necho \"\"\necho \"> Complete transpiling ES2015\""
  }
]