From 878e9e4f2e02b7042120cbe73e6c1286e9e0451a Mon Sep 17 00:00:00 2001 From: briandennis Date: Tue, 26 Sep 2017 13:08:30 -0500 Subject: [PATCH] import custom modules --- lib/constants.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/constants.js b/lib/constants.js index c2e4180..a528afd 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -192,7 +192,8 @@ export const LANGUAGES = [ }, { name: 'Nim', - module: 'nim' + module: 'nimrod', + custom: true }, { name: 'Pascal', @@ -292,7 +293,9 @@ const unfold = (f, seed) => { if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') { LANGUAGES.forEach((language) => { if (language.module) { - require(`codemirror/mode/${language.module}/${language.module}`) + !language.custom + ? require(`codemirror/mode/${language.module}/${language.module}`) + : require(`./customModes/${language.module}`) } }) }