Skip to content

Commit

Permalink
Merge pull request #8 from zakhenry/feat/output-line-numbers
Browse files Browse the repository at this point in the history
Feat/output line numbers
  • Loading branch information
zakhenry authored Jun 19, 2019
2 parents 14ceee6 + ff87f92 commit 0546e5b
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 137 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ Simple utility to embed source files into markdown code blocks <sup>[why tho?](#
[![Build Status](https://travis-ci.org/zakhenry/embedme.svg?branch=master)](https://travis-ci.org/zakhenry/embedme)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://commitizen.github.io/cz-cli/)

![Console Output](readme/screenshot.png 'Console Output')

## Usage

With a `README.md` in your current working directory, add a code block for one of the
[supported file types](#supported-file-types-so-far) and start the code block simply with a comment with the path to a
file. For example

<!-- embedme-ignore-next -->

This is a *markdown* document with a code block:

```ts
Expand All @@ -29,10 +33,12 @@ Et voilà! Your README.md file will be updated with the content of your source f
This is a *markdown* document with a code block:

```ts
// example.ts
export function hello(name: string): string {
// readme/example.ts

export function helloWorld(name: string): string {
return `Hello ${name}!, how are you today?`;
}

```

As the comment is preserved, you can happily re-run `embedme` and it will run again but there will be no changes.
Expand Down
3 changes: 3 additions & 0 deletions readme/example.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function helloWorld(name: string): string {
return `Hello ${name}!, how are you today?`;
}
Binary file added readme/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0546e5b

Please sign in to comment.