contently
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.0 • Public • Published

Contently

The main Contently package.

Usage

const contently = new Contently(options?);

Options

See ContentlyOptions.ts.

API

contently.use

contently.use(plugin, options?)

The plugin function will be invoked, allowing it to register hooks on the instance.

contently.find()

Search for files and add them. Promise is fulfilled, once all files have been found and transformed by registered plugins.

Events

You can hook into events on the instance.

contently.on('fileAdded', (file: ContentlyFile) => {
	// we got a new file!
	console.log(file.slug);
});
Event Parameters Description
fileAdded ContentlyFile A new file was added.
fileRemoved ContentlyFile A file was removed.
fileUpdated ContentlyFile A file's content was changed.
fileChanged ContentlyFile Any of the upper events occured to a file.

Readme

Keywords

none

Package Sidebar

Install

npm i contently

Weekly Downloads

1

Version

2.0.0-alpha.0

License

MIT

Unpacked Size

14.6 kB

Total Files

14

Last publish

Collaborators

  • krmax44