chore: Updated fusebox scripts

This commit is contained in:
NGPixel
2017-05-13 17:03:32 -04:00
parent 9e801548e0
commit 8f974a3ac7
8 changed files with 94 additions and 160 deletions

View File

@@ -44,8 +44,7 @@ const Promise = require('bluebird')
const fs = Promise.promisifyAll(require('fs-extra'))
const klaw = require('klaw')
const Cron = require('cron').CronJob
const i18nextBackend = require('i18next-node-fs-backend')
const i18nextMw = require('i18next-express-middleware')
const i18nBackend = require('i18next-node-fs-backend')
const entryHelper = require('./helpers/entry')
@@ -54,15 +53,14 @@ const entryHelper = require('./helpers/entry')
// ----------------------------------------
global.lang
.use(i18nextBackend)
.use(i18nextMw.LanguageDetector)
.use(i18nBackend)
.init({
load: 'languageOnly',
ns: ['common', 'errors', 'git'],
ns: ['common', 'admin', 'auth', 'errors', 'git'],
defaultNS: 'common',
saveMissing: false,
supportedLngs: ['en', 'fr'],
preload: ['en', 'fr'],
preload: [appconfig.lang],
lng: appconfig.lang,
fallbackLng: 'en',
backend: {
loadPath: path.join(SERVERPATH, 'locales/{{lng}}/{{ns}}.json')

View File

@@ -18,7 +18,8 @@ html(data-logic='login')
link(rel='manifest', href='/manifest.json')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
script(type='text/javascript', src='/js/libs.min.js')
script(type='text/javascript', src='/js/app.min.js')
body
#bg

View File

@@ -18,7 +18,8 @@ html(data-logic='error')
link(rel='manifest', href='/manifest.json')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
script(type='text/javascript', src='/js/libs.min.js')
script(type='text/javascript', src='/js/app.min.js')
body(class='is-forbidden')
.container

View File

@@ -18,7 +18,8 @@ html(data-logic='error')
link(rel='manifest', href='/manifest.json')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
script(type='text/javascript', src='/js/libs.min.js')
script(type='text/javascript', src='/js/app.min.js')
body(class='is-notexist')
.container

View File

@@ -18,7 +18,8 @@ html(data-logic='error')
link(rel='manifest', href='/manifest.json')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
script(type='text/javascript', src='/js/libs.min.js')
script(type='text/javascript', src='/js/app.min.js')
body(class='is-error')
.container

View File

@@ -18,7 +18,8 @@ html
link(rel='manifest', href='/manifest.json')
// JS / CSS
script(type='text/javascript', src='/js/bundle.min.js')
script(type='text/javascript', src='/js/libs.min.js')
script(type='text/javascript', src='/js/app.min.js')
block head