# helper-codelinks

> Generate a list of links that take you to the first line of code for each method in a given directory.

Latest version **0.1.2** (published 2015-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install helper-codelinks
pnpm add helper-codelinks
yarn add helper-codelinks
bun add helper-codelinks
```

## 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.1.2 |
| Published | 2015-04-19 |
| First published | 2015-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | api, assemble, assemblehelper, contents, docs, documentation, helper, helpers, table, template, templatehelper, toc, verb, verbhelper |

## Links

- npm: https://www.npmjs.com/package/helper-codelinks
- Repository: https://github.com/helpers/helper-codelinks
- Issues: https://github.com/helpers/helper-codelinks/issues
- npm.io page: https://npm.io/package/helper-codelinks

## Dependencies (2)

- [api-toc](https://npm.io/package/api-toc.md) ^0.3.1
- [mixin-deep](https://npm.io/package/mixin-deep.md) ^1.0.1

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2015-04-19
- 0.1.1 — 2015-04-19
- 0.1.0 — 2015-04-19

## README

# helper-codelinks [![NPM version](https://badge.fury.io/js/helper-codelinks.svg)](http://badge.fury.io/js/helper-codelinks)  [![Build Status](https://travis-ci.org/helpers/helper-codelinks.svg)](https://travis-ci.org/helpers/helper-codelinks) 

> Generate a list of links that take you to the first line of code for each method in a given directory.

## Install with [npm](npmjs.org)

```bash
npm i helper-codelinks --save
```

## Usage

Add a `verbfile.js` to your project with the following:

```js
var verb = require('verb');

// register the helper
verb.helper('codelinks', require('helper-codelinks'));

// add a task to build your docs
verb.task('default', function () {
  return verb.src('my-documentation.md')
    .pipe(verb.dest('docs/'));
});
```

In your `.verb.md` file:

```markdown
{%= codelinks('lib/', {filter: '!**/foo.js'}) %}
```

Results in markdown like this:

```markdown
+ **[one](fixtures/one.js)**
  - [.a](fixtures/one.js#L7)
  - [.b](fixtures/one.js#L13)
  - [.c](fixtures/one.js#L19)
+ **[two](fixtures/two.js)**
  - [.c](fixtures/two.js#L7)
  - [.d](fixtures/two.js#L13)
  - [.e](fixtures/two.js#L19)

_(Code links generated by [verb] using the [api-toc] helper)_
```

Which renders to a list of links that looks like this:

+ **[one](fixtures/one.js)**
  - [.a](fixtures/one.js#L7)
  - [.b](fixtures/one.js#L13)
  - [.c](fixtures/one.js#L19)
+ **[two](fixtures/two.js)**
  - [.c](fixtures/two.js#L7)
  - [.d](fixtures/two.js#L13)
  - [.e](fixtures/two.js#L19)

_(Code links generated by [verb] using the [api-toc] helper)_

See the [example verbfile.js](./verbfile.js).

## Related projects
 * [template-helpers](https://github.com/jonschlinkert/template-helpers): Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.
 * [verb](https://github.com/assemble/verb): Verb makes it dead simple to generate markdown documentation, using simple templates, with zero configuration required. A project without documentation is like a project that doesn't exist.
 * [api-toc](https://github.com/jonschlinkert/api-toc): Pass a dirname, get a markdown-formatted Table of Contents for your API.  

## Running tests
Install dev dependencies:

```bash
npm i -d && npm test
```

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/helpers/helper-codelinks/issues)

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 

## License
Copyright (c) 2015 Jon Schlinkert  
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 19, 2015._


<!-- reflinks generated by verb-reflinks plugin -->

[api-toc]: https://github.com/jonschlinkert/api-toc
[verb]: https://github.com/assemble/verb
[template]: https://github.com/jonschlinkert/template

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