Skip to content

Development

Ying Zhong edited this page Aug 29, 2026 · 16 revisions

Note

This page is for those looking to make changes to MarkEdit (as a developer). To customize its appearance and behavior with your own scripts and style sheets (as a user), refer to Customization Guide.

Building MarkEdit

Building CoreEditor

After checking out the project, go to the root folder of the repository and run:

cd CoreEditor
yarn install
yarn build

Tip

To test the editor in a development environment, run yarn dev instead. Web interfaces are exposed through window.webModules.

Building MarkEditMac

After successfully building CoreEditor, open MarkEdit.xcodeproj and build the MarkEditMac target.

We recommend overriding build settings by adding a Local.xcconfig file to the root folder. You can use it to specify the code-signing identity, development team, and other local settings.

Note

Note that you should always use the latest stable release of Xcode.

Testing MarkEdit Locally

Unit tests run automatically through GitHub Actions, but you can also run them on your machine.

Testing CoreEditor

Make sure dependencies are installed and run:

cd CoreEditor
yarn test

Testing MarkEditMac

MarkEditMac consists of several targets. Here is an example of how to run MarkEditCoreTests:

xcodebuild test -project MarkEdit.xcodeproj -scheme MarkEditCoreTests -destination 'platform=macOS'

Updating Dependencies

  • NPM packages: CoreEditor/package.json
  • Other 3rd-party code: CoreEditor/src/@vendor
  • JavaScript libraries:
    • MarkEditMac/Modules/Sources/Previewer/Resources
    • MarkEditMac/Modules/Sources/DiffKit/Resources
  • SwiftLint: MarkEditTools/Plugins/SwiftLint

Building Installer (MarkEdit.dmg)

  1. Archive and export a signed distribution (*.app), e.g., Developer ID distribution.
  2. Create an installer (*.dmg) with the create-dmg tool.
  3. Notarize the installer (*.dmg) with notarytool as below.
xcrun notarytool submit MarkEdit.dmg --keychain-profile "notarytool-password" --wait

xcrun notarytool log <request-id> --keychain-profile "notarytool-password" notarization-log.json

xcrun stapler staple MarkEdit.dmg

Building Update Archive (UpdateArchive.zip)

ditto -c -k --keepParent MarkEdit.app notarize.zip

xcrun notarytool submit notarize.zip --keychain-profile "notarytool-password" --wait

xcrun stapler staple MarkEdit.app

ditto -c -k --keepParent --sequesterRsrc MarkEdit.app UpdateArchive.zip

Beforehand, configure the credentials with xcrun notarytool store-credentials.

For more information, see Customizing the notarization workflow.

GitHub Release Checklist

  • Bump version number to something like 1.20.0
  • Tag the main branch with name v1.20.0 (w/ v)
  • Name the release 1.20.0 (w/o v)
  • Upload MarkEdit-1.20.0.dmg and ReleaseInfo.json to assets
  • Upload UpdateArchive.zip for in-app updater
  • Provide a concise description, avoid using bullets
  • Publish and test upgrading from an old build

Submitting Cask Updates

(no longer needed as casks are now auto-bumped)

brew bump-cask-pr markedit --version <version>

For more information, see #447.

Clone this wiki locally