{"name":"mantra-core","version":"1.4.0","description":"Core API for Mantra","repository":{"type":"git","url":"git+https://github.com/mantrajs/mantra-core.git"},"license":"MIT","options":{"mocha":"--require scripts/mocha_runner src/**/__tests__/**/*.js"},"scripts":{"prepublish":". ./scripts/prepublish.sh","lint":"eslint ./src","lintfix":"eslint ./src --fix","testonly":"mocha $npm_package_options_mocha","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js"},"devDependencies":{"nodemon":"1.7.x","mocha":"2.x.x","chai":"3.x.x","eslint":"1.7.x","babel-eslint":"4.x.x","eslint-plugin-babel":"2.x.x","babel-cli":"6.x.x","babel-core":"6.x.x","babel-polyfill":"6.x.x","babel-preset-es2015":"6.x.x","babel-preset-stage-2":"6.x.x","babel-plugin-transform-runtime":"6.x.x","react":"^0.14.6"},"dependencies":{"babel-runtime":"6.x.x","react-komposer":"^1.7.0","react-simple-di":"^1.1.0"},"gitHead":"b691764a6c99c21a3cbb7e156f40e1d06ed7a177","bugs":{"url":"https://github.com/mantrajs/mantra-core/issues"},"homepage":"https://github.com/mantrajs/mantra-core#readme","_id":"mantra-core@1.4.0","_shasum":"781a22afc94d335becda21d9d722cb5562f8cd04","_from":".","_npmVersion":"3.8.0","_nodeVersion":"4.4.0","_npmUser":{"name":"arunoda","email":"arunoda.susiripala@gmail.com"},"dist":{"shasum":"781a22afc94d335becda21d9d722cb5562f8cd04","tarball":"http://registry-npm.ywwl.com/mantra-core/download/mantra-core-1.4.0.tgz","integrity":"sha512-DzGaO+NKBELV5z/hMjQThVf4LX+AdjDE0fiS1rLVXmaMZK9+xo8yWgm34ByBOTr02+OatdbbXCOT4gRnT8Ov7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBD1fVPC1hN8YH2+AvC2wPMKr8t/aTMZcPb9pdn8h4JtAiEAzXENgRk+fMJxu4+8YjhRpWKECdXv5uh+oODm4Y3f3rg="}],"size":5108,"noattachment":false,"key":"/mantra-core/-/mantra-core-1.4.0.tgz"},"maintainers":[{"name":"arunoda","email":"arunoda.susiripala@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mantra-core-1.4.0.tgz_1459324277716_0.7512559448368847"},"directories":{},"readme":"#mantra-core\n\nCore API for Mantra.\n\n### Introduction\n\nThis repo contains the core APP api where we create an mantra app and initialize it.\n\nAlso, this package contains exported functions from both [`react-komposer`](https://github.com/kadirahq/react-komposer) and [`react-simple-di`](https://github.com/kadirahq/react-simple-di).\nThat's purely for the ease of use.\n\n### Installation\n\n```\nnpm i --save mantra-core react\n```\n\n### App API\n\n```js\nimport MyComp from './myComp';\nimport {createApp} from 'mantra-core';\n\n// Here's a simple Mantra Module\nconst module = {\n  routes(injectDeps) {\n    const InjectedComp = injectDeps(MyComp);\n    // load routes and put `InjectedComp` to the screen.\n  },\n  load(context, actions) {\n    // do any module initialization\n  },\n  actions: {\n    myNamespace: {\n      doSomething: (context, arg1) => {}\n    }\n  }\n};\n\nconst context = {\n  client: new DataClient()\n};\n\nconst app = createApp(context);\napp.loadModule(module);\n// app.loadModule(someOtherModule);\napp.init();\n```\n","publish_time":1459324278692,"_cnpm_publish_time":1459324278692,"dist-tags":{"latest":"1.7.0"}}