visreg-test
Version:
A visual regression testing solution that offers an easy setup with simple yet powerful customisation options, wrapped up in a convenient CLI runner to make assessing and accepting/rejecting diffs a breeze.
15 lines (14 loc) • 542 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const marked_1 = require("marked");
const path = require("path");
const express = require('express');
const router = express.Router();
router.get('/docs', (req, res) => {
const readmePath = path.join(req.local.rootDirectory, 'node_modules', 'visreg-test', 'README.md');
const readme = fs.readFileSync(readmePath, 'utf8');
const readmeHTML = (0, marked_1.marked)(readme);
res.send(readmeHTML);
});
exports.default = router;