Skip to content

How to organise a third-party theme and engine repo #561

Answered by yhatt
mil-ad asked this question in Q&A
Discussion options

You must be logged in to vote

--engine option in Marp CLI can pass the name of installed npm module. If you provided a custom engine as npm module, Marp CLI users can use your custom engine easily.

// package.json
{
  "name": "marp-custom-engine",
  "version": "0.0.1",
  "keywords": ["marp", "marp-cli", "marp-engine"],
  "type": "module",
  "main": "engine.js",
}
// engine.js
export default ({ marp }) => {
  console.log('Using custom engine...')
  return marp
}

CLI users can use the engine by installing it from npm.

npm i --save-dev @marp-team/marp-cli marp-custom-engine
npx marp --engine marp-custom-engine slide.md

npm package manager also can fetch the module from GitHub repository directly. (The engine name is spec…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@yhatt
Comment options

@yhatt
Comment options

@mil-ad
Comment options

@mil-ad
Comment options

@yhatt
Comment options

Answer selected by mil-ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants