From 86b84773ee10cd2fa6d2dc59141181f462e8e6c9 Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 29 Jan 2020 19:59:37 +0300 Subject: [PATCH] make it work again! --- .eslintignore | 1 + .prettierignore | 1 + nuxt.config.js | 9 ++- package.json | 2 + pages/index.vue | 15 ++-- plugins/phase2.js | 10 +++ server/controllers/contributions.js | 96 +++++++++++++------------ server/index.js | 21 +++--- server/snark_files/current.params | Bin 0 -> 295132 bytes static/_nuxt/lib/phase2/phase2_bg.wasm | Bin 0 -> 203731 bytes yarn.lock | 64 ++++++++++++++++- 11 files changed, 150 insertions(+), 69 deletions(-) create mode 100644 .eslintignore create mode 100644 .prettierignore create mode 100644 plugins/phase2.js create mode 100644 server/snark_files/current.params create mode 100644 static/_nuxt/lib/phase2/phase2_bg.wasm diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..cdecab1 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +lib/* diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..cdecab1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +lib/* diff --git a/nuxt.config.js b/nuxt.config.js index 6452dd0..139b2e8 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -72,7 +72,7 @@ module.exports = { /* ** Plugins to load before mounting the App */ - plugins: [], + plugins: [{ src: '~plugins/phase2', ssr: false }], /* ** Nuxt.js dev-modules */ @@ -107,7 +107,12 @@ module.exports = { /* ** You can extend webpack config here */ - extend(config, ctx) {}, + extend(config, ctx) { + config.module.rules.push({ + test: /\.js$/, + loader: require.resolve('@open-wc/webpack-import-meta-loader') + }) + }, html: { minify: { collapseWhitespace: true, // as @dario30186 mentioned diff --git a/package.json b/package.json index 5d04725..bb98527 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "@nuxtjs/axios": "^5.3.6", + "@open-wc/webpack-import-meta-loader": "^0.4.1", "async-mutex": "^0.1.4", "aws-sdk": "^2.610.0", "body-parser": "^1.19.0", @@ -23,6 +24,7 @@ "express-fileupload": "^1.1.6", "express-session": "^1.17.0", "morgan": "^1.9.1", + "multer": "^1.4.2", "mysql2": "^2.1.0", "nuxt": "^2.0.0", "nuxt-buefy": "^0.3.2", diff --git a/pages/index.vue b/pages/index.vue index 1858ae6..c692791 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2,18 +2,21 @@
Hello, Anonymous
- Make the contribution Sign In
+ {{ status }}