source: trip-planner-front/node_modules/node-gyp/lib/list.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 641 bytes
Line 
1'use strict'
2
3const fs = require('graceful-fs')
4const log = require('npmlog')
5
6function list (gyp, args, callback) {
7 var devDir = gyp.devDir
8 log.verbose('list', 'using node-gyp dir:', devDir)
9
10 fs.readdir(devDir, onreaddir)
11
12 function onreaddir (err, versions) {
13 if (err && err.code !== 'ENOENT') {
14 return callback(err)
15 }
16
17 if (Array.isArray(versions)) {
18 versions = versions.filter(function (v) { return v !== 'current' })
19 } else {
20 versions = []
21 }
22 callback(null, versions)
23 }
24}
25
26module.exports = list
27module.exports.usage = 'Prints a listing of the currently installed node development files'
Note: See TracBrowser for help on using the repository browser.