aboutsummaryrefslogtreecommitdiff
path: root/front/odiparpack/internals/scripts/npmcheckversion.js
diff options
context:
space:
mode:
authorgabrhr <73925454+gabrhr@users.noreply.github.com>2022-04-20 10:19:29 -0500
committergabrhr <73925454+gabrhr@users.noreply.github.com>2022-04-20 10:19:29 -0500
commite13e630cd6e4fc0b1ff92098a28a770794c7bb9a (patch)
treee68ad2f947d1b3ec454529b35f37ca2f223e5431 /front/odiparpack/internals/scripts/npmcheckversion.js
parent457816ac1129fcc6019d2fc795b6693ee6776d59 (diff)
Añadir plantilla
Base para front
Diffstat (limited to 'front/odiparpack/internals/scripts/npmcheckversion.js')
-rw-r--r--front/odiparpack/internals/scripts/npmcheckversion.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/front/odiparpack/internals/scripts/npmcheckversion.js b/front/odiparpack/internals/scripts/npmcheckversion.js
new file mode 100644
index 0000000..e3ecd0c
--- /dev/null
+++ b/front/odiparpack/internals/scripts/npmcheckversion.js
@@ -0,0 +1,8 @@
+const exec = require('child_process').exec;
+exec('npm -v', function(err, stdout, stderr) {
+ if (err) throw err;
+ if (parseFloat(stdout) < 3) {
+ throw new Error('[ERROR: React Boilerplate] You need npm version @>=3');
+ process.exit(1);
+ }
+});