feat: commandline chic

This commit is contained in:
Ahmad Abdolsaheb
2019-08-19 18:54:04 +03:00
committed by mrugesh
parent f0329da61a
commit 31e3d9b27e
75 changed files with 1303 additions and 635 deletions

View File

@@ -108,7 +108,12 @@ async function getDOMTestRunner(buildData, proxyLogger, document) {
runTestInTestFrame(document, testString, testTimeout);
}
export function buildDOMChallenge({ files, required = [], template = '' }) {
export function buildDOMChallenge({
files,
required = [],
template = '',
theme = ``
}) {
const finalRequires = [...globalRequires, ...required, ...frameRunner];
const loadEnzyme = Object.keys(files).some(key => files[key].ext === 'jsx');
const toHtml = [jsToHtml, cssToHtml];
@@ -120,7 +125,7 @@ export function buildDOMChallenge({ files, required = [], template = '' }) {
.then(checkFilesErrors)
.then(files => ({
challengeType: challengeTypes.html,
build: concatHtml({ required: finalRequires, template, files }),
build: concatHtml({ required: finalRequires, template, files, theme }),
sources: buildSourceMap(files),
loadEnzyme
}));