Skip to content

Commit

Permalink
frontend: remove errors.json
Browse files Browse the repository at this point in the history
  • Loading branch information
terrablue committed Jun 15, 2024
1 parent d45912a commit d9c63f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
16 changes: 13 additions & 3 deletions packages/frontend/src/frontends/common/errors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { File } from "rcompat/fs";
import { Logger } from "primate";

const json = await new File(import.meta.url).up(1).join("errors.json").json();
const errors = {
ErrorInComponent: {
message: "error in component {0}",
fix: "fix previous error in {1}",
level: "Error",
},
MissingComponent: {
message: "missing component {0}",
fix: "create {1} or remove route function",
level: "Error",
},
};

export default Logger.err(json.errors, json.module);
export default Logger.err(errors, "@primate/frontend");
15 changes: 0 additions & 15 deletions packages/frontend/src/frontends/common/errors.json

This file was deleted.

0 comments on commit d9c63f1

Please sign in to comment.