function handleModeRequirements(mode) {
	if (!mode) {
		return Promise.resolve();
	}
	const baseTranspilerPath = 'lib/transpilers';
	// Exit if already loaded
	var d = deferred();
	if (modes[mode].hasLoaded) {
		d.resolve();
		return d.promise;
	}

	function setLoadedFlag() {
		modes[mode].hasLoaded = true;
		d.resolve();
	}

	if (mode === HtmlModes.JADE) {
		loadJS(`${baseTranspilerPath}/jade.js`).then(setLoadedFlag);
	} else if (mode === HtmlModes.MARKDOWN) {
		loadJS(`${baseTranspilerPath}/marked.js`).then(setLoadedFlag);
	} else if (mode === CssModes.LESS) {
		loadJS(`${baseTranspilerPath}/less.min.js`).then(setLoadedFlag);
	} else if (mode === CssModes.SCSS || mode === CssModes.SASS) {
		loadJS(`${baseTranspilerPath}/sass.js`).then(function () {
			window.sass = new Sass(`${baseTranspilerPath}/sass.worker.js`);
			setLoadedFlag();
		});
	} else if (mode === CssModes.STYLUS) {
		loadJS(`${baseTranspilerPath}/stylus.min.js`).then(setLoadedFlag);
	} else if (mode === CssModes.ACSS) {
		loadJS(`${baseTranspilerPath}/atomizer.browser.js`).then(setLoadedFlag);
	} else if (mode === JsModes.COFFEESCRIPT) {
		loadJS(`${baseTranspilerPath}/coffee-script.js`).then(setLoadedFlag);
	} else if (mode === JsModes.ES6) {
		loadJS(`${baseTranspilerPath}/babel.min.js`).then(setLoadedFlag);
	} else if (mode === JsModes.TS) {
		loadJS(`${baseTranspilerPath}/typescript.js`).then(setLoadedFlag);
	} else {
		d.resolve();
	}

	return d.promise;
}
Loaded the code comiler based on the mode selected