X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/d3f282a164e44f54678cdb45aad7a09c8a92b89e..refs/heads/rust:/lib/remote.js?ds=sidebyside diff --git a/lib/remote.js b/lib/remote.js index 373958f..ad0a4fc 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -1,16 +1,18 @@ -const { readFile, writeFile } = require('fs/promises'); -const { rmIfExists } = require('./utils'); +import { readFile, writeFile } from 'fs/promises'; +import { rmIfExists } from './utils.js'; + +import GitStrategy from './remotes/git.js'; const internals = { strings: { configurationNotFound: 'Remote configuration not set, consult help for more info.' }, strategies: [ - require('./remotes/git') + GitStrategy ] }; -module.exports = { +export default { async add(remoteConfig, remote) { await writeFile(remoteConfig, remote); @@ -52,4 +54,4 @@ module.exports = { throw new Error(internals.strings.configurationNotFound); } } -} +};