import Immutable from "immutable" ; import PluginDependency from "../models/pluginDependency" ; const pkg = require ( "../../package.json" ) ; param { string } pluginName return { PluginDependency } function createFromDependency ( pluginName ) { const npmID = PluginDependency . nameToNpmID ( pluginName ) ; const version = pkg . dependencies [ npmID ] ; return PluginDependency . create ( pluginName , version ) ; } export default Immutable . List ( [ "highlight" , "search" , "lunr" , "fontsettings" , "theme-default" ] ) . map ( createFromDependency ) ;