Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output the configured engine in version option #43

Merged
merged 5 commits into from
Dec 2, 2018

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Dec 1, 2018

Improve --version (-v) option to output the version of engine based on the current configuration / arguments.

Cases

Default

$ marp -v
@marp-team/marp-cli v0.0.14 (/w bundled @marp-team/marp-core v0.2.1)

Use engine specified by package name

$ npm install @marp-team/marpit --save-dev
$ marp -v --engine @marp-team/marpit
@marp-team/marp-cli v0.0.14 (/w customized engine in @marp-team/marpit v0.3.3)

Use engine specified by JS file in your project

$ marp -v --engine ./your-engine.js
@marp-team/marp-cli v0.0.14 (/w customized engine in your-project v1.0.0)

Use functional engine

$ npm install @marp-team/marp-core --save-dev
$ echo "const { Marp } = require('@marp-team/marp-core'); module.exports={engine: opts => new Marp(opts)}" > conf.js
$ marp -v -c ./conf.js
@marp-team/marp-cli v0.0.14 (/w customized engine)

ToDo

  • Add test
    • Specify the installed engine (=> show package name and version)
    • Specify the functional engine (=> show as using customized engine)

@yhatt yhatt changed the title Output configurated engine in version option Output configured engine in version option Dec 2, 2018
@yhatt yhatt changed the title Output configured engine in version option Output the configured engine in version option Dec 2, 2018
@yhatt yhatt merged commit 0974997 into master Dec 2, 2018
@yhatt yhatt deleted the output-configurated-version branch December 2, 2018 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant