diff --git a/common/app/routes/Challenges/rechallenge/builders.js b/common/app/routes/Challenges/rechallenge/builders.js
index 3984c83e0d..c38c1a6f30 100644
--- a/common/app/routes/Challenges/rechallenge/builders.js
+++ b/common/app/routes/Challenges/rechallenge/builders.js
@@ -95,7 +95,7 @@ export function concactHtml(required, template) {
const body = source
.flatMap(file => file.reduce((body, file) => {
- return body + file.contents + htmlCatch;
+ return body + file.contents + file.tail + htmlCatch;
}, ''))
.map(source => ({ source }))
.map(createBody);
diff --git a/common/app/routes/Challenges/rechallenge/transformers.js b/common/app/routes/Challenges/rechallenge/transformers.js
index 5eb60d5c8e..c0b3a9a94a 100644
--- a/common/app/routes/Challenges/rechallenge/transformers.js
+++ b/common/app/routes/Challenges/rechallenge/transformers.js
@@ -1,4 +1,13 @@
-import _ from 'lodash';
+import {
+ cond,
+ flow,
+ identity,
+ matchesProperty,
+ overEvery,
+ overSome,
+ partial,
+ stubTrue
+} from 'lodash';
import * as babel from 'babel-core';
import presetEs2015 from 'babel-preset-es2015';
@@ -24,15 +33,34 @@ function loopProtectHit(line) {
const console$logReg = /(?:\b)console(\.log\S+)/g;
const NBSPReg = new RegExp(String.fromCharCode(160), 'g');
-const isJS = _.matchesProperty('ext', 'js');
-const testHTMLJS = _.overSome(isJS, _.matchesProperty('ext', 'html'));
-const testJS$JSX = _.overSome(isJS, _.matchesProperty('ext', 'jsx'));
+const isJS = matchesProperty('ext', 'js');
+const testHTMLJS = overSome(isJS, matchesProperty('ext', 'html'));
+const testJS$JSX = overSome(isJS, matchesProperty('ext', 'jsx'));
+// work around the absence of multi-flile editing
+// this can be replaced with `matchesProperty('ext', 'sass')`
+// when the time comes
+const testSASS = file => (/type='text\/sass'/i).test(file.contents);
+// This can be done in the transformer when we have multi-file editing
+const browserSassCompiler = `
+
+`;
// if shouldProxyConsole then we change instances of console log
// to `window.__console.log`
// this let's us tap into logging into the console.
// currently we only do this to the main window and not the test window
-export const proxyLoggerTransformer = _.partial(
+export const proxyLoggerTransformer = partial(
vinyl.transformHeadTailAndContents,
source => (
source.replace(console$logReg, (match, methodCall) => {
@@ -40,7 +68,7 @@ export const proxyLoggerTransformer = _.partial(
})),
);
-const addLoopProtect = _.partial(
+const addLoopProtect = partial(
vinyl.transformContents,
contents => {
/* eslint-disable import/no-unresolved */
@@ -51,11 +79,11 @@ const addLoopProtect = _.partial(
}
);
-export const addLoopProtectHtmlJsJsx = _.cond([
+export const addLoopProtectHtmlJsJsx = cond([
[
- _.overEvery(
+ overEvery(
testHTMLJS,
- _.partial(
+ partial(
vinyl.testContents,
contents => contents.toLowerCase().includes('