unified

Project: rajasegar/remark-ember-abc

Package: remark-ember-abc@1.0.0

  1. A remark plugin to transform the Handlebars codeblocks to Angle brackets syntax.
  1. remark 213
  2. markdown 152
  3. remark-plugin 81
  4. ember 2

remark-ember-abc

remark plugin to transform the code blocks in Handlebars syntax to Angle brackets syntax for Ember apps/addon documentation written in Markdown. It will only transform codeblocks of hbs type and leave the rest intact.

Install

Install remark-cli and this plugin globally and use it:

npm install -g remark-cli remark-ember-abc

Usage

remark README.md --use ember-abc 

This will print the changed content in the console.

If you want to overwrite then use the output option -o

remark README.md --use ember-abc  -o

To apply the transform to all Markdown files in the folder tree (even in nested sub-directories):

remark . --use ember-abc  -o

Example

This will be converted to:

One sentence. Two sentences.

One sentence.  Two sentences.

\```hbs
{{#ally-landmark tagName="header"}}
  This is my header content
{{/ally-landmark}}
\```

\```html
<h1>Hello world</h1>
\```

\```js
const hello = "world";
\```

to this:

One sentence. Two sentences.

One sentence.  Two sentences.

\```hbs
<AllyLandmark @tagName="header">
  This is my header content
</AllyLandmark>
\```

\```html
<h1>Hello world</h1>
\```

\```js
const hello = "world";
\```

For more options using the remark-cli visit the official guides

Info

The transformation is based on the ember-angle-brackets-codemod and tweaked specifically for this plugin. You can take a look at the src folder transform.js.