Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-12 14:17:28 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-13 17:19:05 +0300
commit7b2198f24b873f1fd7869c0e87add794fd5e4ebe (patch)
tree8840b086e1097bfe21fcb05fcca90d48ef32713e /webpack.js
parentdf9f2eb4339811156eb5be390847f71f597d43df (diff)
Move packaging to webpack and update/clean all configs
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'webpack.js')
-rw-r--r--webpack.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/webpack.js b/webpack.js
new file mode 100644
index 0000000..0bd71e1
--- /dev/null
+++ b/webpack.js
@@ -0,0 +1,13 @@
+const webpackConfig = require('@nextcloud/webpack-vue-config')
+const path = require('path')
+const unzipper = require('unzipper')
+const request = require('request')
+
+// Fetching pdf.js build release
+const PDFJSversion = '2.4.456'
+request(`https://github.com/mozilla/pdf.js/releases/download/v${PDFJSversion}/pdfjs-${PDFJSversion}-dist.zip`)
+ .pipe(unzipper.Extract({ path: path.resolve(__dirname, 'js', 'pdfjs') }))
+console.info('Downloading pdf.js', PDFJSversion, '\n')
+
+webpackConfig.entry.workersrc = path.resolve(path.join('src', 'workersrc.js'))
+module.exports = webpackConfig