.build.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. {
  2. "log": {
  3. "enabled": false,
  4. "debug": false,
  5. "console": true,
  6. "output": "build.log"
  7. },
  8. "profiles": {
  9. "production": ["compile", "typings", "typedoc", "lint", "changelog"],
  10. "development": ["serve", "watch", "compile"]
  11. },
  12. "clean": {
  13. "locations": ["dist/*", "typedoc/*", "types/lib/src"]
  14. },
  15. "lint": {
  16. "locations": [ "src/" ],
  17. "rules": { }
  18. },
  19. "changelog": {
  20. "log": "CHANGELOG.md"
  21. },
  22. "serve": {
  23. "sslKey": "cert/https.key",
  24. "sslCrt": "cert/https.crt",
  25. "httpPort": 8000,
  26. "httpsPort": 8001,
  27. "documentRoot": ".",
  28. "defaultFolder": "demo",
  29. "defaultFile": "index.html"
  30. },
  31. "build": {
  32. "global": {
  33. "target": "es2018",
  34. "treeShaking": true,
  35. "ignoreAnnotations": true,
  36. "sourcemap": false,
  37. "banner": { "js": "/*\n Face-API\n homepage: <https://github.com/vladmandic/face-api>\n author: <https://github.com/vladmandic>'\n*/\n" }
  38. },
  39. "targets": [
  40. {
  41. "name": "tfjs/browser/tf-version",
  42. "platform": "browser",
  43. "format": "esm",
  44. "input": "src/tfjs/tf-version.ts",
  45. "output": "dist/tfjs.version.js"
  46. },
  47. {
  48. "name": "tfjs/node/cpu",
  49. "platform": "node",
  50. "format": "cjs",
  51. "input": "src/tfjs/tf-node.ts",
  52. "output": "dist/tfjs.esm.js",
  53. "external": ["@tensorflow"]
  54. },
  55. {
  56. "name": "faceapi/node/cpu",
  57. "platform": "node",
  58. "format": "cjs",
  59. "input": "src/index.ts",
  60. "output": "dist/face-api.node.js",
  61. "external": ["@tensorflow"]
  62. },
  63. {
  64. "name": "tfjs/node/gpu",
  65. "platform": "node",
  66. "format": "cjs",
  67. "input": "src/tfjs/tf-node-gpu.ts",
  68. "output": "dist/tfjs.esm.js",
  69. "external": ["@tensorflow"]
  70. },
  71. {
  72. "name": "faceapi/node/gpu",
  73. "platform": "node",
  74. "format": "cjs",
  75. "input": "src/index.ts",
  76. "output": "dist/face-api.node-gpu.js",
  77. "external": ["@tensorflow"]
  78. },
  79. {
  80. "name": "tfjs/node/wasm",
  81. "platform": "node",
  82. "format": "cjs",
  83. "input": "src/tfjs/tf-node-wasm.ts",
  84. "output": "dist/tfjs.esm.js",
  85. "external": ["@tensorflow"]
  86. },
  87. {
  88. "name": "faceapi/node/wasm",
  89. "platform": "node",
  90. "format": "cjs",
  91. "input": "src/index.ts",
  92. "output": "dist/face-api.node-wasm.js",
  93. "external": ["@tensorflow"]
  94. },
  95. {
  96. "name": "tfjs/browser/esm/nobundle",
  97. "platform": "browser",
  98. "format": "esm",
  99. "input": "src/tfjs/tf-browser.ts",
  100. "output": "dist/tfjs.esm.js",
  101. "external": ["@tensorflow"]
  102. },
  103. {
  104. "name": "faceapi/browser/esm/nobundle",
  105. "platform": "browser",
  106. "format": "esm",
  107. "input": "src/index.ts",
  108. "output": "dist/face-api.esm-nobundle.js",
  109. "external": ["@tensorflow"]
  110. },
  111. {
  112. "name": "tfjs/browser/esm/bundle",
  113. "platform": "browser",
  114. "format": "esm",
  115. "input": "src/tfjs/tf-browser.ts",
  116. "output": "dist/tfjs.esm.js"
  117. },
  118. {
  119. "name": "faceapi/browser/iife/bundle",
  120. "platform": "browser",
  121. "format": "iife",
  122. "globalName": "faceapi",
  123. "minify": true,
  124. "input": "src/index.ts",
  125. "output": "dist/face-api.js",
  126. "external": ["@tensorflow"]
  127. },
  128. {
  129. "name": "faceapi/browser/esm/bundle",
  130. "platform": "browser",
  131. "format": "esm",
  132. "sourcemap": true,
  133. "input": "src/index.ts",
  134. "output": "dist/face-api.esm.js",
  135. "typings": "types/lib",
  136. "typedoc": "typedoc",
  137. "external": ["@tensorflow"]
  138. }
  139. ]
  140. },
  141. "watch": {
  142. "enabled": true,
  143. "locations": [ "src/**" ]
  144. },
  145. "typescript": {
  146. "allowJs": false
  147. }
  148. }