modchat icon indicating copy to clipboard operation
modchat copied to clipboard

[Idea] Make ROP code check env

Open Semisol opened this issue 4 years ago • 3 comments

ROP code for example can be replaced with:

For logging, add a debugLog(...params) function and use that:

function debugLog(...params){
  if (!process.env.PRODUCTION) console.log(...params)
}

For others, use an if statement:

if (!process.env.PRODUCTION) /*debug code*/

And set the env variable on production.

Semisol avatar Apr 02 '21 17:04 Semisol

This is a really good idea, this would be super helpful.

jessiejs avatar Apr 06 '21 01:04 jessiejs

This is a really good idea, this would be super helpful.

Yeah. But if the rewrite works out then this would not be needed.

Semisol avatar Apr 06 '21 13:04 Semisol

At the moment, I don't have enough time to dedicate to the rewrite. However, @B294 is helping fix some issues in the backend of this repository and I'm rewriting the frontend with Web Components, so essentially this will become Modchat 1.4 in a few weeks.

micahlt avatar Sep 03 '21 16:09 micahlt