New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

davids

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

davids - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

.jshintrc

37

davicore.js

@@ -1,1 +0,36 @@

module.exports = 'Hello world.';
var child_process = require('child_process');
var fs = require('fs');
var path = require('path');
var cl = require('ciel');
var clog = console.log;
module.exports = function(){
var initialD = process.cwd();
fs.readdirSync(initialD).map(nextName => {
var resolvedPath = path.resolve(initialD, nextName);
if( fs.statSync(resolvedPath).isDirectory() ){
return resolvedPath;
} else return null;
}).filter(nextPath => nextPath !== null).sort().forEach(nextFolderPath => {
if(!(
fs.readdirSync(nextFolderPath).includes('package.json')
)) return cl.skip('No package.json in ' + nextFolderPath);
cl.folder(nextFolderPath);
try {
clog( child_process.execSync('david', {
cwd: nextFolderPath,
encoding: 'utf8'
}));
} catch(err) {
if( err.status !== 1 ){
cl.fail( require('util').inspect(err, {
depth: null,
colors: true
}));
process.exit(1);
}
clog(err.stdout);
}
});
};

3

davids.js
#!/usr/bin/env node
var davids = require('./davicore.js');
var clog = console.log;
console.log( davids );
davids();

@@ -6,4 +6,4 @@ {

"main": "davicore.js",
"version": "0.0.1",
"description": "Runs the “david” command in each of subdirectories of the current directory.",
"version": "0.1.0",
"description": "Runs the “david” command in each of subfolders (subdirectories) of the current directory.",
"keywords": ["david", "subfolder", "subfolders", "subdirectory", "subdirectories", "folder", "folders", "directory", "directories"],

@@ -15,3 +15,9 @@ "author": { "name": "Mithgol the Webmaster" },

"url": "https://github.com/Mithgol/david-in-subfolders.git"
},
"dependencies": {
"ciel": "~0.3.0"
},
"scripts": {
"test": "jshint --verbose davids.js davicore.js"
}
}

@@ -1,9 +0,39 @@

This module (`davids`) runs the [`david`](http://david-dm.org/) command in each of subfolders of the current directory.
[![(a histogram of downloads)](https://nodei.co/npm-dl/davids.png?height=3)](https://npmjs.org/package/davids)
This module is written in JavaScript and requires [Node.js](http://nodejs.org/) to run. It uses some ECMAScript 2015 features, and thus a relatively recent Node.js is required. This module is tested against the latest stable version of Node.js.
This module (`davids`) runs the [`david`](http://david-dm.org/) command in each of subfolders (subdirectories) of the current directory.
This module is currently in an early phase of its development and thus does not have the desired level of feature completeness.
This module is written in JavaScript and requires [Node.js](http://nodejs.org/) to run. It uses some ECMAScript 2016 features, and thus a relatively recent Node.js is required. This module is tested against the latest stable version of Node.js.
## Installing davids
[![(npm package version)](https://nodei.co/npm/davids.png?downloads=true&downloadRank=true)](https://npmjs.org/package/davids)
### Installing as a global application
* Latest packaged version: `npm install -g davids`
* Latest githubbed version: `npm install -g https://github.com/Mithgol/david-in-subfolders/tarball/master`
The application becomes installed globally and appears in the `PATH`. Then use `davids` command to run the application.
### Installing as a portable application
Instead of the above, download the [ZIP-packed](https://github.com/Mithgol/david-in-subfolders/archive/master.zip) source code of the application and unpack it to some directory. Then run `npm install --production` in that directory.
You may now move that directory (for example, on a flash drive) across systems as long as they have the required version of Node.js installed.
Unlike the above (`npm -g`), the application does not appear in the `PATH`, and thus you'll have to run it directly from the application's directory. You'll also have to run `node davids` instead of `davids`.
## Testing davids
[![(build testing status)](https://img.shields.io/travis/Mithgol/david-in-subfolders/master.svg?style=plastic)](https://travis-ci.org/Mithgol/david-in-subfolders)
It is necessary to install [JSHint](http://jshint.com/) for testing.
* You may install JSHint globally (`npm install jshint -g`) or locally (`npm install jshint` in the directory of davids).
After that you may run `npm test` (in the directory of davids). Only the JS code errors are caught; the code's behaviour is not tested.
## License
MIT license (see the `LICENSE` file).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc