Package Exports
- sol-digger
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sol-digger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
sol-digger
Recursively traverse a directory to extract all Solidity files
#Install
npm install sol-digger#API
let digger = require ('sol-digger');digger is a function that takes 2 arguments: First is directory - the starting point for recursive search of solidity files and second is ignores - an array of names to ignore while treversing. These names could be either file names or sub-directory names.
If you wish to pass only a single file or directory to ignore, you can simply pass in a string instead of array to digger ().
#Usage
'use strict';
let digger = require ('sol-digger');
digger ('/relative/or/absolute/path', ['node_modules', 'contracts'])
.forEach ( (filename) => {
console.log (filename);
});
digger ('./foo', 'bar').forEach ( (filename) => {
console.log (filename);
});