{"_id":"@boris-turner/amphora","_rev":"2-5ef2a76d58da14bef5ce00d70c927cb6","name":"@boris-turner/amphora","dist-tags":{"latest":"7.6.1-cnn.0"},"versions":{"7.6.0":{"name":"@boris-turner/amphora","version":"7.6.0","description":"An API mixin for Express that saves, publishes and composes data with the key-value store of your choice.","main":"index.js","scripts":{"test":"npm run eslint && npm run mocha","eslint":"eslint --max-warnings 0 lib test","mocha":"istanbul cover _mocha"},"repository":{"type":"git","url":"git+https://github.com/nymag/amphora.git"},"homepage":"https://github.com/nymag/amphora","author":{"name":"New York Media"},"license":"MIT","dependencies":{"@boris-turner/amphora-auth":"^1.2.0","@boris-turner/amphora-fs":"^1.0.1","basic-auth":"^1.0.4","bluebird":"^3.5.1","body-parser":"^1.12","clay-log":"^1.2.0","clayutils":"^2.5.0","cuid":"^1.2.5","eventify":"^2.0.0","express":"^4.15.3","express-flash":"0.0.2","express-session":"^1.14.1","glob":"^7.0.0","handlebars":"^4.0.5","highland":"^2.11.1","ioredis":"^4.0.0","js-yaml":"^3.2.0","lodash":"^4.14.2","node-fetch":"^1.3.0","passport":"^0.3.2","passport-google-oauth":"^1.0.0","passport-http-header-token":"^1.1.0","passport-ldapauth":"^0.6.0","passport-slack":"0.0.6","passport-twitter":"^1.0.4","template2env":"^1.0.4","through2-filter":"^2.0.0","vhost":"^3.0.0"},"devDependencies":{"chai":"^3.4.0","chalk":"^1.0.0","coveralls":"^3.0.2","eslint":"^4.3.0","istanbul":"^0.4.0","levelup":"^1.3.9","memdown":"^1.4.0","mocha":"^5.2.0","rimraf":"^2.6.2","sinon":"^4.4.8","supertest":"^3.0.0"},"engines":{"node":"^8.9.0"},"engine-strict":true,"gitHead":"5318ddde1afeebd51bf0d604c34e40cdc54b7d77","publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/nymag/amphora/issues"},"_id":"@boris-turner/amphora@7.6.0","_nodeVersion":"12.8.0","_npmVersion":"lerna/3.16.4/node@v12.8.0+x64 (darwin)","dist":{"integrity":"sha512-M8HVppMpTXDHYpSNMchsR9R01dveAuaPIRpO2LmkoXZi227mijApDGUj6+R3Iub+2ROCT1KTXrtSg5jnvhe60A==","shasum":"f216e521a1158ae9fb5c06b9eae44028d8c64002","tarball":"https://registry.npmjs.org/@boris-turner/amphora/-/amphora-7.6.0.tgz","fileCount":188,"unpackedSize":742673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaIDiCRA9TVsSAnZWagAAcNUP/AmXmZqXHCCy9y2H6UM2\n/f38i3XTvpUd6F8FYme3BNv12XSHJfw0YQ+BBAC1koOEWAo/luZB9dvyqpM8\nyMdNJbieECb4sJQ+Hr/XpXhXccQiWLnilxuB2AGOFT6lL3MXX+G3U+XlM7cM\n7HpavrbLzjqegwic2XvxAXu+71dunNXA5G2uJlClw0WQBQUl4Gtfxu5HcVx8\n/uzFno9eStk1lioV9VaeQyG+d476C9JOYk1nsKnXf4uCAwYCHC22EUmi/+AA\netv5XYqlRLV3Oqj+YhfvwGiWpATdwxGhnKUfPHVjEpa2gBrzfglv5GIjojCY\nmZ7USiHkC570Mnboc8pkBZBmBVc45WbpsiO56pbajhpeOAobnM9y/uZwK6n0\nwRdBKGMxU5VMBLh6XBwxZX9dGOU69R18FaVRXPtesL+gvl661Br/K9VvTujq\nWvcLh+7j3cHxpKeYh25nBGmxKxsPGPA+Kvn6NJCdHl36u1DozGkYiPDOYNfk\nuyab/1iNbirnU7fWlk8dqCFzOuC6lT8RyP8D2Rmk4GKmZxUYjz/YzTwhcOlD\nS/pJv0n5AUalgDSS6NuqNgqL+IzRwf7dMKBI+zFs25f0vA3maCew2Va9BWr1\nkAjOYoxsaP1UOFwL/YLiYaYO0Ll7KpFdqZno68Dmq1JREAW0ui+aJ/rPmGDN\nsGM4\r\n=/3ob\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxXfTTNfwoAaG+NkXd2qAiRDkN64cJwT71iTN5h1WpFwIhAIZU0sxarMGmeR+nQk4JxFvtnMzKCjUt+0e6ajCEOJQ9"}]},"maintainers":[{"name":"boris-turner","email":"boris.musa@turner.com"}],"_npmUser":{"name":"boris-turner","email":"boris.musa@turner.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amphora_7.6.0_1567129825835_0.17021554409993556"},"_hasShrinkwrap":false},"7.6.1-cnn.0":{"name":"@boris-turner/amphora","version":"7.6.1-cnn.0","description":"An API mixin for Express that saves, publishes and composes data with the key-value store of your choice.","main":"index.js","scripts":{"test":"npm run eslint && npm run mocha","eslint":"eslint --max-warnings 0 lib test","mocha":"istanbul cover _mocha"},"repository":{"type":"git","url":"git+https://github.com/nymag/amphora.git"},"homepage":"https://github.com/nymag/amphora","author":{"name":"New York Media"},"license":"MIT","dependencies":{"@boris-turner/amphora-auth":"^1.2.0-cnn.0","@boris-turner/amphora-fs":"^1.0.2-cnn.0","@boris-turner/clayutils":"^2.6.3-cnn.0","basic-auth":"^1.0.4","bluebird":"^3.5.1","body-parser":"^1.12","clay-log":"^1.2.0","cuid":"^1.2.5","eventify":"^2.0.0","express":"^4.15.3","express-flash":"0.0.2","express-session":"^1.14.1","glob":"^7.0.0","handlebars":"^4.0.5","highland":"^2.11.1","ioredis":"^4.0.0","js-yaml":"^3.2.0","lodash":"^4.14.2","node-fetch":"^1.3.0","passport":"^0.3.2","passport-google-oauth":"^1.0.0","passport-http-header-token":"^1.1.0","passport-ldapauth":"^0.6.0","passport-slack":"0.0.6","passport-twitter":"^1.0.4","template2env":"^1.0.4","through2-filter":"^2.0.0","vhost":"^3.0.0"},"devDependencies":{"chai":"^3.4.0","chalk":"^1.0.0","coveralls":"^3.0.2","eslint":"^4.3.0","istanbul":"^0.4.0","levelup":"^1.3.9","memdown":"^1.4.0","mocha":"^5.2.0","rimraf":"^2.6.2","sinon":"^4.4.8","supertest":"^3.0.0"},"engines":{"node":"^8.9.0"},"engine-strict":true,"gitHead":"4ea81cdbe6876df9fb02f13513baba9ac6806a62","publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/nymag/amphora/issues"},"_id":"@boris-turner/amphora@7.6.1-cnn.0","_nodeVersion":"12.8.0","_npmVersion":"lerna/3.16.4/node@v12.8.0+x64 (darwin)","dist":{"integrity":"sha512-8d1z9fH5xnNpIcLJej8F4zFNXvgi8EKZKSYo3LDXMr5ghBj0T1SRKYygD8QEuSMmbK2w4pg2ws2imfvm9JA4eA==","shasum":"d5c6de6e5b8db4889af79f28386af3c2f9cbcccd","tarball":"https://registry.npmjs.org/@boris-turner/amphora/-/amphora-7.6.1-cnn.0.tgz","fileCount":190,"unpackedSize":748786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmjFLCRA9TVsSAnZWagAAxl4P/0Dg87ARUgrYJZ2bKwuQ\nJ0eJdC7erRxhML/SVc9biqftON8x9JXgZYbftfgVmSpAvUA5U6+lns2Lxb2C\naq8qdNkrVX5hrK4YM8zrz0LPUijf1ljfz7AalyMqx9tSX3ydgofL2p8XzGft\nGNKOkZJnJHgMgIDCOa3qX8n8haYprQc45p4NOEFXF77grzjr4mhq5d0rARBt\nLk/smd0d+OuSUZm/I63FpxcniNkhzOPN42SwH5HXExii/y1YQ8w8T38U2byV\n/34Wd1lyIJ/u7NIYmgZ7QulADgZr7rufa0pk5vquUFxN7I2iHfjA4HgoslZb\nykR/tXgb8N/ot1SyuW+Uh7cdsdnoW+9+hXCFqjF/kEjvw7NFqdnwiasWlqSf\nwzSJp5JKPbOJGSsr+SXRQjgTt1/pLNgiocxjGgEQCvA0aeKw3j4rcjOHV6Oh\nAPPxDdh52BYuaQtLBg6DboNWjlXG07o94Po2vOUWUBKS0dSZpx/Qju2D62a9\nKScib//8pmCAzhE8/OAa/aJbcF/fRQ7Qh3EXNLChaANp8U8dKzFF4zIBCBxW\nVHrCw1Q3joh7pSCB5DaAKB94XqsB0mGuJe5TDbSJxqWyIknXQ4YTjaDPoDTp\nAOKdnICGrqkGN2AfOL8ynBIWdWwKaRoDfHjK2+CAKRRwubXtBQYeLeE05inb\nCViA\r\n=oS9t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMKT1DKfDUaeImbD3cHQRwz7C36S3s/FXriIx2omgelAIgWpC2OBDG/e6xjh45Q3s5z1BEym32apL74yhX3QAdEis="}]},"maintainers":[{"name":"boris-turner","email":"boris.musa@turner.com"}],"_npmUser":{"name":"boris-turner","email":"boris.musa@turner.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amphora_7.6.1-cnn.0_1570386250482_0.9447537098886929"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-30T01:50:25.586Z","7.6.0":"2019-08-30T01:50:26.013Z","modified":"2022-04-04T20:12:49.086Z","7.6.1-cnn.0":"2019-10-06T18:24:10.632Z"},"maintainers":[{"name":"boris-turner","email":"boris.musa@turner.com"}],"description":"An API mixin for Express that saves, publishes and composes data with the key-value store of your choice.","homepage":"https://github.com/nymag/amphora","repository":{"type":"git","url":"git+https://github.com/nymag/amphora.git"},"author":{"name":"New York Media"},"bugs":{"url":"https://github.com/nymag/amphora/issues"},"license":"MIT","readme":"# Introduction\n\n![illustration of an amphora](https://raw.githubusercontent.com/nymag/media/master/amphora-logo.png)\n\n_\"A new way to organize, edit, and deliver the web, one component at a time.\"_\n\n[![CircleCI](https://circleci.com/gh/clay/amphora.svg?style=svg)](https://circleci.com/gh/clay/amphora) [![Coverage Status](https://coveralls.io/repos/nymag/amphora/badge.svg?branch=master&service=github&t=WhTOg8)](https://coveralls.io/github/nymag/amphora?branch=master)\n\nPowering [New York Magazine](http://nymag.com/), [Vulture](http://www.vulture.com/), [The Cut](http://www,thecut.com/), [Grub Street](http://www.grubstreet.com/).  \nCreated by New York Media.\n\n## Table of Contents\n\n* [Introduction](./#introduction)\n* [Installation](./#installation)\n* [Usage](./#usage)\n* [Contribution](./#contribution)\n* [Advanced Topics](./#advanced-topics)\n\n## Introduction\n\nAmphora is a mixin for [Express](https://github.com/strongloop/express) that:\n\n* Composes components into renderable pages\n* Uses any key-value store of your choice \\(e.g., Mongo, Redis, LevelDB, etc.\\)\n* Provides an API for managing instances of components, uris, and pages\n\n[Components are reusable, configurable, self-contained bits of the web.](https://github.com/nymag/amphora/wiki#clay-is-divided-into-components)\n\nAmphora is a core part of New York Media's Clay project, an open-source content management system.\n\nIt follows semver and is stable as of v1.0.0.\n\n## Installation\n\n```text\nnpm install --save amphora\n```\n\n## Usage\n\nClay separates concerns into two main areas: components and sites. Create two new directories in your project:\n\n```text\n/components  (where your custom components live)\n/sites       (for site-specific settings, routes, and assets)\n```\n\nIn your project's main server file \\(e.g. `app.js`\\), instantiate a new Amphora instance.\n\n```javascript\nvar amphora = require('amphora'),\n  port = process.env.PORT || 3000;\n\nreturn amphora()\n  .then(function (server) {\n    server.listen(port);\n  });\n```\n\nFor additional configuration, you may pass in an Express app / router. You can also override the default templating engine\\(s\\) with your own.\n\n```javascript\nvar app = require('express')(),\n  amphora = require('amphora'),\n  amphoraHtml = require('amphora-html'),\n  port = process.env.PORT || 3000,\n  env;\n\n// add project-specific settings to your app\napp.set('strict routing', true);\napp.set('trust proxy', 1);\n\n// add custom settings to your templating engine\nenv.addGlobal('projectName', process.env.PROJECT_NAME);\n\nreturn amphora({\n  app: app,\n  renderers: {\n    default: 'html',\n    html: amphoraHtml\n  }\n}).then(function (server) {\n  server.listen(port);\n});\n```\n\n### How to create a component\n\nComponents in Clay have the following structure:\n\n```text\n/component-name     unique name of your component\n    template.handlebars   your template\n    schema.yml            describes how the component's data is edited\n```\n\nAll of these files are optional.\n\n### How to create a template\n\nThe template you create is dependent on whichever renderer you'd like to use. The Clay Core team supports an [HTML renderer](https://github.com/clay/amphora-html) using [Handlebars](http://handlebarsjs.com/) template, but the choice is yours. Either request a renderer or build one on your own!\n\n### How to create a schema\n\n[Kiln](https://github.com/nymag/clay-kiln) uses a component's schema.yml to determine how it is edited. [Visit the Kiln wiki](https://github.com/clay/clay-kiln/wiki/Schemas-and-Behaviors) for examples of how to write schema files for your components.\n\n## Contribution\n\nFork the project and submit a PR on a branch that is not named `master`. We use linting tools and unit tests, which are built constantly using continuous integration. If you find a bug, it would be appreciated if you could also submit a branch with a failing unit test to show your case.\n\n## Advanced Topics\n\n* [New Concepts For Developers and Designers](https://github.com/clay/amphora/wiki#for-developers-and-designers)\n* [Bootstrapping Data](https://github.com/clay/amphora/tree/master/lib/bootstrap.md)\n* [Routing](https://github.com/clay/amphora/tree/master/lib/routes)\n* [Plugins](https://github.com/clay/amphora/tree/master/docs/plugin.md)\n* [Subsites](https://github.com/clay/amphora/tree/master/docs/subsites.md)\n","readmeFilename":"README.md"}