Created
March 9, 2018 16:17
-
-
Save nicooprat/41471b0e9d338dea4a296b4a2d7a57f9 to your computer and use it in GitHub Desktop.
NPM scripts and environment variables
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
.npmrc |
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
FTP_ADDRESS=127.0.0.1 | |
FTP_USERNAME=chuck | |
FTP_PASSWORD=norris |
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
FTP_ADDRESS= | |
FTP_USERNAME= | |
FTP_PASSWORD= |
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
lftp -d -u $user -e “set ssl:verify-certificate no ; mirror — use-pget-n=10 -e -p -R dist dist ; quit” ftp://$host |
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
{ | |
"name": "myproject", | |
"scripts": { | |
"deploy": "user=$npm_config_FTP_USERNAME pwd=$npm_config_FTP_PASSWORD host=$npm_config_FTP_ADDRESS deploy.sh" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment