@unanim/deploy-preview
v0.0.1
Published
A package to deploy our project preview via FTP
Downloads
2
Readme
Nuxt Preview Deployment Tool
This package provides a convenient way to deploy project preview as SPAs to a specified FTP server. It automates the process of uploading project files to the server, including handling JSON files and configuring .htaccess
files.
Installation
To install the package, using yarn:
yarn add -D @unanim/preview-deploy
Usage
Ensure you have a .env.preview file in your project directory, containing the necessary environment variables:
# .env.preview
NUXT_APP_BASE_URL=/project_id/
NUXT_APP_PREVIEW=true
FTP_SERVER=
FTP_USER=
FTP_PASSWORD=
FTP_PORT=
FTP_BASE_DIR=
Add a script to your package.json file to execute the deployment:
// package.json
{
"scripts": {
...
"deploy:preview": "deploy-preview",
...
}
}
Run the script after generating the preview:
yarn generate:preview
yarn deploy:preview
Follow the prompts to confirm the deployment and upload JSON files if needed.
© Made with love and lots of coffee by Unanim.studio