Closed jbhannah closed 2 years ago
Can you resolve the conflicts here and add some specs?
Will-do. I did add a spec for the inverse case of getMissingPackages
, any other in particular you're looking for?
Any status updates on this? This feature alone will convert me from sync-settings
to this package.
Scratch the urgency. I just dropped this little script in my ~/bin
directory and it seems to do the job just fine with this package installed.
ATOM-ORPHANED
#!/usr/bin/node
const fs = require('fs');
const { HOME } = process.env;
const haystack = fs.readFileSync(`${HOME}/.dotfiles/packages.cson`, 'utf8');
const hs = haystack.match(/"(.+)"/g).map(p => p.replace(/"/g, ''));
const needle = fs.readdirSync(`${HOME}/.atom/packages`)
.filter(p => p !== '.wlck' && haystack.indexOf(p) === -1)
.join('\n');
console.log(needle);
After running a package-sync:sync
, I just do apm rm $(ATOM-ORPHANED)
and all orphans are removed 👍
My packages.cson
file is symlinked using Dotbot (if you're wondering about the weird location)
Is there anything holding this up from being merged? I would love to see this feature included.
@jbhannah
Any progress for this feature? I would love to have this feature in package-sync.
@czchen I haven't heard back from @lee-dohm if there are any other specs that he would like added before this can be merged in.
@lee-dohm @jbhannah is there any chance, this PR gets merged?
For the ones interested in a maintained alternative, have a look at https://atom.io/packages/manage-packages
Adds a setting that, when enabled, uninstalls packages missing from
packages.cson
on sync. Fixes #11.