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

canvacord-assets

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvacord-assets - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

15

index.js
const fs = require("fs");
const chalk = require("chalk");
const dir = {

@@ -16,10 +15,7 @@ IMAGES: `${__dirname}/data/images`,

console.log(chalk.blueBright("[Canvacord] Loading assets..."));
// load images
fs.readdir(dir.IMAGES, (error, files) => {
console.log(chalk.blueBright("[Canvacord] Loading images..."));
if (error) console.log(chalk.redBright(`[Canvacord] Error while loading assets: ${error.message}!`));
if (error) console.error(`[Canvacord] Error while loading assets: ${error.message}!`);
if (!files.length) return console.log(chalk.redBright("[Canvacord] Assets dir is corrupted, please re-install canvacord."));
if (!files.length) throw new Error("[Canvacord] Assets dir is corrupted, please re-install canvacord.");

@@ -29,3 +25,2 @@ files.forEach((x, i) => {

obj.images[name] = `${dir.IMAGES}/${x}`;
console.log(chalk.greenBright(`[${i+1}] Loaded image ${x}!`));
});

@@ -36,6 +31,5 @@ });

fs.readdir(dir.FONTS, (error, files) => {
console.log(chalk.blueBright("[Canvacord] Loading fonts..."));
if (error) console.log(chalk.redBright(`[Canvacord] Error while loading assets: ${error.message}!`));
if (error) console.error(`[Canvacord] Error while loading assets: ${error.message}!`);
if (!files.length) return console.log(chalk.redBright("[Canvacord] Assets dir is corrupted, please re-install canvacord."));
if (!files.length) throw new Error("[Canvacord] Assets dir is corrupted, please re-install canvacord.");

@@ -45,3 +39,2 @@ files.forEach((x, i) => {

obj.fonts[name] = `${dir.FONTS}/${x}`;
console.log(chalk.greenBright(`[${i+1}] Loaded font ${x}!`));
});

@@ -48,0 +41,0 @@ });

{
"name": "canvacord-assets",
"version": "1.0.9",
"version": "1.1.0",
"description": "Canvacord assets",

@@ -12,5 +12,3 @@ "main": "index.js",

"license": "MIT",
"dependencies": {
"chalk": "^4.1.0"
},
"dependencies": {},
"directories": {

@@ -17,0 +15,0 @@ "test": "test"

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