From 35677db1f165dddbdbbc35f59d94190e889cacbc Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Sun, 11 Jul 2021 15:54:53 +0200 Subject: [PATCH] chore: add netlify configuration --- .netlify/netlify-plugin-pnpm/index.js | 10 ++++++++++ .netlify/netlify-plugin-pnpm/manifest.yml | 2 ++ .prettierignore | 1 + netlify.toml | 7 +++++++ 4 files changed, 20 insertions(+) create mode 100644 .netlify/netlify-plugin-pnpm/index.js create mode 100644 .netlify/netlify-plugin-pnpm/manifest.yml create mode 100644 netlify.toml diff --git a/.netlify/netlify-plugin-pnpm/index.js b/.netlify/netlify-plugin-pnpm/index.js new file mode 100644 index 000000000000..90717145d6fd --- /dev/null +++ b/.netlify/netlify-plugin-pnpm/index.js @@ -0,0 +1,10 @@ +module.exports = { + onPreBuild: async ({ utils: { build, run } }) => { + try { + await run.command("npm install -g pnpm") + await run.command("pnpm install") + } catch (error) { + return build.failBuild(error) + } + } +} diff --git a/.netlify/netlify-plugin-pnpm/manifest.yml b/.netlify/netlify-plugin-pnpm/manifest.yml new file mode 100644 index 000000000000..40042b0c2a96 --- /dev/null +++ b/.netlify/netlify-plugin-pnpm/manifest.yml @@ -0,0 +1,2 @@ +name: netlify-plugin-pnpm +inputs: [] diff --git a/.prettierignore b/.prettierignore index c1d6aeb5abb7..631322664cc3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -23,3 +23,4 @@ docker-examples/ build/ .vscode/ .github/ +.netlify/ diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000000..8ed4f77ed0b5 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,7 @@ + +[build] + command = "pnpm run build" + publish = "dist" + +[[plugins]] + package = "/.netlify/netlify-plugin-pnpm"