You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`includeParents`| Whether the highest level package directory should be scanned or only the lowest level base directory. |`false`|
59
-
|`knockknock`| Any options to be passed to [KnockKnock](https://github.com/Skelp/node-knockknock). `limit` will always be overridden to `1`.|`null`|
59
+
|`knockknock`| Any options to be passed to [KnockKnock](https://github.com/NotNinja/node-knockknock). `limit` will always be overridden to `1`. |`null`|
60
60
|`path`| The file/directory path from where to derive the base directory to be scanned. Path to module that called PacScan will be used when `null`. |`null`|
61
61
62
62
If you only want to list the packages available to your module/package:
63
63
64
64
```javascript
65
-
constpacscan=require('pacscan')
65
+
constpacscan=require('pacscan');
66
66
67
67
module.exports=function() {
68
68
pacscan()
69
69
.then((packages) => {
70
-
console.log(`${packages.length} packages found`)
70
+
console.log(`${packages.length} packages found`);
71
71
72
72
// ...
73
-
})
74
-
}
73
+
});
74
+
};
75
75
```
76
76
77
77
However, if you're calling PacScan from within a library that is most likely being included in another package as a
@@ -84,45 +84,45 @@ option.
84
84
A synchronous alternative to `pacscan([options])`.
85
85
86
86
```javascript
87
-
constpacscan=require('pacscan')
87
+
constpacscan=require('pacscan');
88
88
89
89
module.exports=function() {
90
-
constpackages=pacscan.sync()
90
+
constpackages=pacscan.sync();
91
91
92
-
console.log(`${packages.length} packages found`)
92
+
console.log(`${packages.length} packages found`);
93
93
94
94
// ...
95
-
}
95
+
};
96
96
```
97
97
98
98
### `pacscan.version`
99
99
100
100
The current version of PacScan.
101
101
102
102
```javascript
103
-
constpacscan=require('pacscan')
103
+
constpacscan=require('pacscan');
104
104
105
-
pacscan.version
106
-
=>"0.1.0"
105
+
pacscan.version;
106
+
=>"0.2.0"
107
107
```
108
108
109
109
## Bugs
110
110
111
111
If you have any problems with PacScan or would like to see changes currently in development you can do so
0 commit comments