Naming Conventions

This document is for extension developers who wish to create their own extensions.

Extensions

  • Packages must supply the following keywords - remirror, extension.
  • Packages should be named remirror-extension-[NAME].
    • The name should be hyphen deliniated remirror-extension-new-rules to separate words.
  • Should export a named extension which uses the pascal version of the npm package name.
    • remirror-extension-custom should export CustomExtension.
    • remirror-extension-new-rules should export NewRulesExtension.
  • Extensions that only support a specific framework should use the pattern `remirror-extension-[FRAMEWORK]-[NAME].
    • remirror-extension-react-toggle-button and exports ReactToggleButtonExtension.
    • remirror-extension-angular-split and exports AngularSplitExtension.
  • Extensions which take options should export their options interface. The name should replace Extension from the exported extension class with Options.
    • remirror-extension-awesome becomes AwesomeOptions.

Presets

  • Packages must supply the following keywords - remirror, preset.
  • Packages should be named remirror-preset-[NAME].
    • The name should be hyphen deliniated remirror-preset-new-rules to separate words.
  • Should export a named preset which uses the pascal version of the npm package name.
    • remirror-preset-custom should export CustomPreset.
    • remirror-preset-new-rules should export NewRulesPreset.
  • Presets that only support a specific framework should use the pattern `remirror-preset-[FRAMEWORK]-[NAME].
    • remirror-preset-react-toggle-button and exports ReactToggleButtonPreset.
    • remirror-preset-angular-split and exports AngularSplitPreset.
  • Presets which take options should export their options interface. The name should replace Preset from the exported preset class with Options.
    • remirror-preset-awesome becomes AwesomeOptions.
  • Presets which also export extensions should follow the naming conventions highlighted in the extension section.