{"id":23758445,"url":"https://github.com/blaumeise20/code-combine","last_synced_at":"2026-03-17T16:30:18.474Z","repository":{"id":57202099,"uuid":"336039349","full_name":"blaumeise20/code-combine","owner":"blaumeise20","description":"Tool to combine JavaScript files","archived":false,"fork":false,"pushed_at":"2021-02-04T18:02:24.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T04:04:11.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blaumeise20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-04T18:00:34.000Z","updated_at":"2021-02-04T18:00:43.000Z","dependencies_parsed_at":"2022-09-17T12:01:06.901Z","dependency_job_id":null,"html_url":"https://github.com/blaumeise20/code-combine","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaumeise20%2Fcode-combine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaumeise20%2Fcode-combine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaumeise20%2Fcode-combine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaumeise20%2Fcode-combine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blaumeise20","download_url":"https://codeload.github.com/blaumeise20/code-combine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927842,"owners_count":19719836,"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-31T19:54:34.276Z","updated_at":"2026-03-17T16:30:18.378Z","avatar_url":"https://github.com/blaumeise20.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code-combine\n\nThis is a small tool like webpack which combines JavaScript files into one single.\n\n## Installation\n\nInstall this package globally:\n```\nnpm install -g code-combine\n```\nOr if you only need it for one project, you can also install it as a dev-dependency:\n```\nnpm install --save-dev code-combine\n```\n\n## Usage\n\nUsing it is really simple. Go to the directory with the config or provide a path to a configuration.\n```\ncombine [optional path to config]\n```\n\n## Config\n\nProfide a configuration in combine.config.js like this:\n\n```js\nmodule.exports = {\n\tstartFile: \"./src/index.js\", // entry file\n    distFile: \"./dist/script.js\", // output file\n\tisDevelopment: true, // if it should watch file changes\n\tasync deploy() {\n        // do something when compiling is done\n        // you can access other properties of config here\n        // for example this.distFile\n\n        // call this.log(\"message\") for debug output\n\t},\n\tasync stop() {\n        // do something when the process exits\n        // you can also access other properties of config here\n\n        // this.log is also available here\n\t}\n};\n```\nThe deploy and stop methods are really useful for uploading somthing onto a server. Here is an example with ssh2-sftp-client:\n```js\nconst Client = require(\"ssh2-sftp-client\");\nconst { join } = require(\"path\");\n\nconst sftp = new Client();\nconst connected = sftp.connect(require(\"./sftp\"));\nlet isConnected = false;\n\nmodule.exports = {\n\tstartFile: \"./src/index.js\",\n\tdistFileAbs: join(__dirname, \"./dist/script.js\"),\n\tdistFile: \"./dist/script.js\",\n\tisDevelopment: true,\n\tasync deploy() {\n\t\tif (!isConnected) {\n\t\t\ttry {\n\t\t\t\tawait connected;\n\t\t\t\tisConnected = true;\n\t\t\t}\n\t\t\tcatch (err) { throw err; }\n\t\t}\n\n\t\tawait sftp.fastPut(this.distFileAbs, \"/path/to/your/server/script.js\");\n\t},\n\tasync stop() {\n\t\tthis.log(\"Exiting\");\n\t\tif (isConnected) await sftp.end();\n\t\tprocess.exit(0);\n\t}\n};\n```\nRead the documentation of the module for more info about connecting to a server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaumeise20%2Fcode-combine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaumeise20%2Fcode-combine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaumeise20%2Fcode-combine/lists"}