fileup
is a npm package that simplifies the auto-update process by updating individual files with remote versions based on file-specific version comments.
Install the package using pip:
npm install jsfileup
- Set the remote file URL in your script.
- Call the
update
function from thefileup
package.
//0.0.1
import update from './fileUpdater.js';
import URLBuilder from './urlBuilder.js';
// Example URL creation
const REMOTE_FILE_URL = URLBuilder.github("mvishok", "tests", "main", "example.js");
async function main() {
// Your main script logic here
console.log("Running the main script...");
}
(async () => {
await update(REMOTE_FILE_URL);
main();
})();
A Python version of this package is available here