chore: apply prettier on all files (#8)
* chore: apply prettier on all files
* chore: add prettier npm script
* Update .prettierrc
Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
* Update .prettierignore
Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
* Update .prettierignore
Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
* Update .prettierignore
Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
* chore: apply prettier with new conf
* Revert "chore: apply prettier with new conf"
This reverts commit db2a04c03f.
* chore: apply prettier correctly
* chore: update .prettierignore
* chore: restore viewer.min.js minification
* chore: apply again prettier
Co-authored-by: Stefano Borzi <stefano.borzi@fedex.com>
Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
This commit is contained in:
parent
fe21209817
commit
8331e4dd73
15 changed files with 504 additions and 228 deletions
|
|
@ -92,15 +92,18 @@ export class Armory {
|
|||
}
|
||||
app.locals.locals = locals;
|
||||
|
||||
app.engine(".hbs", handlebarsEngine({
|
||||
extname: "hbs",
|
||||
partialsDir: path.join(process.cwd(), "static", "partials"),
|
||||
layoutsDir: path.join(process.cwd(), "static"),
|
||||
defaultLayout: "layout.hbs",
|
||||
helpers: {
|
||||
...require("handlebars-helpers")(),
|
||||
},
|
||||
}));
|
||||
app.engine(
|
||||
".hbs",
|
||||
handlebarsEngine({
|
||||
extname: "hbs",
|
||||
partialsDir: path.join(process.cwd(), "static", "partials"),
|
||||
layoutsDir: path.join(process.cwd(), "static"),
|
||||
defaultLayout: "layout.hbs",
|
||||
helpers: {
|
||||
...require("handlebars-helpers")(),
|
||||
},
|
||||
}),
|
||||
);
|
||||
app.set("view engine", "handlebars");
|
||||
app.set("views", path.join(process.cwd(), "static"));
|
||||
|
||||
|
|
@ -122,11 +125,13 @@ export class Armory {
|
|||
}
|
||||
return req.socket.remoteAddress;
|
||||
});
|
||||
app.use(morgan(":method :url :status - ID :id - IP :ip - :response-time ms", {
|
||||
stream: {
|
||||
write: (msg) => this.logger.http(msg.trim()),
|
||||
},
|
||||
}));
|
||||
app.use(
|
||||
morgan(":method :url :status - ID :id - IP :ip - :response-time ms", {
|
||||
stream: {
|
||||
write: (msg) => this.logger.http(msg.trim()),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
app.use("/js", express.static(`static/js`));
|
||||
app.use("/css", express.static(`static/css`));
|
||||
|
|
@ -198,7 +203,7 @@ export class Armory {
|
|||
}
|
||||
|
||||
public getRealm(realm: string): IRealmConfig {
|
||||
return this.config.realms.find(r => r.name.toLowerCase() === realm.toLowerCase());
|
||||
return this.config.realms.find((r) => r.name.toLowerCase() === realm.toLowerCase());
|
||||
}
|
||||
|
||||
public async getDatabaseCharset(realm: string): Promise<string> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue