vendor.js 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env node
  2. /* eslint-disable no-console */
  3. const {cp, set} = require("shelljs");
  4. const path = require("path");
  5. const filesToVendor = {
  6. // XXX currently these two licenses are identical. Perhaps we should check
  7. // in case that changes at some point in the future.
  8. "react/LICENSE": "REACT_AND_REACT_DOM_LICENSE",
  9. "react/umd/react.production.min.js": "react.js",
  10. "react/umd/react.development.js": "react-dev.js",
  11. "react-dom/umd/react-dom.production.min.js": "react-dom.js",
  12. "react-dom/umd/react-dom.development.js": "react-dom-dev.js",
  13. "react-intl/LICENSE.md": "REACT_INTL_LICENSE",
  14. "react-intl/dist/react-intl.min.js": "react-intl.js",
  15. "react-redux/LICENSE.md": "REACT_REDUX_LICENSE",
  16. "react-redux/dist/react-redux.min.js": "react-redux.js",
  17. };
  18. set("-v"); // Echo all the copy commands so the user can see what's going on
  19. for (let srcPath of Object.keys(filesToVendor)) {
  20. cp(path.join("node_modules", srcPath),
  21. path.join("vendor", filesToVendor[srcPath]));
  22. }
  23. console.log(`
  24. Check to see if any license files have changed, and, if so, be sure to update
  25. https://searchfox.org/mozilla-central/source/toolkit/content/license.html`);