JSPM

  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q50855F
  • License MIT

HTML-based static site generator

Package Exports

  • @prpl/core
  • @prpl/core/deno-import-map.json
  • @prpl/core/package.json

Readme

@prpl/core

This module interpolates your content into HTML.

Usage

Can be used via the prpl CLI command, or in CJS/ESM. Example in ESM:

import { interpolate } from '@prpl/core';

// Default options
const options = {
  noClientJS: false,
  templateRegex: (key) => new RegExp(`\\[${key}\\]`, 'g'),
  markedOptions: {}
};

async function build() {
  await interpolate({ options });
}

build();

Dependencies

@prpl/core has one dependency: marked, a markdown compiler. Reasons for relying on it include:

  • It is not practical to implement a markdown compiler within the PRPL library
  • It is fair to assume that most users will author content in markdown given its ubiquity
  • marked itself has zero dependencies and is actively maintained

In the future it may make sense to externalize this dependency, but given the above reasons it is included for now.