You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
557 B

  1. const { install, printStats } = require("esinstall")
  2. install(
  3. [{
  4. specifier: "htm/preact",
  5. all: false,
  6. default: false,
  7. namespace: false,
  8. named: ["html", "render", "Component"],
  9. }],
  10. {
  11. dest: "./lib",
  12. sourceMap: false,
  13. treeshake: true,
  14. verbose: true,
  15. }
  16. ).then(data => {
  17. const oldPrefix = "web_modules/"
  18. const newPrefix = "lib/"
  19. const spaces = " ".repeat(oldPrefix.length - newPrefix.length)
  20. console.log("Installation complete")
  21. console.log(printStats(data.stats).replace(oldPrefix, newPrefix + spaces))
  22. })