lib/sysrev/sysrev.js
function(repoPath) {
    var sys;

    if (fse.existsSync(path.join(repoPath, 'system.js'))) {
      // TODO extract in its own module
      sys = require(repoPath + '/system.js');
      delete require.cache[repoPath + '/system.js'];
    }

    if (!sys) {
      return new Error('missing system.js, is this an nscale repository?');
    }
    if (!sys.name) {
      return new Error('missing name in system.js, correct and try again');
    }
    if (!sys.namespace) {
      return new Error('missing namespace in system.js, correct and try again');
    }
    if (!sys.id) {
      return new Error('missing id in system.js, correct and try again');
    }
  }
function(repoPath) {
    var sys;

    if (fse.existsSync(path.join(repoPath, 'system.js'))) {
      // TODO extract in its own module
      sys = require(repoPath + '/system.js');
      delete require.cache[repoPath + '/system.js'];
    }

    if (!sys) {
      return new Error('missing system.js, is this an nscale repository?');
    }
    if (!sys.name) {
      return new Error('missing name in system.js, correct and try again');
    }
    if (!sys.namespace) {
      return new Error('missing namespace in system.js, correct and try again');
    }
    if (!sys.id) {
      return new Error('missing id in system.js, correct and try again');
    }
  }
function ( repoPath ) { var sys ; if ( fse . existsSync ( path . join ( repoPath , 'system.js' ) ) ) { // TODO extract in its own module sys = require ( repoPath + '/system.js' ) ; delete require . cache [ repoPath + '/system.js' ] ; } if ( ! sys ) { return new Error ( 'missing system.js, is this an nscale repository?' ) ; } if ( ! sys . name ) { return new Error ( 'missing name in system.js, correct and try again' ) ; } if ( ! sys . namespace ) { return new Error ( 'missing namespace in system.js, correct and try again' ) ; } if ( ! sys . id ) { return new Error ( 'missing id in system.js, correct and try again' ) ; } }
checks if a directory is a system (has all the required files and correct
system.json and system.js
checks if a directory is a system ( has all the required files and correct system . json and system . js