{"_id":"@amarajs/core","_rev":"3-560c28e56eedd7fe3a488cbca1493ace","name":"@amarajs/core","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@amarajs/core","amdName":"Amara","version":"0.1.0","description":"Coordinates plugin middleware for the AmaraJS framework.","jsnext:main":"src/index.js","main":"dist/amara-core.js","umd:main":"dist/amara-core.umd.js","scripts":{"bump":"standard-version","testonly":"mocha --compilers js:babel-register test/**/*.js","lint":"eslint src test","test":"flow && npm run lint && npm run testonly","build":"npm-run-all clean -p rollup:* -p minify:* -s size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -f cjs -n Amara src/index.js -o dist/amara-core.js","rollup:umd":"rollup -c rollup.config.js -f umd -n Amara src/index.js -o dist/amara-core.umd.js","minify:cjs":"uglifyjs dist/amara-core.js -cm toplevel -o dist/amara-core.min.js -p relative --source-map dist/amara-core.min.js.map","minify:umd":"uglifyjs dist/amara-core.umd.js -cm -o dist/amara-core.umd.min.js -p relative --source-map dist/amara-core.umd.min.js.map","size":"strip-json-comments --no-whitespace dist/amara-core.min.js | gzip-size | pretty-bytes","release":"npm run build -s && npm run bump && git push --follow-tags origin master && npm publish"},"keywords":["amara","amarajs","core"],"authors":["Dan Barnes <amarajs.framework@gmail.com>"],"repository":{"type":"git","url":"git+https://github.com/amarajs/core.git"},"license":"MIT","files":["src","dist"],"eslintConfig":{"parser":"babel-eslint","extends":"eslint:recommended","env":{"browser":true,"node":true,"mocha":true,"es6":true},"globals":{"expect":true},"rules":{"no-cond-assign":0}},"devDependencies":{"babel-core":"^6.9.1","babel-eslint":"^7.1.1","babel-plugin-transform-flow-strip-types":"^6.21.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-register":"^6.9.0","chai":"^3.5.0","eslint":"^3.13.1","flow-bin":"^0.38.0","gzip-size-cli":"^1.0.0","mkdirp":"^0.5.1","mocha":"^3.2.0","npm-run-all":"^2.1.1","pretty-bytes-cli":"^2.0.0","rimraf":"^2.5.2","rollup":"^0.41.4","rollup-plugin-buble":"^0.15.0","rollup-plugin-flow":"^1.1.1","sinon":"^4.4.6","sinon-chai":"^2.8.0","standard-version":"^4.0.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^2.6.2"},"gitHead":"102a4d5dcbe8cb5e68e5ed5957d00c2f7bac129f","bugs":{"url":"https://github.com/amarajs/core/issues"},"homepage":"https://github.com/amarajs/core#readme","_id":"@amarajs/core@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"},"dist":{"integrity":"sha512-DINWWJ3LioFyQB4D/sVRlEnwuwu2KkfN7cw0Zw66G323ydqNPodaVX8G9z02dnvA8nPAx1Tsa7rAHKruFvCb+w==","shasum":"b481b045607b2a9e4783d48752a9c45dfdd2b432","tarball":"https://registry.npmjs.org/@amarajs/core/-/core-0.1.0.tgz","fileCount":13,"unpackedSize":108407,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/61WrO3DO39BHWoH6BBNbuZAOXIBqoGF8RK/j+Qt86QIhAJan+SfiPXMRSMlQOXJsV3paBjlYv+onzHEHJPATWjyl"}]},"maintainers":[{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/core_0.1.0_1522618187478_0.3280240353990256"},"_hasShrinkwrap":false},"0.1.1":{"name":"@amarajs/core","amdName":"Amara","version":"0.1.1","description":"Coordinates plugin middleware for the AmaraJS framework.","jsnext:main":"src/index.js","main":"dist/amara-core.js","umd:main":"dist/amara-core.umd.js","scripts":{"bump":"standard-version","testonly":"mocha --compilers js:babel-register test/**/*.js","lint":"eslint src test","test":"flow && npm run lint && npm run testonly","build":"npm-run-all clean -p rollup:* -p minify:* -s size","clean":"rimraf dist && mkdirp dist","rollup:cjs":"rollup -c rollup.config.js -f cjs -n Amara src/index.js -o dist/amara-core.js","rollup:umd":"rollup -c rollup.config.js -f umd -n Amara src/index.js -o dist/amara-core.umd.js","minify:cjs":"uglifyjs dist/amara-core.js -cm toplevel -o dist/amara-core.min.js -p relative --source-map dist/amara-core.min.js.map","minify:umd":"uglifyjs dist/amara-core.umd.js -cm -o dist/amara-core.umd.min.js -p relative --source-map dist/amara-core.umd.min.js.map","size":"strip-json-comments --no-whitespace dist/amara-core.min.js | gzip-size | pretty-bytes","release":"npm run build -s && npm run bump && git push --follow-tags origin master && npm publish"},"keywords":["amara","amarajs","core"],"authors":["Dan Barnes <amarajs.framework@gmail.com>"],"repository":{"type":"git","url":"git+https://github.com/amarajs/core.git"},"license":"MIT","files":["src","dist"],"eslintConfig":{"parser":"babel-eslint","extends":"eslint:recommended","env":{"browser":true,"node":true,"mocha":true,"es6":true},"globals":{"expect":true},"rules":{"no-cond-assign":0}},"devDependencies":{"babel-core":"^6.9.1","babel-eslint":"^7.1.1","babel-plugin-transform-flow-strip-types":"^6.21.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-0":"^6.5.0","babel-register":"^6.9.0","chai":"^3.5.0","eslint":"^3.13.1","flow-bin":"^0.38.0","gzip-size-cli":"^1.0.0","mkdirp":"^0.5.1","mocha":"^3.2.0","npm-run-all":"^2.1.1","pretty-bytes-cli":"^2.0.0","rimraf":"^2.5.2","rollup":"^0.41.4","rollup-plugin-buble":"^0.15.0","rollup-plugin-flow":"^1.1.1","sinon":"^4.4.6","sinon-chai":"^2.8.0","standard-version":"^4.0.0","strip-json-comments-cli":"^1.0.1","uglify-js":"^2.6.2"},"gitHead":"547d934020b141ae33b9969494cc451e64543360","bugs":{"url":"https://github.com/amarajs/core/issues"},"homepage":"https://github.com/amarajs/core#readme","_id":"@amarajs/core@0.1.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"},"dist":{"integrity":"sha512-IwXqn5AjWAGGd0b2+DoKwRm67jug6sj472o6I0iQomgaS636VZLv/flRzCFUv6AK19Xe+5J6mYZjrvobewCS2A==","shasum":"7f43d21cbe7ff8d9c1e68b3d8a0ef66d200242ec","tarball":"https://registry.npmjs.org/@amarajs/core/-/core-0.1.1.tgz","fileCount":13,"unpackedSize":80955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa2QPpCRA9TVsSAnZWagAA1hkP/0Xl+HjcVaVN/Wlzjr+8\nm+N8mxuKqReIM+sLGiPr85ZaV3tx2erd1y1I2+usrfPIb/kBLC9znd8MNehG\n5y5/72B+DfeKSXjilVpc+mqVL78AN9AMSSGqyHS4ZXHzo5GCtGLHzcD9kJs4\nqmgc3cIsrWxUFdOeaxH1jnZI5UePPnO9+mHz8WvGfJ54yEave/i2QNfZgRZp\nBSFD8Smqpkbaa2U6KfUJwxX7MlGAaZj2TLwGyn5f0KAYRvgJet6HeGqk3Qx1\ntxH2Sbjd++IiqqzHnq9vDsomXHqLScVKYHmhFYoKlprnnj6cVTu6FBXHPnUR\nvapqadxQgR7H7Q62MDAGm6KR06144nN9p+vdYna4yp5DhDoGyS3NWkZ3IzDv\nVwC+1/0Ixd1gF+/g9Yvd260KaFDrDpIPpNznAuymOolHbaFTqBhwMA3i9Ei8\nlRa1bXYGhoWon68VkD7i9T2eqNPvY1Q017rdgxdouQPQvQwSeYmxtYlDXn7D\nlF6r7OozalHswn3PO+HJbu8AvZh6A/C/lG17NsO6LsJWANzw/KdeR7/l8yEN\nyhZu8Gtcc53np7sY7VU6z2Jep5ijrcH6N28PUpNaDp/Z1JVkMGf8yQA4R92U\nV5+34Mt06o/z21z3QZX7x67URQOcWMSVW58JwcsfGH1ZcMqeOxQBshGeG3FD\n+Gq8\r\n=wzWc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRs1FMfg8e7IAg5QSBnAdZpZzSfQuPojgyq2ga3pQYYAiBXxO3y0Mlnkn4gToTFGOT2wkyPMNNv0tc+lj4jYT5PCw=="}]},"maintainers":[{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/core_0.1.1_1524171752752_0.9625861970515692"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-01T21:29:47.426Z","0.1.0":"2018-04-01T21:29:47.809Z","modified":"2022-04-04T13:43:41.912Z","0.1.1":"2018-04-19T21:02:32.871Z"},"maintainers":[{"name":"amarajs-dan","email":"amarajs.framework@gmail.com"}],"description":"Coordinates plugin middleware for the AmaraJS framework.","homepage":"https://github.com/amarajs/core#readme","keywords":["amara","amarajs","core"],"repository":{"type":"git","url":"git+https://github.com/amarajs/core.git"},"bugs":{"url":"https://github.com/amarajs/core/issues"},"license":"MIT","readme":"## [@amarajs/core](https://github.com/amarajs/core)\n\nProvides feature-based development using an extensible plugin-based targeting system.\n\n__IMPORTANT!__  \n> AmaraJS is an early alpha release.  \n> Bug reports and general feedback are welcome.\n\nVisit the [Homepage](https://amarajs.github.io) to learn more about AmaraJS, including how to develop features and middleware, as well as best practices and sample applications.\n\n> Homepage: https://amarajs.github.io  \n> Sample App: https://amarajs.github.io/guide/  \n> jsFiddle: https://jsfiddle.net/04f3v2x4\n\n### Installation\n\n```terminal\nnpm install --save @amarajs/core\n```\n\n### Usage\n\nTo create a new AmaraJS instance, simply pass an array of middleware to the Amara constructor.\n\n```javascript\nimport Amara from '@amarajs/core';\nconst amara = new Amara([/* plugin middleware */]);\n```\n\nOnce you have an Amara instance, you can bootstrap it by passing in an initial target. In web environments, this would be the \"root\" DOM element that will house your application.\n\n```javascript\namara.bootstrap(/* target */));\n```\n\nYou can even \"nest\" Amara instances when necessary (like in portal sites) and have different instances handle different features. For example, the parent instance's features would apply to all content, but the child instance's features would only apply to the DOM subtree where it was bootstrapped.\n\n### API\n\nEach `Amara` instance has 3 methods:\n\nmethod | arguments | description\n--- | --- | ----\n`add` | `Object` | Registers the specified feature with `@amarajs/core`. The argument should be a valid AmaraJS feature object. The required and optional properties are outlined later in this document. You can call `add` at any time, before or after bootstrap or configuration.\n`config` | `String`, `Function` | Registers a configuration method to further control how AmaraJS works with features. The currently configurable options are `\"filter\"` and `\"sorter\"`. Examples are below.\n`bootstrap` | `any` | Initializes AmaraJS with the given target. The target type to provide depends on which `engine` middleware you provided to the `Amara` constructor. For example, [`@amarajs/plugin-engine-browser`](https://github.com/amarajs/plugin-engine-browser) expects a DOM node.\n\nEach method returns the `Amara` instance to enable chaining:\n\n```javascript\nconst amara = new Amara([/* middleware */])\n    .config('sorter', /* sort function */)\n    .config('filter', /* filter function */)\n    .add(/* feature 1 */)\n    .add(/* feature 2 */)\n    .bootstrap(/* target */);\n```\n\n#### Configuration Functions\n\nYou can further customize your `Amara` instance by providing any number of optional configuration functions, including __filter__ and __sorter__ methods.\n\nEach feature added to your `Amara` instance has 3 required properties (and 1 optional property), but you can also add any number of custom properties to the features you write. Combining custom properties with configuration functions enables you to control how your features are applied at run-time.\n\n```javascript\n// sorting features by a custom `priority` property:\namara.config('sorter', (lhs, rhs) => rhs.priority - lhs.priority)\n```\n\n```javascript\n// filtering out \"disabled\" features:\namara.config('filter', (feature) => !('enabled' in feature) || feature.enabled)\n```\n\nIf you specify multiple config functions of each type, they will be invoked in the order they were registered:\n\n```javascript\namara\n    // this runs first:\n    .config('sorter', (lhs, rhs) => rhs.priority - lhs.priority)\n    // and then this runs:\n    .config('sorter', (lhs, rhs) => Math.random()) // don't do this\n```\n\n### Plugin Middleware\n\nThere is a growing list of Amara middleware available for use. Standard middleware includes:\n\n - [`@amarajs/plugin-engine-browser`](https://github.com/amarajs/plugin-engine-browser)  \n Provides `@amarajs/core` with functionality related to DOM nodes, for use in web-based applications.\n - [`@amarajs/plugin-css`](https://github.com/amarajs/plugin-css)  \n Attach CSS styles and class names to DOM nodes.\n - [`@amarajs/plugin-dom`](https://github.com/amarajs/plugin-dom)  \n Add HTML to DOM nodes.\n - [`@amarajs/plugin-events`](https://github.com/amarajs/plugin-events)  \n Attach event handlers to DOM nodes.\n - [`@amarajs/plugin-redux`](https://github.com/amarajs/plugin-redux)  \n Dispatch actions against a Redux store.\n - [`@amarajs/plugin-router`](https://github.com/amarajs/plugin-router)  \n Dynamic client-side routing, including nested and sibling routes.\n\n### Contributing\n\nIf you have a feature request, please create a new issue so the community can discuss it.\n\nIf you find a defect, please submit a bug report that includes a working link to reproduce the problem (for example, using [this fiddle](https://jsfiddle.net/04f3v2x4/)). Of course, pull requests to fix open issues are always welcome!\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) Dan Barnes\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md"}