From f6103c1f2cacae4d397337a3892d85c7d49cbe33 Mon Sep 17 00:00:00 2001 From: marcobaobao Date: Wed, 24 Nov 2021 10:19:52 +0100 Subject: [PATCH] refactoring --- .dockerignore | 3 ++- Dockerfile | 1 + lib/fetch-yt-dlp.sh | 3 ++- package.json | 11 ++++++----- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.dockerignore b/.dockerignore index da14b2b..1288e6e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ node_modules dist package-lock.json -.parcel-cache \ No newline at end of file +.parcel-cache +.git \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8f5a849..c29e509 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,6 @@ COPY . . RUN npm run build RUN chmod +x ./lib/fetch-yt-dlp.sh RUN ./lib/fetch-yt-dlp.sh && mv yt-dlp ./lib +RUN rm -rf .parcel-cache EXPOSE 3022 CMD [ "node" , "./server.js" ] \ No newline at end of file diff --git a/lib/fetch-yt-dlp.sh b/lib/fetch-yt-dlp.sh index a25bb84..c8264c1 100755 --- a/lib/fetch-yt-dlp.sh +++ b/lib/fetch-yt-dlp.sh @@ -1,5 +1,6 @@ #!/bin/bash -echo "Downloading latest yt-dlp..." + +echo "Downloading latest yt-dlp build..." rm -f yt-dlp diff --git a/package.json b/package.json index 934d48c..d06993b 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,27 @@ { "name": "youtube-dlp-web", "version": "1.0.0", - "description": "", + "description": "A terrible webUI for yt-dlp, all-in-one solution.", "scripts": { "start": "node --harmony server.js", "dev": "nodemon app.js", "build": "parcel build ./frontend/index.html", "fe": "parcel ./frontend/index.html --open", - "fetch":"./lib/fetch-yt-dlp.sh && mv yt-dlp ./lib" + "fetch": "./lib/fetch-yt-dlp.sh && mv yt-dlp ./lib" }, - "author": "", + "author": "marcobaobao", "license": "ISC", "dependencies": { "@koa/cors": "^3.1.0", - "dotenv": "^10.0.0", "koa": "^2.13.4", "koa-static": "^5.0.0", - "parcel": "^2.0.1", "react": "^17.0.2", "react-bootstrap": "^2.0.2", "react-dom": "^17.0.2", "socket.io": "^4.3.2", "socket.io-client": "^4.3.2" + }, + "devDependencies": { + "parcel": "^2.0.1" } }