diff --git a/lib/ncp.js b/lib/ncp.js index b5c4f93..0a08234 100644 --- a/lib/ncp.js +++ b/lib/ncp.js @@ -1,7 +1,8 @@ var fs = require('fs'), - path = require('path'); - -const modern = /^v0\.1\d\.\d+/.test(process.version); + path = require('path'), + semver = require('semver'); + +const modern = semver.gte(process.version, 'v0.10.0'); module.exports = ncp; ncp.ncp = ncp; diff --git a/package.json b/package.json index 325a552..f68220c 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,9 @@ "bin": { "ncp": "./bin/ncp" }, + "dependencies": { + "semver": "4.2.0" + }, "devDependencies" : { "mocha": "1.15.x", "rimraf" : "1.0.x",