Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asset-assistant

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-assistant - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "asset-assistant",
"version": "0.0.2",
"version": "0.0.3",
"keywords": [

@@ -5,0 +5,0 @@ "util",

@@ -1,2 +0,1 @@

const mkdirp = require("mkdirp");
const fs = require("fs");

@@ -10,6 +9,14 @@ const glob = require('glob');

this.depth = depth;
this.warn = true;
this.dry = false;
this.silent = false;
}
setSilent(){
this.silent = true;
}
isSilent(){
return this.silent;
}
setDry(){

@@ -64,11 +71,11 @@ this.dry = true;

log(string) {
if (this.verbose) console.log(string);
if ((this.debug || this.verbose) && !this.silent) console.log(string);
}
debugLog(string) {
if (this.debug) console.log(string);
if (this.debug && !this.silent) console.log(string);
}
warnLog(string) {
if (this.warn) console.log(`*WARNING* ${string}`);
if (!this.silent) console.log(`*WARNING* ${string}`);
}

@@ -96,3 +103,3 @@

this.log(`Package ${this.package.name}`);
this.log(`Traversing package ${this.package.name}`);
this.options = {...AbstractAssets.defaults, ...this.package.assets};

@@ -103,3 +110,6 @@ this.options.up = this.options.up + (this.depth * 2);

if (typeof this.options.src === "string") {
this.debugLog("options.src === string");
this.options.src = [this.options.src];
} else {
this.debugLog("options.src !== string");
}

@@ -106,0 +116,0 @@

@@ -9,9 +9,20 @@ #!/usr/bin/env node

const argv = yargs
.usage("$0 [options]")
.boolean("s")
.boolean("v")
.boolean("d")
.boolean("dry")
.boolean("local")
.boolean("dependencies")
.boolean("r")
.default("s", false)
.default("v", false)
.default("d", false)
.default("dry", false)
.default("local", true)
.default("dependencies", true)
.default("r", true)
.default("fileset", "src")
.describe("dry", "do not perform task, only console output")
.describe("clean", "remove source files from destination, instead of copy")
.describe("r", "set to false to not recurse over modules")
.describe("s", "selent, do not print out to console")
.describe("v", "verbose, print out more information")
.describe("d", "debug, print out even more information")
.argv;

@@ -21,5 +32,8 @@

if (!argv.s) console.log("Asset Assistant : v0.0.3");
if (argv.clean) task = new CleanAssets();
else task = new LoadAssets();
if (argv.s) task.setSilent();
if (argv.v) task.setVerbose();

@@ -26,0 +40,0 @@ if (argv.d) task.setDebug();

@@ -25,2 +25,3 @@ const AbstractAssets = require("./AbstractAssets");

if (!this.isDry()){
this.log(`Creating directory ${copyObj.dest}`)
mkdirp.sync(copyObj.dest);

@@ -27,0 +28,0 @@ }

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