Created
December 14, 2015 23:05
-
-
Save madole/53a5f0a7ceb51cdad310 to your computer and use it in GitHub Desktop.
List Atom Packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
var atomPackagesPath = path.join(process.env.HOME, '.atom/packages'); | |
fs.readdirSync(atomPackagesPath).forEach(function(current) { | |
var packagePath = path.join(atomPackagesPath, current); | |
if (fs.statSync(packagePath).isDirectory()) { | |
var p = require(packagePath + '/package.json'); | |
process.stdout.write('[' + p.name + '](' + p.repository.url + ')\n'); | |
process.stdout.write(p.description + '\n\n'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Borrowed from someone else, but gist-ing so I can find it later