Skip to content

Commit

Permalink
Merge pull request #180 from marp-team/remove-deprecated-bespoke-options
Browse files Browse the repository at this point in the history
Remove deprecated bespoke arguments
  • Loading branch information
yhatt authored Nov 6, 2019
2 parents 92506d0 + b0b4762 commit d5b8d34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 50 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Breaking

- Marp CLI requires Node >= v8.16.0
- [GFM strikethrough syntax](https://github.com/marp-team/marp-core/issues/102) added to Marp Core may break existing slides
- [GFM strikethrough syntax](https://github.com/marp-team/marp-core/issues/102) added to Marp Core v0.15.0 may break existing slides

### Changed

Expand All @@ -16,6 +16,7 @@
### Removed

- CSS hack for Chrome scaling on bare template ([#177](https://github.com/marp-team/marp-cli/issues/177), [#178](https://github.com/marp-team/marp-cli/pull/178))
- Remove deprecated `--bespoke-osc` and `--bespoke-progress` argument options ([#180](https://github.com/marp-team/marp-cli/pull/180))

## v0.15.1 - 2019-11-03

Expand Down
20 changes: 3 additions & 17 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,10 @@ interface IMarpCLIArguments {
title?: string
url?: string
watch?: boolean

// Deprecated bespoke arguments
bespokeOsc?: boolean
bespokeProgress?: boolean
}

// TODO: Remove deprecated bespoke arguments
type IMarpCLIDeprecatedBespokeArguments = 'bespokeOsc' | 'bespokeProgress'

export type IMarpCLIConfig = Overwrite<
Omit<
IMarpCLIArguments,
'configFile' | '_' | IMarpCLIDeprecatedBespokeArguments
>,
Omit<IMarpCLIArguments, 'configFile' | '_'>,
{
engine?: ResolvableEngine | ResolvableEngine[]
html?: ConverterOption['html']
Expand Down Expand Up @@ -114,14 +104,10 @@ export class MarpCLIConfig {
const bespoke = this.conf.bespoke || {}

return {
osc: pick(
this.args.bespoke && this.args.bespoke.osc,
this.args.bespokeOsc, // TODO: Remove deprecated argument
bespoke.osc
),
// TODO: Better to use TypeScript v3.7 optional chaining
osc: pick(this.args.bespoke && this.args.bespoke.osc, bespoke.osc),
progress: pick(
this.args.bespoke && this.args.bespoke.progress,
this.args.bespokeProgress, // TODO: Remove deprecated argument
bespoke.progress
),
}
Expand Down
32 changes: 0 additions & 32 deletions src/marp-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,44 +145,12 @@ export default async function(argv: string[] = []): Promise<number> {
group: OptionGroup.Template,
type: 'boolean',
},
'bespoke-osc': {
coerce: v => {
cli.warn(
`${chalk.yellow(
'--bespoke-osc'
)} option is deprecated. Please use ${chalk.yellow(
'--bespoke.osc'
)} instead.`
)
return v
},
describe: '[DEPRECATED]',
group: OptionGroup.Template,
hidden: true,
type: 'boolean',
},
'bespoke.progress': {
describe: '[Bespoke] Use progress bar',
defaultDescription: 'false',
group: OptionGroup.Template,
type: 'boolean',
},
'bespoke-progress': {
coerce: v => {
cli.warn(
`${chalk.yellow(
'--bespoke-progress'
)} option is deprecated. Please use ${chalk.yellow(
'--bespoke.progress'
)} instead.`
)
return v
},
describe: '[DEPRECATED]',
group: OptionGroup.Template,
hidden: true,
type: 'boolean',
},
title: {
describe: 'Define title of the slide deck',
group: OptionGroup.Meta,
Expand Down

0 comments on commit d5b8d34

Please sign in to comment.