From e041e9d4cd7e586a11c23e60ff7123e807b8f24d Mon Sep 17 00:00:00 2001 From: ehmicky Date: Mon, 18 May 2020 20:53:41 +0200 Subject: [PATCH] Rename `onInit` --- demo/encrypt.test.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/encrypt.test.js b/demo/encrypt.test.js index ffdc082..95fe520 100644 --- a/demo/encrypt.test.js +++ b/demo/encrypt.test.js @@ -8,6 +8,6 @@ test('plugin fixture works', async () => { process.env.NETLIFY_ENCRYPT_KEY = 'test'; const initPlugin = netlifyPlugin(); console.log(`running ${initPlugin.name}`); - initPlugin.onInit(); + initPlugin.onPreBuild(); }).not.toThrow(); }); diff --git a/index.js b/index.js index 47512a6..16351dd 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const chalk = require('chalk'); module.exports = function netlify404nomore(conf) { return { name: 'netlify-plugin-encrypted-files', - onInit({ pluginConfig: { branches } }) { + onPreBuild({ pluginConfig: { branches } }) { console.log('decrypting files'); if (branches && branches.includes(process.env.BRANCH)) { pluginDecrypt({});