Преглед изворни кода

fix(asset-server-plugin): Fix build to export non-image file icon

Michael Bromley пре 5 година
родитељ
комит
63166a2e14
2 измењених фајлова са 5 додато и 1 уклоњено
  1. 4 0
      packages/asset-server-plugin/build.js
  2. 1 1
      packages/asset-server-plugin/package.json

+ 4 - 0
packages/asset-server-plugin/build.js

@@ -0,0 +1,4 @@
+const fs = require('fs');
+const path = require('path');
+
+fs.copyFileSync(path.join(__dirname, 'src/file-icon.png'), path.join(__dirname, 'lib/src/file-icon.png'));

+ 1 - 1
packages/asset-server-plugin/package.json

@@ -9,7 +9,7 @@
   "license": "MIT",
   "scripts": {
     "watch": "tsc -p ./tsconfig.build.json --watch",
-    "build": "rimraf lib && tsc -p ./tsconfig.build.json",
+    "build": "rimraf lib && tsc -p ./tsconfig.build.json && node build.js",
     "lint": "tslint --fix --project ./",
     "test": "jest --config ./jest.config.js",
     "e2e": "jest --config ../../e2e-common/jest-config.js --runInBand --package=asset-server-plugin"