From 37a932e1ce169923c8424a3a005413bda7a0c2bb Mon Sep 17 00:00:00 2001 From: Wenderson Pires Date: Tue, 16 Apr 2024 19:48:47 -0300 Subject: [PATCH] better message for missing 'alem.config.json' file --- lib/config.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/config.js b/lib/config.js index 79c0431..249af42 100644 --- a/lib/config.js +++ b/lib/config.js @@ -7,7 +7,9 @@ const path = require("path"); function read_alem_config() { const configPath = path.join(".", "alem.config.json"); if (!fs.existsSync(configPath)) { - throw new Error(`alem.config.json not found`); + console.warn(`INFO: File 'alem.config.json' not found! If you're using the CLI within a project, you must create this file to setup your project. Take a look at the Além docs: https://alem.dev/?path=config-file.`); + console.log("\n") + return {}; } const configRaw = fs.readFileSync(configPath); try { diff --git a/package.json b/package.json index f4657fd..292981f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "alem", "description": "Create web3 applications for NEAR BOS with a focus on performance and friendly development.", - "version": "1.0.0-beta.18", + "version": "1.0.0-beta.19", "main": "main.js", "types": "index.d.ts", "author": "Wenderson Pires - wendersonpires.near",