-
-
Save Uvacoder/5220a8553703b44aa87b92b05b4e47fb to your computer and use it in GitHub Desktop.
Automatically install deps for any serverless project found
This file contains hidden or 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
| const path = require('path') | |
| const globby = require('globby') | |
| const execSync = require('child_process').execSync | |
| globby(['*/serverless.yml']).then(paths => { | |
| // Now run npm install | |
| const command = `npm install` | |
| paths.forEach((p) => { | |
| var t = path.join(__dirname, p) | |
| execSync(command, { | |
| cwd: path.dirname(t), | |
| stdio: [0, 1, 2] | |
| }) | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment