build 707 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env node
  2. /*jshint shelljs:true */
  3. "use strict";
  4. var path = require("path");
  5. var build = require("../scripts/build");
  6. require("shelljs/make");
  7. var distDir = path.join(__dirname, "../dist");
  8. if (!test("-e", distDir))
  9. mkdir(distDir);
  10. build("web", function(err, version, src) {
  11. if (err) {
  12. console.error(err);
  13. process.exit(1);
  14. }
  15. src.to(distDir + "/jshint.js");
  16. console.log("Built: " + version + " (web)");
  17. });
  18. build("rhino", function(err, version, src) {
  19. var dest;
  20. if (err) {
  21. console.error(err);
  22. process.exit(1);
  23. }
  24. dest = distDir + "/jshint-rhino.js";
  25. chmod("+x", dest);
  26. src.to(dest);
  27. console.log("Built: " + version + " (Rhino)");
  28. });