Created
March 9, 2016 17:02
-
-
Save tmcw/82b2b5c65ac67e606b70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pkg = require('./package.json'); | |
var exec = require('child_process').exec; | |
var fs = require('fs'); | |
var path = require('path'); | |
var packages = fs.readdirSync('packages'); | |
packages.forEach(function(dir) { | |
var p = path.join('./packages/', dir, '/package.json'); | |
var pkg = JSON.parse(fs.readFileSync(p)); | |
pkg.version = '3.0.0'; | |
for (var dep in pkg.dependencies) { | |
if (dep.match(/^turf/)) { | |
pkg.dependencies[dep] = '^3.0.0'; | |
} | |
} | |
for (var devDep in pkg.devDependencies) { | |
if (devDep.match(/^turf/)) { | |
pkg.devDependencies[devDep] = '^3.0.0'; | |
} | |
} | |
fs.writeFileSync(p, | |
JSON.stringify(pkg, null, 2)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment