2.0.0-alpha.0 • Published 3 years ago

contently v2.0.0-alpha.0

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

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);
});
EventParametersDescription
fileAddedContentlyFileA new file was added.
fileRemovedContentlyFileA file was removed.
fileUpdatedContentlyFileA file's content was changed.
fileChangedContentlyFileAny of the upper events occured to a file.
2.0.0-alpha.0

3 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago