bit-docs / bit-docs-js

A collection of tags, templates, and basic styles for JavaScript applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Useful codemods

leoj3n opened this issue · comments

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)?