Skip to content

🗂️ A structured version of the aim42 Method Reference

License

Notifications You must be signed in to change notification settings

scope42/structured-aim42

Repository files navigation

structured-aim42

Build Up to date? npm semantic-release

This is a structured version of the aim42 Method Reference. It takes the original AsciiDoc sources and extracts the structural information from them. This yields a tree of sections enriched with meta-data. The leaf nodes are available as rendered HTML.

This library makes it convenient to re-distribute aim42 content (see LICENSE) programatically. It is kept is sync with the original repository.

Usage

Install using your preferred package manager. Example:

npm install @scope42/structured-aim42

Import the aim42 document object and use it to explore the structure of the Method Reference. Example:

import { aim42 } from '@scope42/structured-aim42'

console.log("Top-Level Sections:")

for (const child of aim42.children) {
  if (child.type === "section") {
    console.log(`- ${child.titlePlain}`);
  }
}

Open in CodeSandbox

structured-aim42 comes with native TypeScript support. For usage with plain JS, use src/types.ts as documentation for exported data structures.

Tree Shaking

This library is very large because it cotains the whole content of the Method Reference multiple times. Make sure to use a build setup that enables tree shaking.

Each section is available as a module. This way, you can very precisely import what you need. Example:

import { howDoesAim42Work } from '@scope42/structured-aim42/lib/introduction/how-does-aim42-work'

Additionally, there is an atomic content module for each section. Use this if you need the whole HTML content of a specific section instead of the inner structure. Example:

import { howDoesAim42WorkAtomic } from '@scope42/structured-aim42/lib/introduction/how-does-aim42-work/atomic'

Resources

Images and CSS provided in the resources directory of the packge so you can serve them in a privacy-friendly way. To do this, you usually need to copy them from node_modules/@scope42/structured-aim42/resources to your application. Note that you may need to modify the image src attributes of the HTML exported by this library to make it work.

Also note that the CSS file, provided as is, contains an externally loaded Google font which you may want to remove for privacy reasons.

License

structured-aim42 is published under the Creative Commons Attributions Sharealike 4.0 license.

This project distributes content from the aim42 Method Reference by Gernot Starke and community contributors, used under CC BY-SA.

Attribution to this project is appreciated but not required. In any case, attribute the original authors.

About

🗂️ A structured version of the aim42 Method Reference

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages