Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added node version check and updated the licence to a correct string #42

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions bin/adapt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#!/usr/bin/env node
var chalk = require("chalk");
var fs = require('fs');
var path = require('path');
var semver = require('semver');
var curVer = process.versions.node;
var pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')));
var versRange = pkg.engines.node;
var errString = 'adapt-cli has been tested on node versions between '+pkg.engines.node+', you are curently using ' + curVer + ' - errors may occur.';
if(semver.satisfies(curVer, pkg.engines.node) === false){
console.warn(chalk.red(errString));
}
var cli = require('../lib/cli');
cli.withOptions().withPackage().execute();
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
},
"author": "",
"repository": "http://github.com/adaptlearning/adapt-cli",
"license": "GPLv3",
"license": "GPL-3.0",
"bin": {
"adapt": "./bin/adapt"
}
},
"engines" : { "node" : "0.10.33 - 0.10.40" }
}