{"analyzedAt":"2022-06-26T09:00:36.316Z","collected":{"metadata":{"name":"react-yaml-templator","scope":"unscoped","version":"0.2.11","description":"ReactY Templator | Yaml based templating for ReactJS","date":"2018-05-03T23:35:15.723Z","author":{"name":"Matt Suhay","email":"matthew.suhay@gmail.com","username":"suhay"},"publisher":{"username":"suhay","email":"matthew.suhay@gmail.com"},"maintainers":[{"username":"suhay","email":"matthew.suhay@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/suhay/reacty.git"},"links":{"npm":"https://www.npmjs.com/package/react-yaml-templator","homepage":"https://github.com/suhay/reacty#readme","repository":"https://github.com/suhay/reacty","bugs":"https://github.com/suhay/reacty/issues"},"license":"MIT","dependencies":{"express":"^4.16.3","js-yaml":"^3.11.0","react":"^16.2.0","react-dom":"^16.2.0","react-markdown":"^3.3.0","react-router-dom":"^4.2.2"},"devDependencies":{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-plugin-transform-react-jsx-self":"^6.22.0","babel-plugin-transform-react-jsx-source":"^6.22.0","babel-preset-env":"^1.6.1","babel-preset-react":"^6.24.1","concurrently":"^3.5.1","cross-env":"^5.1.4","jest":"^22.4.3","nodemon":"^1.17.2","webpack":"^3.5.6","webpack-node-externals":"^1.6.0"},"releases":[{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2020-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0}],"deprecated":"This package has been deprecated in favor of exothermicjs","hasTestScript":true,"readme":"# ReactY Templator - Yaml based templating for ReactJS\n\n[![Build Status](https://travis-ci.org/suhay/reacty.svg?branch=master)](https://travis-ci.org/suhay/reacty)\n[![NPM version](https://img.shields.io/npm/v/react-yaml-templator.svg)](https://www.npmjs.org/package/react-yaml-templator)\n\nCreate dynamic page content using YAML and Markdown\n\n## Installation\n\n```\nnpm install --save react-yaml-templator\n```\n\n## Basic usage\n\nFolder structure\n\n```\n.\n├── public/\n│   ├── pages/\n│   │   ├── index.yml\n│   │   ├── base.yml\n│   │   └── about.yml\n│   └── static/\n│        ├── css/\n│        ├── js/\n│        └── index.html\n└── index.js\n```\n\nindex.js\n\n```js\nvar Reacty = require(\"react-yaml-templator\");\nvar path = require('path');\nvar express = require('express');\n\nvar app = express();\nvar pages =  path.resolve(__dirname, './public/pages');\n\napp.get('*', (req, res) => {\n  if (req.url.indexOf('.') === -1) {\n    res.send(Reacty.build(req.url, pages));\n  } else {\n    var path = req.params[0] ? req.params[0] : 'index.html';\n    res.sendFile(path, {root: './public/static'});\n  }\n}).listen(3001, () => {\n  console.log('React app listening on port 3001!')\n});\n```\n\nindex.html\n\n```html\n<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta name=\"generator\" content=\"reacty\">\n  </head>\n  <body>\n    $body-placeholder\n  </body>\n</html>\n```\n\n## Template Examples\n\n### Navigation Bar\n\n```yaml\n- !navbar\n  items:\n  - \"Home\": '/'\n  - \"All kinds of links\": 'https://example.com'\n  - \"Here's a link\": '#on-page-link'\n```\n\n**Renders as**\n\n```html\n<nav aria-label=\"Top navigation\">\n  <ul role=\"menubar\">\n    <li role=\"none\">\n      <a href=\"/\" role=\"menuitem\">Home</a>\n    </li>\n    <li role=\"none\">\n      <a href=\"https://example.com\" role=\"menuitem\">\n        All kinds of links\n      </a>\n    </li>\n    <li role=\"none\">\n      <a href=\"#on-page-link\" role=\"menuitem\">\n        Here's a link\n      </a>\n    </li>\n  <ul>\n</nav>\n```\n\n### Section\n\n```yaml\n- !section\n  id: first\n  title: '# First!'\n  class: row\n  items:\n  - !col\n    id: maybe-col\n    content: |\n      ## Here is a column\n      \n  - !col\n    id: maybe-col-also\n    content: |\n      ## Here is another column\n\n      You can add images and tables in here, too.\n\n      from adam-p/markdown-here\n\n      | Tables        | Are           | Cool  |\n      | ------------- |:-------------:| -----:|\n      | col 3 is      | right-aligned | $1600 |\n```\n\n**Renders as**\n\n```html\n<section class=”row”>\n  <h1>First!</h1>\n  <div class=\"col\">\n    <h2>Here is a column</h2>\n  </div>\n  <div class=\"col\">\n    <h2>Here is another column</h2>\n    <p>You can add images and tables in here, too.</p>\n    <p>from adam-p/markdown-here</p>\n    <table>\n      ...\n    </table>\n  </div>\n</section>\n```\n\n### Template Referencing\n\n```yaml\ntop_template:\n- !get 'another-template.yml'\n```\n\nLoads the content of the referenced Yaml file. Good for content reuse, keeping file sizes smaller, and keeping similar collections of information together.\n\n### Modules\n\nCustom defined types that you inject with Yaml tags.\n\nExample (not included in default modules):\n\n```yaml\ntop_slideshow:\n- !slideshow\n  items:\n  - 'https://example.com/img1.png'\n  - 'https://example.com/img2.png'\n  - 'https://example.com/img3.png'\n```"},"npm":{"downloads":[{"from":"2022-06-25T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":3},{"from":"2022-06-19T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":18},{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":29},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":127},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":205},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":380}],"starsCount":0},"github":{"starsCount":2,"forksCount":0,"subscribersCount":1,"issues":{"count":137,"openCount":16,"distribution":{"3600":34,"10800":1,"32400":5,"97200":5,"291600":7,"874800":7,"2624400":11,"7873200":21,"23619600":19,"70858800":16,"212576400":11},"isDisabled":false},"contributors":[{"username":"suhay","commitsCount":197},{"username":"dependabot[bot]","commitsCount":18}],"commits":[{"from":"2022-06-19T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-05-27T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2022-03-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-12-28T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":0},{"from":"2021-06-26T00:00:00.000Z","to":"2022-06-26T00:00:00.000Z","count":19}],"statuses":[{"context":"continuous-integration/travis-ci/push","state":"success"}]},"source":{"files":{"readmeSize":3304,"testsSize":435,"hasNpmIgnore":true},"badges":[{"urls":{"original":"https://travis-ci.org/suhay/reacty.svg?branch=master","service":"https://api.travis-ci.org/suhay/reacty.svg?branch=master","shields":"https://img.shields.io/travis/suhay/reacty/master.svg","content":"https://img.shields.io/travis/suhay/reacty/master.json"},"info":{"service":"travis","type":"build","modifiers":{"branch":"master"}}},{"urls":{"original":"https://img.shields.io/npm/v/react-yaml-templator.svg","shields":"https://img.shields.io/npm/v/react-yaml-templator.svg","content":"https://img.shields.io/npm/v/react-yaml-templator.json"},"info":{"service":"npm","type":"version","modifiers":{"type":"v"}}}],"outdatedDependencies":{"react-router-dom":{"required":"^4.2.2","stable":"6.3.0","latest":"6.4.0-pre.8"},"react-dom":{"required":"^16.2.0","stable":"18.2.0","latest":"18.3.0-next-955cad9bc-20220623"},"js-yaml":{"required":"^3.11.0","stable":"4.1.0","latest":"4.1.0"},"react-markdown":{"required":"^3.3.0","stable":"8.0.3","latest":"8.0.3"},"react":{"required":"^16.2.0","stable":"18.2.0","latest":"18.3.0-next-955cad9bc-20220623"}}}},"evaluation":{"quality":{"carefulness":0,"tests":0.85,"health":0.5,"branding":0.3},"popularity":{"communityInterest":5,"downloadsCount":42.333333333333336,"downloadsAcceleration":0.005840943683409455,"dependentsCount":0},"maintenance":{"releasesFrequency":0,"commitsFrequency":0.2186301369863014,"openIssues":1,"issuesDistribution":0}},"score":{"final":0.4141174706084902,"detail":{"quality":0.5666336698128475,"popularity":0.03557580271553494,"maintenance":0.6619309677548536}}}