|
|
@ -1,6 +1,6 @@
|
|
|
|
import * as fs from 'fs';
|
|
|
|
const fs = require('fs');
|
|
|
|
import * as path from 'path';
|
|
|
|
const path = require('path');
|
|
|
|
import { compile } from '../index.ts';
|
|
|
|
const { compile } = require('./compiler.js');
|
|
|
|
|
|
|
|
|
|
|
|
let compileOptions = {
|
|
|
|
let compileOptions = {
|
|
|
|
extensions: ['.html']
|
|
|
|
extensions: ['.html']
|
|
|
@ -10,7 +10,7 @@ function capitalise(name) {
|
|
|
|
return name[0].toUpperCase() + name.slice(1);
|
|
|
|
return name[0].toUpperCase() + name.slice(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function register(options) {
|
|
|
|
function register(options) {
|
|
|
|
if (options.extensions) {
|
|
|
|
if (options.extensions) {
|
|
|
|
compileOptions.extensions.forEach(deregisterExtension);
|
|
|
|
compileOptions.extensions.forEach(deregisterExtension);
|
|
|
|
options.extensions.forEach(registerExtension);
|
|
|
|
options.extensions.forEach(registerExtension);
|
|
|
@ -42,4 +42,6 @@ function registerExtension(extension) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
registerExtension('.html');
|
|
|
|
registerExtension('.html');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = register;
|