workspaced.com.moduleman

  • Declaration

    void start(string projectRoot);

    Initializes the module & import parser. Call with {"cmd": "load", "components": ["moduleman"]}

  • Declaration

    void stop();

    Has no purpose right now.

  • Declaration

    FileChanges[] rename(string mod, string rename, bool renameSubmodules = true);

    Renames a module to something else (only in the project root).

    Parameters

    renameSubmodules: when true, this will rename submodules of the module too. For example when renaming lib.com to lib.coms this will also rename lib.com.* to lib.coms.*

    Return Value

    all changes that need to happen to rename the module. If no module statement could be found this will return an empty array.

    Call With: {"subcmd": "rename"}

  • Declaration

    CodeReplacement[] normalizeModules(string file, string code);

    Renames/adds/removes a module from a file to match the majority of files in the folder.

    Parameters

    file: File path to the file to normalize

    code: Current code inside the text buffer

  • Declaration

    const(string)[] getModule(string code);

    Returns the module name of a D code