From 4f076c0f62bd8ee6e32f1e97bf6c8b724ff3393f Mon Sep 17 00:00:00 2001 From: Andrew Nikitin Date: Fri, 9 Jun 2023 19:36:16 +0400 Subject: [PATCH] fix: Copy static files to the dist while building (#253) fix: Add static files to the dist folder --- .env.example | 1 + package-lock.json | 5 +++-- package.json | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 1c5b2d42..d19ed9f5 100644 --- a/.env.example +++ b/.env.example @@ -17,6 +17,7 @@ LOGTO_RESOURCE_URL='http://localhost:8787' LOGTO_ENDPOINT='http://localhost:3001' LOGTO_APP_ID='ldfsr...rq432' LOGTO_APP_SECRET='sdf...sdf' +COOKIE_SECRET='sdf...sdf' # Authentication ENABLE_AUTHENTICATION="boolean,default:false" diff --git a/package-lock.json b/package-lock.json index 792cb053..6d0befc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cheqd/credential-service", - "version": "2.1.0-develop.17", + "version": "2.1.0-develop.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cheqd/credential-service", - "version": "2.1.0-develop.17", + "version": "2.1.0-develop.18", "license": "Apache-2.0", "dependencies": { "@cheqd/did-provider-cheqd": "^3.3.0", @@ -26,6 +26,7 @@ "@verida/client-ts": "^2.3.5", "@verida/types": "^2.3.1", "cookie-parser": "^1.4.6", + "copyfiles": "^2.4.1", "cors": "^2.8.5", "did-resolver": "^4.1.0", "dotenv": "^16.1.3", diff --git a/package.json b/package.json index 7179be31..5e7d3e0e 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,8 @@ } }, "scripts": { + "copy-files": "copyfiles -u 1 src/static/**/*.js dist/src/static ", + "postbuild": "npm run copy-files", "build": "tsc", "start": "node dist/src/index.js", "format": "prettier --write '*.{json,js}' 'src/**/*.{js,ts}' 'test/**/*.{js,ts}'", @@ -60,6 +62,7 @@ "@verida/client-ts": "^2.3.5", "@verida/types": "^2.3.1", "cookie-parser": "^1.4.6", + "copyfiles": "^2.4.1", "cors": "^2.8.5", "did-resolver": "^4.1.0", "dotenv": "^16.1.3",