aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/api/require-depts.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2020-04-16 09:59:36 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2020-04-16 09:59:36 +0200
commite2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5 (patch)
treefc2ae83bf79ac5e68ca7fa1f0b930ce51f0360d8 /scripts/api/require-depts.js
parentMerge branch 'master' of https://github.com/getferdi/recipes (diff)
downloadferdium-recipes-e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5.tar.gz
ferdium-recipes-e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5.tar.zst
ferdium-recipes-e2c0ef8f9f128b0ae0d96f14cff0f64226aed6d5.zip
Switch from yarn to npm
Diffstat (limited to 'scripts/api/require-depts.js')
-rw-r--r--scripts/api/require-depts.js20
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 */
4module.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!
14It 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.
15If 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.
16If you've already installed the dependencies before, please re-run "npm install" again as the dependencies might have changed.
17For 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