Skip to content

Useful codemods #9

@leoj3n

Description

@leoj3n

Install codemod:

pip install codemod

Run on command-line:

codemod -m -d /Users/leoj/bitovi/,+/bd/gm/bit-docs-website/docs/modules/bit-docs-js --extensions js \
    'documentjs\.(.*?)\.(.*?)' \
    'bit-docs/\1/\2'

Gives interface like:

  var _ = require("lodash");
  /**
   * @function bit-docs/process/code
   * @parent bit-docs/process/methods
   *
   * Process a code hint into properties on a `docObject`.
   *
-  * @signature `documentjs.process.code(options, callback)`
+  * @signature `bit-docs/process/code(options, callback)`
   *
   * Using the `options.code`, and `options.tags`, processes the code
   * into properties on a docObject.  The `callback` is called with the new docObject.
   *
   * @param {bit-docs/process/processOptions} options An options object that contains
   * the code to process.
   *
   * @param {function(bit-docs/process/docObject,bit-docs/process/docObject)} callback(newDoc,newScope)
   *
   * A function that is called back with a docObject created from the code and the scope
   * `docObject`.  If
   * no docObject is created, `newDoc` will be null.
   *

Accept change (y = yes [default], n = no, e = edit, A = yes to all, E = yes+edit)?

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