
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
verb-helper-codelinks
Advanced tools
Generate a list of links to the first line of code for each method in a given directory.
Generate a list of links to the first line of code for each method in a given directory.
npm i verb-helper-codelinks --save
Add a verbfile.js to your project with the following:
var verb = require('verb');
// register the helper
verb.helper('codelinks', require('verb-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:
{%= codelinks('lib/') %}
Results in markdown 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's [api-toc] helper)_
[api-toc]: https://github.com/jonschlinkert/api-toc
That renders to a list of links that looks like this:
(Code links generated by Verb's api-toc helper)
See the example verbfile.js.
It's magical and smells like baby powder. Besides that, it's also the most powerful and easy-to-use documentation generator for node.js. And it's magical.
Install dev dependencies:
npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on April 19, 2015.
FAQs
Generate a list of links to the first line of code for each method in a given directory.
We found that verb-helper-codelinks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.