From 26f287ef4fd60554cb795a0339c8741a33e97222 Mon Sep 17 00:00:00 2001 From: teddit Date: Fri, 25 Dec 2020 22:14:24 +0100 Subject: [PATCH] rename dist to static, fixes #8 --- app.js | 2 +- inc/downloadAndSave.js | 8 ++++---- {dist => static}/css/fontello.css | 0 {dist => static}/css/sprite.png | Bin {dist => static}/css/styles.css | 0 {dist => static}/favicon.png | Bin {dist => static}/fonts/LICENSE.txt | 0 {dist => static}/fonts/fontello.eot | Bin {dist => static}/fonts/fontello.svg | 0 {dist => static}/fonts/fontello.ttf | Bin {dist => static}/fonts/fontello.woff | Bin {dist => static}/fonts/fontello.woff2 | Bin {dist => static}/kopimi.gif | Bin {dist => static}/pics/.gitignore | 0 {dist => static}/pics/flairs/.gitignore | 0 {dist => static}/pics/thumbs/.gitignore | 0 {dist => static}/robots.txt | 0 {dist => static}/vids/.gitignore | 0 18 files changed, 5 insertions(+), 5 deletions(-) rename {dist => static}/css/fontello.css (100%) rename {dist => static}/css/sprite.png (100%) rename {dist => static}/css/styles.css (100%) rename {dist => static}/favicon.png (100%) rename {dist => static}/fonts/LICENSE.txt (100%) rename {dist => static}/fonts/fontello.eot (100%) rename {dist => static}/fonts/fontello.svg (100%) rename {dist => static}/fonts/fontello.ttf (100%) rename {dist => static}/fonts/fontello.woff (100%) rename {dist => static}/fonts/fontello.woff2 (100%) rename {dist => static}/kopimi.gif (100%) rename {dist => static}/pics/.gitignore (100%) rename {dist => static}/pics/flairs/.gitignore (100%) rename {dist => static}/pics/thumbs/.gitignore (100%) rename {dist => static}/robots.txt (100%) rename {dist => static}/vids/.gitignore (100%) diff --git a/app.js b/app.js index bd7dd5b..848fbdd 100644 --- a/app.js +++ b/app.js @@ -125,7 +125,7 @@ if(config.trust_proxy) { app.use(bodyParser.urlencoded({ extended: true })) app.use(bodyParser.json()) -app.use(express.static(`${__dirname}/dist`)) +app.use(express.static(`${__dirname}/static`)) app.set('views', './views') app.set('view engine', 'pug') diff --git a/inc/downloadAndSave.js b/inc/downloadAndSave.js index d0224db..0582d8e 100644 --- a/inc/downloadAndSave.js +++ b/inc/downloadAndSave.js @@ -57,8 +57,8 @@ module.exports = function(tools) { resolve('') } else { let filename = `${temp_url.pathname.substr(1).split('/')[0]}.${file_ext}` - let path = `./dist/vids/${dir}${filename}` - let temp_path = `./dist/vids/${dir}temp_${filename}` + let path = `./static/vids/${dir}${filename}` + let temp_path = `./static/vids/${dir}temp_${filename}` if(!fs.existsSync(path)) { const download = await downloadFile(cleanUrl(url)) if(download.success === true) { @@ -73,7 +73,7 @@ module.exports = function(tools) { } const download_audio = await downloadFile(cleanUrl(audio_url)) if(download_audio.success === true) { - let audio_path = `./dist/vids/${dir}temp_audio_${filename}` + let audio_path = `./static/vids/${dir}temp_audio_${filename}` const write_audio = await writeToDisk(download_audio.data, audio_path) if(write_audio.success === true) { let processVideo = spawn('ffmpeg', ['-y', '-i', temp_path, '-i', audio_path, '-c', 'copy', path]) @@ -141,7 +141,7 @@ module.exports = function(tools) { filename = `${file_prefix}w:${temp_url.searchParams.get('width')}_${temp_url.pathname.split('/').slice(-1)}` } } - path = `./dist/pics/${dir}${filename}` + path = `./static/pics/${dir}${filename}` if(!fs.existsSync(path)) { const download = await downloadFile(cleanUrl(url)) if(download.success === true) { diff --git a/dist/css/fontello.css b/static/css/fontello.css similarity index 100% rename from dist/css/fontello.css rename to static/css/fontello.css diff --git a/dist/css/sprite.png b/static/css/sprite.png similarity index 100% rename from dist/css/sprite.png rename to static/css/sprite.png diff --git a/dist/css/styles.css b/static/css/styles.css similarity index 100% rename from dist/css/styles.css rename to static/css/styles.css diff --git a/dist/favicon.png b/static/favicon.png similarity index 100% rename from dist/favicon.png rename to static/favicon.png diff --git a/dist/fonts/LICENSE.txt b/static/fonts/LICENSE.txt similarity index 100% rename from dist/fonts/LICENSE.txt rename to static/fonts/LICENSE.txt diff --git a/dist/fonts/fontello.eot b/static/fonts/fontello.eot similarity index 100% rename from dist/fonts/fontello.eot rename to static/fonts/fontello.eot diff --git a/dist/fonts/fontello.svg b/static/fonts/fontello.svg similarity index 100% rename from dist/fonts/fontello.svg rename to static/fonts/fontello.svg diff --git a/dist/fonts/fontello.ttf b/static/fonts/fontello.ttf similarity index 100% rename from dist/fonts/fontello.ttf rename to static/fonts/fontello.ttf diff --git a/dist/fonts/fontello.woff b/static/fonts/fontello.woff similarity index 100% rename from dist/fonts/fontello.woff rename to static/fonts/fontello.woff diff --git a/dist/fonts/fontello.woff2 b/static/fonts/fontello.woff2 similarity index 100% rename from dist/fonts/fontello.woff2 rename to static/fonts/fontello.woff2 diff --git a/dist/kopimi.gif b/static/kopimi.gif similarity index 100% rename from dist/kopimi.gif rename to static/kopimi.gif diff --git a/dist/pics/.gitignore b/static/pics/.gitignore similarity index 100% rename from dist/pics/.gitignore rename to static/pics/.gitignore diff --git a/dist/pics/flairs/.gitignore b/static/pics/flairs/.gitignore similarity index 100% rename from dist/pics/flairs/.gitignore rename to static/pics/flairs/.gitignore diff --git a/dist/pics/thumbs/.gitignore b/static/pics/thumbs/.gitignore similarity index 100% rename from dist/pics/thumbs/.gitignore rename to static/pics/thumbs/.gitignore diff --git a/dist/robots.txt b/static/robots.txt similarity index 100% rename from dist/robots.txt rename to static/robots.txt diff --git a/dist/vids/.gitignore b/static/vids/.gitignore similarity index 100% rename from dist/vids/.gitignore rename to static/vids/.gitignore