Created
November 28, 2015 16:40
-
-
Save dorward/769167498c4f63cdf34d to your computer and use it in GitHub Desktop.
I wish ES6 supported dynamic module loading. Then I might not feel the need to do this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load all the modules. | |
// ES6 doesn't support dynamic module loading, so we can't just pull these from files. They have to be hard coded. | |
{{#modules}} | |
import * as {{name}} from "./seq/{{name}}.js"; | |
{{/modules}} | |
import {List} from 'immutable'; | |
export function loadModules() { | |
return new List([ | |
{{#modules}} | |
{{name}}{{#unless @last}},{{/unless}} | |
{{/modules}} | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment