From e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Thu, 16 Apr 2020 09:59:36 +0200 Subject: Switch from yarn to npm --- scripts/api/require-depts.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/api/require-depts.js (limited to 'scripts/api/require-depts.js') diff --git a/scripts/api/require-depts.js b/scripts/api/require-depts.js new file mode 100644 index 0000000..c9c8814 --- /dev/null +++ b/scripts/api/require-depts.js @@ -0,0 +1,20 @@ +/** + * Require the dependencies to be installed or fail otherwise + */ +module.exports = () => { + try { + // Try to include some package to see if it throws an error + require('targz'); + require('fs-extra'); + require('git-url-parse'); + require('image-size'); + require('semver'); + } catch (e) { + console.log(`⚠️ Could not add your recipe: Please make sure to install the dependencies first! +It looks like you havn't run "npm install" yet. Please run that command in order to install all the dependencies required to run the scripts. +If you get an error similar to "command not found: npm" while installing the dependencies, make sure to install npm first using the guide at https://www.npmjs.com/get-npm. +If you've already installed the dependencies before, please re-run "npm install" again as the dependencies might have changed. +For more information about installing this script visit https://github.com/getferdi/recipes/blob/master/docs/integration.md#publishing`); + process.exit(0); + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2