/tags/jsdoc_toolkit-1.3.3/plugins/strip.js

http://jsdoc-toolkit.googlecode.com/ · JavaScript · 20 lines · 12 code · 4 blank · 4 comment · 0 complexity · 127d9feafd49b02084945751422e3414 MD5 · raw file

  1. /**
  2. @overview Remove JsDoc comments from source code and save file.
  3. @author Michael Mathews micmath@gmail.com
  4. */
  5. function deploy_begin(context) {
  6. context.src = context.d+"/src";
  7. MakeDir(context.src);
  8. }
  9. function deploy_each(sourceFile, context) {
  10. var name = sourceFile.fileName.replace(/(\.\.?)?[\/\\]/g, "_");
  11. inform("Saving stripped source file to "+name);
  12. var stripped = sourceFile.content.replace(/\/\*\*[\S\s]+?\*\//g, "");
  13. SaveFile(context.src, name, stripped);
  14. }
  15. function deploy_finish(context) {
  16. }