goog-base-migrator
Migration tool from goog.base to static base class methods.
Install
$ npm install -g goog-base-migrator
How to use
Find and confirm replacement with --debug
option.
$ goog-base-migrator test/fixture/basic.js --debugFile: test/fixture/basic.jsbefore: goog.base after: my.app.Sample.basebefore: goog.base after: my.app.Sample.basebefore: goog.base after: my.app.Sample.basebefore: goog.base after: my.app.Sample.baseFound 4 expressions.
OK, fix it with --fix-in-place
option!
$ goog-base-migrator test/fixture/basic.js --fix-in-placeFile: test/fixture/basic.jsFixed 4 expressions.$ git diff test/fixture/basic.jsdiff --git a/test/fixture/basic.js b/test/fixture/basic.jsindex f74e4fc..fa57b6f 100644--- a/test/fixture/basic.js+++ b/test/fixture/basic.js@@ -12,7 +12,7 @@ goog.require; * @extends {goog.ui.Component} */ my.app.Sample = function
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
- 0.2.0 (2014/11/19) Support the commented arguments.
- 0.1.0 (2014/04/21) Support the expression to assign result of
goog.base()
. - 0.0.1 (2014/04/20) Initial release.
License
Copyright (c) 2014 ama-ch
Licensed under the MIT license.