-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(packaging): add
npm run pui-update
command
[Finishes #96481372]
- Loading branch information
1 parent
2ad8df1
commit 26352e2
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /usr/bin/env node | ||
|
||
var fs = require('fs'); | ||
var exec = require('child_process').execSync; | ||
|
||
var packageJson = JSON.parse(fs.readFileSync('./package.json')); | ||
var allDependencies = Array.prototype.concat.call( | ||
Object.keys(packageJson.dependencies), | ||
Object.keys(packageJson.devDependencies) | ||
); | ||
var puiDependencies = allDependencies.filter(function(dependency) { | ||
return (dependency.match(/pui-css-/) || dependency.match(/pui-react-/)); | ||
}); | ||
|
||
puiDependencies.forEach(function(dependency) { | ||
console.log('Updating ' + dependency + '...'); | ||
exec('npm update ' + dependency); | ||
}); | ||
|
||
console.log('Done!'); |