How to use the @geut/chast.createPreface function in @geut/chast

To help you get started, we’ve selected a few @geut/chast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geut / chan / packages / chan-core / transformer.js View on Github external
function compile(tree, file) {
    const preface = select('preface', tree);

    if (preface && !overwrite) {
      file.fail(new Error('The changelog already exists.'), preface, 'addPreface');
    }

    tree.children = [
      createPreface(parse(tplPreface)),
      createRelease({
        identifier: 'unreleased',
        version: 'Unreleased',
        unreleased: true
      })
    ];

    return tree;
  }

@geut/chast

Unist compatible spec for changelogs and helpers to nodes creation

ISC
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis

Similar packages