Comparing version 0.1.1 to 0.2.0
@@ -42,2 +42,27 @@ ## Configuration | ||
#### `image` | ||
type: `object` | ||
Details for an image to include in the README. | ||
##### `image.alt` | ||
type: `array` | ||
Alt text for the image | ||
##### `image.link` | ||
type: `string` | ||
An optional link to wrap the image. | ||
##### `image.path` | ||
type: `string` | ||
The path to the image. | ||
##### `image.position` | ||
type: `string` | ||
The alignment for the image (`'left'`, `'center'`, `'right'`). | ||
#### `license` | ||
@@ -44,0 +69,0 @@ type: `string` |
14
index.js
@@ -18,2 +18,16 @@ #! /usr/bin/env node | ||
}, | ||
image: ({ alt = '', link, path, position, width }) => { | ||
const result = []; | ||
result.push(`<img | ||
src="${path}" | ||
${alt ? `alt="${alt}"` : ''} | ||
align="${position}" | ||
${width ? `width="${width}"` : ''} | ||
/>`); | ||
if (link) { | ||
result.unshift(`<a href="${link}">`); | ||
result.push('</a>'); | ||
} | ||
return result.join('\n'); | ||
}, | ||
include: ({ include = '' }) => { | ||
@@ -20,0 +34,0 @@ let result; |
{ | ||
"name": "emdaer", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "does a README.md", | ||
@@ -5,0 +5,0 @@ "repository": "flipactual/emdaer", |
@@ -1,3 +0,9 @@ | ||
# emdaer | ||
<a href="https://github.com/flipactual/emdaer"> | ||
<img | ||
src="/docs/emdaer.png" | ||
alt="emdaer" | ||
align="right" | ||
width="64px" | ||
/> | ||
</a> | ||
[![Travis](https://img.shields.io/travis/flipactual/emdaer.svg?style=flat-square)](https://travis-ci.org/flipactual/emdaer/) | ||
@@ -70,2 +76,27 @@ [![Node](https://img.shields.io/node/v/emdaer.svg?style=flat-square)](http://npmjs.com/package/emdaer) | ||
#### `image` | ||
type: `object` | ||
Details for an image to include in the README. | ||
##### `image.alt` | ||
type: `array` | ||
Alt text for the image | ||
##### `image.link` | ||
type: `string` | ||
An optional link to wrap the image. | ||
##### `image.path` | ||
type: `string` | ||
The path to the image. | ||
##### `image.position` | ||
type: `string` | ||
The alignment for the image (`'left'`, `'center'`, `'right'`). | ||
#### `license` | ||
@@ -72,0 +103,0 @@ type: `string` |
Sorry, the diff of this file is not supported yet
44542
9
77
167