A loader to pass files through Outline (Literate programming tool)

Usage no npm install needed!

<script type="module">
  import oinkiguanaOutlineLoader from 'https://cdn.skypack.dev/@oinkiguana/outline-loader';


Outline Loader

A Webpack loader that works with Outline to compile literate JavaScript.


npm install --save-dev @oinkiguana/outline-loader


  • language: Passed to Outline's -l parameter, indicating the language tag to compile with
  • style: Passed to Outline's -s parameter to override the automatically detected style
  • config: Passed to Outline's -c parameter to specify the path to the Outline.toml file
  • entrypoint: Passed to Outline's -e parameter to choose a named entrypoint
  • output: Can be set to tangle or weave, to indicate whether to tangle the source (output code) or weave it (output documentation)

Example usage:


import { myFunction } from './functions.js.tex';

myFunction(3); // => 5




This module works like this:

==> Define some functions.
==> Export the functions.

Our function \texttt{myFunction} is used to add two to any input.

\begin{code}[name=Define some functions]
function myFunction(input) {
  return input + 2;

Now that all the functions are written, they must be exported.

\begin{code}[name=Export the functions]
export { myFunction };



module.exports = {
  entry: 'index.js',
  module: {
    rules: [
      { test: /\.js\.(tex|md|html|bird)$/, loader: 'outline-loader' },