-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(#718): Added README and Lerna in scripts * fix(#718): Added platform.js to copy all the .env.example files to .env file * fix(#718): Added script to post-install
- Loading branch information
Showing
3 changed files
with
46 additions
and
4 deletions.
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
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,14 @@ | ||
console.log( 'Copying .env.example to .env for the services: Started' ); | ||
const fs = require( 'fs' ); | ||
const path = require( 'path' ); | ||
const { COPYFILE_EXCL } = fs.constants; | ||
const dir = 'packages'; | ||
fs.readdir( dir, (err, list) => { | ||
const services = list.filter( folder => folder.endsWith( '-service' ) ); | ||
services.forEach(service => { | ||
const pathToEnv = dir + '/' + service + '/'; | ||
fs.copyFile( pathToEnv + '.env.example', pathToEnv + '.env', COPYFILE_EXCL, ( error ) => error ); | ||
path.dirname( service ); | ||
}) | ||
} ); | ||
console.log( 'Copying .env.example to .env for the services: Completed' ); |