Skip to content

Commit

Permalink
fix(asciidoc logging): hide the asciidocs logging (#68)
Browse files Browse the repository at this point in the history
This pr hides the asciidoc warings and errors.

closes #61
  • Loading branch information
SanderElias authored Dec 20, 2019
1 parent a73a780 commit 6f3b204
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 2 additions & 0 deletions extraPlugin/extra-plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const {configValidator, routeSplit} = require('../scully/bin');

console.log(__dirname);

const extraRoutesPlugin = (route, options) => {
const {createPath} = routeSplit(route);
if (options.numberOfPages) {
Expand Down
6 changes: 4 additions & 2 deletions scully/fileHanderPlugins/asciidoc.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
const asciidoctor = require('asciidoctor.js')();
import {registerPlugin} from '../pluginManagement/pluginRepository';
const loggerManager = asciidoctor.LoggerManager
const memoryLogger = asciidoctor.MemoryLogger.create();
loggerManager.setLogger(memoryLogger);

const asciiDocPlugin = async (raw: string) => {
return asciidoctor.convert(raw);
return asciidoctor.convert(raw, {});
};

registerPlugin('fileHandler', 'adoc', {
alternateExtensions: ['asciidoc', 'asc'],
handler: asciiDocPlugin,
});

23 changes: 23 additions & 0 deletions scully/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f3b204

Please sign in to comment.