popmark 0.1.0

  • Readme
  • Changelog
  • Installing
  • 48

popmark #

Welcome to popmark, a simple library that populates your markdown files with the output of embedded Dart code segments.

Basic use #

To populate our markdown with the output of embedded code segments, we can run:

popmark [target-markdown-file]

This gets popmark to search through the file for code segments marked dart, execute those segments, and poplate the markdown file with text blocks containing the respective segment output.

(We can use --strip to remove all code output blocks.)

For example:

Using libraries and packages #

We can use --imports to specify libraries or packages the code segments rely on.

For example:

Alternatively, we can specify a Dart template file, with necessary imports, using --template. See --help for details.

Cache #

popmark stores a json cache in a folder .popmark (which we may want to tell our repo to ignore).

We can force popmark to execute code, whether or not it is cached, using --refresh. (We can also force individual code segments to be executed by wrapping them in code blocks marked dart! instead of dart.)

We can stop popmark from saving a cache, or making changes to an existing cache, using --no-cache.

(We can thus delete the cache by using both --refresh and --no-cache, or, of course, by simply running rm -rf .popmark.)

Miscellaneous #

  • Be sure to save the target file before you unleash popmark on it.
  • popmark overwrites any blocks marked text... consider using unmarked blocks for text you do not want modified.
  • Use --output output.md to create a new file rather than overwriting the target.
  • If the implementation of the embedded code changes between runs, clear the cache (or mark segments dart!) to force the segments to be executed.

Thanks! #

Thanks for your interest in this project. Please file any issues here.

0.1.0 #

  • Initial version

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate popmark

2. Use it

The package has the following executables:


$ popmark
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Binary only

Cannot assign flutter SDK tag because it is binary only

Binary only

Cannot assign flutter platform tags, it is a binary only package

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: Documenting popmark... Initialized dartdoc with 37 libraries in 30.0 seconds Validating docs... no issues found Documented 0 public libraries in 5.7 seconds stderr: Unhandled exception: dartdoc could not find any libraries to document #0 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:218:9)

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and popmark.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
args ^1.5.2 1.6.0
Dev dependencies
pedantic ^1.8.0