Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Clean up code per code review, and add sqlite3 to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Lustyn committed Jan 20, 2018
1 parent 39fd053 commit a40f6a8
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 234 deletions.
11 changes: 5 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ if (!config.sessionSecret) {
process.exit(0);
}

if (config.languagePackages.length > 0) {
for (let i in config.languagePackages) {
let lang = config.languagePackages[i];
if (config.languagePackages) {
config.languagePackages.forEach(package => {
try {
let pkg = require.resolve(`${lang}/package.json`);
const pkg = require.resolve(`${package}/package.json`);
highlighter.requireGrammarsSync({ modulePath: pkg });
} catch (e) {
console.warn(`Could not find/load language package ${lang}`)
console.warn(`Could not find/load language package ${package}`)
}
}
});
}

app.engine(".hbs", handlebars({ defaultLayout: "main", extname: ".hbs", helpers: _.merge(helpers, { "dateformat" : dateformat }) }));
Expand Down
Loading

0 comments on commit a40f6a8

Please sign in to comment.