Skip to content

--apply should function anywhere in the command #110

@RyanMilligan

Description

@RyanMilligan

If I put --apply before the file glob, I get the following output:

> can-migrate --apply **/*.js

  Codemods to simplify upgrading CanJS.

  Usage
  $ can-migrate [<file|glob> ...]

  Updates files according to the CanJS 3.0 or CanJS 4.0 migration paths (minimal, modern, future)
  More info for v3.0: http://canjs.github.io/canjs/doc/migrate-3.html#Modernizedmigrationpath
  More info for v4.0: http://canjs.github.io/canjs/doc/migrate-4.html

  Options
  --apply     -a    Apply transforms (instead of a dry run)
  --force           Apply transforms regardless of git status
  --silent    -s    Silence output
  --config    -c    Path to custom config file
  --transform -t    specify a transform
  --can-version     specify CanJS version to upgrade to

  Examples
  can-migrate **/*.js
  can-migrate --apply **/*.js
  can-migrate -iad **/*.js
  can-migrate **/*.* --transform can-route/register.js
  can-migrate **/*.* --can-version 4

Putting --apply at the end of the command works around this issue. Either --apply should work in the way the help output describes, or the output should be updated to correctly reflect the requirements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions