diff options
author | 2020-04-16 09:59:36 +0200 | |
---|---|---|
committer | 2020-04-16 09:59:36 +0200 | |
commit | e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5 (patch) | |
tree | fc2ae83bf79ac5e68ca7fa1f0b930ce51f0360d8 /scripts/api | |
parent | Merge branch 'master' of https://github.com/getferdi/recipes (diff) | |
download | ferdium-recipes-e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5.tar.gz ferdium-recipes-e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5.tar.zst ferdium-recipes-e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5.zip |
Switch from yarn to npm
Diffstat (limited to 'scripts/api')
-rw-r--r-- | scripts/api/require-depts.js | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ | |||
1 | /** | ||
2 | * Require the dependencies to be installed or fail otherwise | ||
3 | */ | ||
4 | module.exports = () => { | ||
5 | try { | ||
6 | // Try to include some package to see if it throws an error | ||
7 | require('targz'); | ||
8 | require('fs-extra'); | ||
9 | require('git-url-parse'); | ||
10 | require('image-size'); | ||
11 | require('semver'); | ||
12 | } catch (e) { | ||
13 | console.log(`⚠️ Could not add your recipe: Please make sure to install the dependencies first! | ||
14 | 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. | ||
15 | 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. | ||
16 | If you've already installed the dependencies before, please re-run "npm install" again as the dependencies might have changed. | ||
17 | For more information about installing this script visit https://github.com/getferdi/recipes/blob/master/docs/integration.md#publishing`); | ||
18 | process.exit(0); | ||
19 | } | ||
20 | } \ No newline at end of file | ||