Skip to content

Commit

Permalink
feat: Merge pull request #98 from pelias/check_node_version
Browse files Browse the repository at this point in the history
Check node version
  • Loading branch information
orangejulius authored Jun 13, 2016
2 parents b62caa0 + 1a3850c commit ab1f26d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions import.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ var peliasDbclient = require( 'pelias-dbclient' );
var peliasDocGenerators = require('./src/peliasDocGenerators');
var wofRecordStream = require('./src/wofRecordStream');
var hierarchyFinder = require('./src/hierarchyFinder');
var checker = require('node-version-checker').default;

function hasDataDirectory() {
return peliasConfig.imports.hasOwnProperty('whosonfirst') &&
peliasConfig.imports.whosonfirst.hasOwnProperty('datapath');
}

checker();

if (!hasDataDirectory()) {
console.error('Could not find whosonfirst data directory in configuration');
process.exit( 2 );
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pelias-whosonfirst",
"engines": {
"node": "0.12"
"node": ">=0.12"
},
"description": "Importer for Who's on First",
"main": "index.js",
Expand Down Expand Up @@ -31,6 +31,7 @@
"fs-extra": "^0.30.0",
"iso3166-1": "^0.2.5",
"lodash": "^4.5.1",
"node-version-checker": "^2.0.0",
"pelias-config": "^1.0.3",
"pelias-dbclient": "^1.0.1",
"pelias-logger": "0.0.8",
Expand Down

0 comments on commit ab1f26d

Please sign in to comment.