# remarkable-codegroup

> remarkable plugin to put code blocks into groups

Latest version **0.0.4** (published 2017-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install remarkable-codegroup
pnpm add remarkable-codegroup
yarn add remarkable-codegroup
bun add remarkable-codegroup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-09-21 |
| First published | 2017-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Layton Whiteley |
| Maintainers | lwhiteley |
| Keywords | remarkable-plugin, remarkable, codegroup, code, group, block, markdown, markdown-to-html |

## Links

- npm: https://www.npmjs.com/package/remarkable-codegroup
- Repository: https://github.com/lwhiteley/remarkable-codegroup
- Homepage: https://github.com/lwhiteley/remarkable-codegroup#readme
- Issues: https://github.com/lwhiteley/remarkable-codegroup/issues
- npm.io page: https://npm.io/package/remarkable-codegroup

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [gfm-code-blocks](https://npm.io/package/gfm-code-blocks.md) ^1.0.0
- [crypto-random-string](https://npm.io/package/crypto-random-string.md) ^1.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2017-09-21
- 0.0.3 — 2017-09-19
- 0.0.2 — 2017-09-19
- 0.0.1 — 2017-09-19

## README

# remarkable-codegroup

[![npm version](https://badge.fury.io/js/remarkable-codegroup.svg)](https://badge.fury.io/js/remarkable-codegroup)

remarkable plugin to put code blocks into groups

## Getting Started

```shell
npm i --save remarkable-codegroup
```

```js
const Remarkable = require('remarkable');
const markdown = new Remarkable(opts)
const codeGroup = require('remarkable-codegroup');
markdown.use(codeGroup);
```

## Description

This plugin creates a codegroup in the html syntax for the following: 
- [Bootstrap 3 Tabs](https://getbootstrap.com/docs/3.3/javascript/#tabs) 
    - `requires`: jQuery, Boostrap 3 (js, css)


### Syntax 

The syntax below denotes how the markdown should look in order to group code blocks

<pre>
[codegroup]    
```js
const docFolder = 'source/docs'
const docPath = `./${docFolder}`;
const fileGlob = '**/*.md'
const publicFolder = 'public';
const htmlTemplate = fs.readFileSync('source/doc.template.html', 'utf8')
```
    
```js::sdk
const docFolder = 'source/docs'
const docPath = `./${docFolder}`;
const fileGlob = '**/*.md'
const publicFolder = 'public';
```
    
```swift
func application(_ application: UIApplication) -> Bool {
    sampleApp = SampleApplication()
    return true
}
```
[/codegroup]
</pre>

### Preview

![codegroup](https://i.imgur.com/YJAwalP.png)

**Please Note:** The dark theme in this example is a custom style. Styles can be customized however you see fit.

### Custom Named Tabs

As seen in the example above, tabs can have custom names for situations where you may need to group the same language and need to differentiate them.

The example above shows a code block `js::sdk`, where `js` is the language syntax to be used and `sdk` denotes the name to be seen in the tab; we use `::` to separate both terms.


Notes:
- Pull requests are welcome

---
_Source: https://npm.io/package/remarkable-codegroup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
