{"id":23490086,"url":"https://github.com/dlerm/ssh-watch-upload-webpack-plugin","last_synced_at":"2025-04-14T15:41:40.670Z","repository":{"id":57368904,"uuid":"306817119","full_name":"dlerm/ssh-watch-upload-webpack-plugin","owner":"dlerm","description":"🔌 A Webpack plugin that watches your changed files and uploads the newly compiled assets to an external server via SSH","archived":false,"fork":false,"pushed_at":"2020-10-24T06:18:26.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T14:08:22.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlerm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-24T06:01:59.000Z","updated_at":"2020-10-24T06:21:33.000Z","dependencies_parsed_at":"2022-09-12T03:01:40.410Z","dependency_job_id":null,"html_url":"https://github.com/dlerm/ssh-watch-upload-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fssh-watch-upload-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fssh-watch-upload-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fssh-watch-upload-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlerm%2Fssh-watch-upload-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlerm","download_url":"https://codeload.github.com/dlerm/ssh-watch-upload-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248907927,"owners_count":21181433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T00:18:16.740Z","updated_at":"2025-04-14T15:41:40.647Z","avatar_url":"https://github.com/dlerm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSH Watch Upload Webpack Plugin\n\nA plugin that watches your files and uploads the newly compiled assets to an external server via SSH\n\n## Install\n\n```bash\nnpm i --save-dev ssh-watch-upload-webpack-plugin\n```\n\n```bash\nyarn add --dev ssh-watch-upload-webpack-plugin\n```\n\n## Usage\n\nThe plugin will hook into Webpack and upload emitted assets to a destination server using a basic SSH connection. Add the plugin to your Webpack config like this:\n\n**webpack.config.js**\n\n```js\nconst SSHWatchUploadWebpackPlugin = require('ssh-watch-upload-webpack-plugin');\n\nmodule.exports = {\n  entry: ...,\n  output: ...,\n  plugins: [\n    ...,\n    new SSHWatchUploadWebpackPlugin({\n      mode: ...,\n      host: ...,\n      port: ...,\n      username: ...,\n      passphrase: ...,\n      privateKey: ...,\n      uploadPath: ...,\n      domain: ...,\n      openDomain: ...,\n    }),\n  ],\n};\n```\n\nOnce configured, you can run Webpack in watch mode to activate the plugin:\n\n```bash\nnpx webpack -w\n```\n\n```bash\nyarn webpack -w\n```\n\nAlternatively, you can enable watch mode via the Webpack config:\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  entry: ...,\n  output: ...,\n  watch: true, // Enable watch mode\n  plugins: [\n    ...,\n    new SSHWatchUploadWebpackPlugin({...}),\n  ],\n};\n```\n\nWhen activated you will see the terminal generating logs:\n\n```bash\n[SSHWatchUpload] [22:01:48] Connected to server\n[SSHWatchUpload] [22:01:49] Watching for changes...\n```\n\nAfter editing and saving a file while in watch mode you will see upload confirmation logs:\n\n```bash\n[SSHWatchUpload] [22:30:57] Uploading main.js...\n[SSHWatchUpload] [22:30:57] Upload complete: main.js\n```\n\n## Options\n\nYou can pass a hash of configuration options to `ssh-watch-upload-webpack-plugin`.\nAllowed values are as follows:\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|**mode**|String|''|Webpack build mode (production \\| development)|\n|**host**|String|''|External server SSH domain|\n|**port**|Number|null|Port used to connect to the external server|\n|**username**|String|''|Username used to connect to the external server|\n|**passphrase**|String|''|Passphrase used to connect to the external server|\n|**privateKey**|String|''|File path of the SHH private key file|\n|**uploadPath**|String|''|Path on the external server where files should be uploaded|\n|**domain**|String|''|Public facing domain of the server|\n|**openDomain**|Boolean|false|Flag to enable the browser to automatically open the domain once connected|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlerm%2Fssh-watch-upload-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlerm%2Fssh-watch-upload-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlerm%2Fssh-watch-upload-webpack-plugin/lists"}