Home

Awesome

<img src="https://raw.githubusercontent.com/bohoffi/ngx-deploy-ftp/develop/assets/logo.svg" width="150">

ngx-deploy-ftp πŸš€ πŸ“€

Deploy Angular apps to an FTP remote using the Angular CLI

npm version Apache 2.0 PR-builder

⚠️Advisory ⚠️

Prefer alternative transfer protocols like HTTPS or SFTP (SSH). Use this library when you have no choice and need to use FTP. Try to use FTPS (FTP over TLS) whenever possible, FTP alone does not provide any security.

⚠️ Prerequisites

This package has the following prerequisites:

πŸ“• Usage

  1. Add ngx-deploy-ftp to your workspace (this command either requires a project passed using the --project <PROJECT_NAME> or the first application project present in your angular.json)

    ng add ngx-deploy-ftp
    
  2. Deploy your app

    ng deploy <OPTIONS>
    

πŸ“– Options

--base-href <a name="base-href"></a>

Specifies the base URL for the application being built. Same as ng build --base-href=/XXX/

--configuration <a name="configuration"></a>

A named build target, as specified in the configurations section of angular.json. Each named target is accompanied by a configuration of option defaults for that target. Same as ng build --configuration=XXX. This command has no effect if the option --no-build option is active.

--no-build <a name="no-build"></a>

Skip build process during deployment. This can be used when you are sure that you haven't changed anything and want to deploy with the latest artifact. This command causes the --configuration setting to have no effect.

--host <a name="host"></a>

Specifies the target FTP host to use for deployment.

--port <a name="port"></a>

Specifies the FTPs port to use for deployment.

--tls <a name="tls"></a>

Indicates to connect to the FTP server using TLS or not. (Some client may require to turn TLS off)

--username <a name="username"></a>

Specifies the username to login on the FTP host.

--password <a name="password"></a>

Specifies the password to login on the FTP host.

--remote-dir <a name="remote-dir"></a>

Specifies the remotes directory path to deploy the app to.

--clean-remote <a name="clean-remote"></a>

Indicates if the remotes working directory should be cleaned before deployment.

--verbose <a name="verbose"></a>

Will increase the FTP clients log output. (using --dry-run will set this to true by default)

--dry-run <a name="dry-run"></a>

For testing: Run through without making any changes. Will connect to the FTP, change the working directory (if passed) and disconnect.

Credits <a name="credits"></a>

Props to following repositorys for inspiration and deeper understanding: