Setup ESLint and Prettier and apply changes to sources #891
3 changed files with 7 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@
|
|||
/lbry-app
|
||||
/lbry-venv
|
||||
/static/daemon/lbrynet*
|
||||
/static/locales
|
||||
/daemon/build
|
||||
/daemon/venv
|
||||
/daemon/requirements.txt
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
import store from "store.js";
|
||||
import store from "store";
|
||||
import { remote } from "electron";
|
||||
import path from "path";
|
||||
|
||||
const env = process.env.NODE_ENV || "production";
|
||||
const config = {
|
||||
...require(`./config/${env}`),
|
||||
};
|
||||
const i18n = require("y18n")({
|
||||
directory: `${remote.app.getAppPath()}/locales`,
|
||||
directory: path
|
||||
.join(remote.app.getAppPath(), "/../static/locales")
|
||||
.replace(/\\/g, "\\\\"),
|
||||
updateFiles: false,
|
||||
locale: "en",
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const extract = require("i18n-extract");
|
||||
const fs = require("fs");
|
||||
|
||||
const dir = `${__dirname}/../../dist/locales`;
|
||||
const dir = `${__dirname}/../../static/locales`;
|
||||
const path = `${dir}/en.json`;
|
||||
|
||||
if (!fs.existsSync(dir)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue