Commit 3c637183 authored by NGPixel's avatar NGPixel

Refactored install + handle long code lines + fuse skip ace

parent f6e8e91f
.has-mkcontent {
width:100%;
overflow:hidden;
.columns, .column {
width: 100%;
overflow: hidden;
}
}
.mkcontent {
font-size: 14px;
color: mc('grey', '700');
padding: 0 0 20px 0;
width: 100%;
overflow: hidden;
h1, h2, h3 {
font-weight: 400;
......@@ -243,6 +256,7 @@
padding: 20px 20px 20px 13px;
font-family: $core-font-monospace;
white-space: pre;
overflow-x: scroll;
> code {
border-radius: 5px;
......
......@@ -66,7 +66,7 @@ router.post('/login', bruteforce.prevent, function (req, res, next) {
req.brute.reset(function () {
return res.redirect('/')
})
})
}) || true
}).catch(err => {
// LOGIN FAIL
if (err.message === 'INVALID_LOGIN') {
......
......@@ -70,15 +70,24 @@ console.info(colors.white('└── ') + colors.green('Running global tasks...'
let globalTasks = Promise.mapSeries([
() => {
console.info(colors.white(' └── ') + colors.green('Copy + Minify ACE modes to assets...'))
return fs.ensureDirAsync('./assets/js/ace').then(() => {
return fs.readdirAsync('./node_modules/brace/mode').then(modeList => {
return Promise.map(modeList, mdFile => {
console.info(colors.white(' mode-' + mdFile))
let result = uglify.minify(path.join('./node_modules/brace/mode', mdFile), { output: { 'max_line_len': 1000000 } })
return fs.writeFileAsync(path.join('./assets/js/ace', 'mode-' + mdFile), result.code)
fs.accessAsync('./assets/js/ace').then(() => {
console.info(colors.white(' └── ') + colors.magenta('ACE modes directory already exists. Task aborted.'))
return true
}).catch(err => {
if (err.code === 'ENOENT') {
console.info(colors.white(' └── ') + colors.green('Copy + Minify ACE modes to assets...'))
return fs.ensureDirAsync('./assets/js/ace').then(() => {
return fs.readdirAsync('./node_modules/brace/mode').then(modeList => {
return Promise.map(modeList, mdFile => {
console.info(colors.white(' mode-' + mdFile))
let result = uglify.minify(path.join('./node_modules/brace/mode', mdFile), { output: { 'max_line_len': 1000000 } })
return fs.writeFileAsync(path.join('./assets/js/ace', 'mode-' + mdFile), result.code)
})
})
})
})
} else {
throw err
}
})
}
], f => { return f() })
......
......@@ -29,7 +29,7 @@ block rootNavRight
block content
#page-type-view(data-entrypath=pageData.meta.path)
.container.is-fluid
.container.is-fluid.has-mkcontent
.columns.is-gapless
.column.is-narrow.is-hidden-touch.sidebar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment