Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[ux] Require engines.node field

  • Loading branch information...
commit 3cf06f1ab01a3916a43addc11223ab22bb503a5a 1 parent 43a404a
@jfhbrook jfhbrook authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/jitsu/package.js
View
11 lib/jitsu/package.js
@@ -454,6 +454,12 @@ package.properties = function (dir) {
name: 'version',
validator: /[\w|\-|\.]+/,
default: '0.0.0'
+ },
+ {
+ name: 'engines.node',
+ message: 'engines',
+ validator: /[\w|\-|\.]+/,
+ default: process.version.replace(/\.\d+$/, '.x')
}
];
};
@@ -548,6 +554,10 @@ function fillPackage (base, dir, callback) {
if (!(base.scripts && base.scripts.start)) {
missing.push('scripts.start');
}
+
+ if (!(base.engines && base.engines.node)){
+ missing.push('engines.node');
+ }
descriptors = package.properties(dir).filter(function (descriptor) {
if (descriptor.name == 'subdomain') {
@@ -563,6 +573,7 @@ function fillPackage (base, dir, callback) {
// TODO: Something here...
//
jitsu.log.error('Unable to add properties to package description.');
+ console.error(err);
return callback(err);
}
Please sign in to comment.
Something went wrong with that request. Please try again.