npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

brief-node

v3.5.0

Published

Brief. The Active Writing Framework.

Downloads

6

Readme

The Active Writing Framework

Brief provides you with a set of tools to create "Reactive Documents" with markdown and javascript.

Reactive Documents are written in markdown and brought to life through the use of flexible, programmable model classes which do things like define the structure of the documents and different metadata attributes.

Briefcases

A Briefcase is the parent project owns all of the different assets, documents, data sources, visualizations, and what ever else. Briefcases package up all of these things and wrap them up in a javascript bundle that can be required() like any other npm package or module.

Briefcases can rely on plugins to define reusable sets of models with relationships between them. Maybe it is a cookbook, a software project management wiki, an interactive style guide for a website. Brief provides the ultimate level of flexibility and customization to writers.

Documents

Documents are markdown files with YAML frontmatter. Documents are expected to follow a consistent structure based on the type of model that you intend to power with that writing, if any. A Document's relationship to the model classes you define is based on the type parameter defined in YAML, or the name of the folder the document resides in relative to the Briefcase's config.docs_path

Models

Models can be defined to represent different types of documents. Models can have relationships with other models. You can do things with models. Models are given attributes based on the content of the document, and the data it contains.

Assets

A Briefcase project can include svg, png, jpg, gif, html, css, js files in an assets folder. These assets will be bundled with the project when it gets exported as a single JSON structure. These documents can be embedded directly in the rendered HTML by using special link tag syntax such as:

[embed:asset](folder/asset-name)

This will embed the asset in briefcase.config.assets_path + 'folder/asset-name.svg

Data Sources

A Briefcase project can include json, yaml, csv file types in the data folder. These will get treated as data sources and bundled with the project when it gets exported as a single JSON structure.

Data sources are useful ways of powering visualizations that get embedded in your document.

Visualizations

A Briefcase can include javascript files in briefcase.config.views_path.

These javascript files are expected to export a function and return some HTML.

In your documents, you include a YAML block like:

visualization: my_custom_visualization
data: whatever

The content of this block will be replaced with whatever gets returned from the javascript function.

This is a great way to embed visualizations, charts, interactive components, or whatever else you want inside of your writing.

Plugins

Brief's behavior can be extended through a simple plugin system. Plugins can bundle up re-usable model definitions that help automate repetitive scenarios that require a lot of writing. In practice, we use it to automate the project management and specifications documents for our software development business.

Some of the plugins we maintain:

Acknowledgements

  • Titus Woormer (@wooorm) for his work on MDast