mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
703f053895
commit
c92a5e40af
@ -19,26 +19,23 @@ glob('bootstrap/**/*.@(tpl|md|css|html)')
|
||||
.replace('bootstrap/', '')
|
||||
.replace(/\.(json|txt|md|css|html)/, '')
|
||||
|
||||
if(p)
|
||||
p
|
||||
&& console.log('Found:', p)
|
||||
|
||||
console.log('Found:', p)
|
||||
bootstrap[p] = {
|
||||
text: fs.readFileSync(path).toString(),
|
||||
}
|
||||
})
|
||||
} })
|
||||
.on('end', function(){
|
||||
if(fs.existsSync('README.md')){
|
||||
console.log('Setting:', 'About')
|
||||
bootstrap['Doc/About'] = {
|
||||
text: fs.readFileSync('README.md').toString(),
|
||||
}
|
||||
}
|
||||
} }
|
||||
if(!bootstrap.WikiHome){
|
||||
console.log('Setting:', 'WikiHome')
|
||||
bootstrap.WikiHome = {
|
||||
text: '@include(Doc/About)'
|
||||
}
|
||||
}
|
||||
} }
|
||||
|
||||
var txt = '// This file is generated automatically, '
|
||||
+'all changes made here will be lost.'
|
||||
@ -46,8 +43,7 @@ glob('bootstrap/**/*.@(tpl|md|css|html)')
|
||||
+'var Bootstrap = ' + JSON.stringify(bootstrap)
|
||||
|
||||
console.log('Writing:', 'bootstrap.js')
|
||||
fs.writeFileSync('bootstrap.js', txt)
|
||||
})
|
||||
fs.writeFileSync('bootstrap.js', txt) })
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user