mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-27 05:01:57 +00:00
lots of minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fca3410173
commit
b7276fd174
6
Makefile
6
Makefile
@ -2,14 +2,16 @@
|
||||
|
||||
|
||||
|
||||
bootstrap.js:
|
||||
node make_bootstrap.js
|
||||
bootstrap.js: scripts/bootstrap.js
|
||||
node $<
|
||||
|
||||
|
||||
|
||||
.PHONY: bootstrap
|
||||
bootstrap: bootstrap.js
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -f bootstrap.js
|
||||
|
||||
|
||||
17
README.md
17
README.md
@ -47,23 +47,19 @@ are likely to change, the implementation / API **will definitely** change! ;)_
|
||||
|
||||
### General Documentation:
|
||||
<pwiki-comment>
|
||||
|
||||
- [General info](README.md) - This document.
|
||||
- [Bootstrap path](bootstrap/Doc/Path.md) - Path mechanics.
|
||||
- [Bootstrap macros](bootstrap/Doc/Macros.md) - Macro documentation
|
||||
|
||||
</pwiki-comment>
|
||||
<!--[pWiki[
|
||||
|
||||
- [Doc/About] - This document.
|
||||
- [Doc/Path] - Path mechanics.
|
||||
- [Doc/Macros] - Macro documentation
|
||||
|
||||
]]-->
|
||||
|
||||
|
||||
|
||||
### Project:
|
||||
|
||||
- The project on [GitHub](https://github.com/flynx/pWiki)
|
||||
- pWiki [live demo (hosted on Gitgub)](https://flynx.github.io/pWiki/) _–
|
||||
The data is stored in sessionStorage on the client, closing the tab/browser
|
||||
@ -72,15 +68,10 @@ will reset the wiki._
|
||||
|
||||
### License and Copyright
|
||||
|
||||
|
||||
pWiki is developed by [Alex A. Naanou](https://github.com/flynx) and
|
||||
licensed under the
|
||||
<pwiki-comment>
|
||||
[3-Clause BSD License](LICENSE)
|
||||
</pwiki-comment>
|
||||
<!--[pWiki[
|
||||
[3-Clause BSD License](#LICENSE)
|
||||
]]-->
|
||||
licensed under the <pwiki-comment>[3-Clause BSD License](LICENSE)
|
||||
</pwiki-comment><!--[pWiki[ [3-Clause BSD License](#LICENSE) ]]-->
|
||||
|
||||
|
||||
|
||||
<!-- @filter(markdown) -->
|
||||
|
||||
2
bootstrap.js
vendored
2
bootstrap.js
vendored
File diff suppressed because one or more lines are too long
@ -95,4 +95,5 @@ pre {
|
||||
}
|
||||
|
||||
/* @filter(-wikiword) */
|
||||
/* @filter(text) */
|
||||
/* vim:set ts=4 sw=4 ft=css : */
|
||||
|
||||
3
pwiki.js
3
pwiki.js
@ -1107,7 +1107,8 @@ module.pWikiMacros = actions.Actions(pWikiBase, {
|
||||
// can get using native JS lookup mechanisms, or at least the
|
||||
// farthest I've pushed it so far...
|
||||
var pWikiPage =
|
||||
module.pWikiPage = object.Constructor('pWikiPage',
|
||||
module.pWikiPage =
|
||||
object.Constructor('pWikiPage',
|
||||
actions.mix(
|
||||
// XXX not sure if we need this here...
|
||||
//actions.MetaActions,
|
||||
|
||||
19
make_bootstrap.js → scripts/bootstrap.js
vendored
19
make_bootstrap.js → scripts/bootstrap.js
vendored
@ -18,29 +18,30 @@ glob('bootstrap/**/*.@(tpl|md|css|html)')
|
||||
var p = path
|
||||
.replace('bootstrap/', '')
|
||||
.replace(/\.(json|txt|md|css|html)/, '')
|
||||
|
||||
p
|
||||
&& console.log('Found:', p)
|
||||
|
||||
console.log('Found:', p)
|
||||
bootstrap[p] = {
|
||||
text: fs.readFileSync(path).toString(),
|
||||
} })
|
||||
.on('end', function(){
|
||||
|
||||
// extra root stuff...
|
||||
if(fs.existsSync('README.md')){
|
||||
console.log('Setting:', 'About')
|
||||
bootstrap['Doc/About'] = {
|
||||
text: fs.readFileSync('README.md').toString(),
|
||||
} }
|
||||
if(fs.existsSync('LICENSE')){
|
||||
console.log('Setting:', 'LICENSE')
|
||||
bootstrap['LICENSE'] = {
|
||||
text: fs.readFileSync('LICENSE').toString(),
|
||||
} }
|
||||
if(!bootstrap.WikiHome){
|
||||
console.log('Setting:', 'WikiHome')
|
||||
bootstrap.WikiHome = {
|
||||
text: '@include(Doc/About)'
|
||||
} }
|
||||
if(fs.existsSync('LICENSE')){
|
||||
console.log('Setting:', 'LICENSE')
|
||||
bootstrap['LICENSE'] = {
|
||||
text: `${
|
||||
fs.readFileSync('LICENSE').toString()
|
||||
}<!-- @filter(text) -->`,
|
||||
} }
|
||||
|
||||
var txt = '// This file is generated automatically, '
|
||||
+'all changes made here will be lost.'
|
||||
9
wiki.js
9
wiki.js
@ -344,7 +344,6 @@ var macro = {
|
||||
|
||||
html: function(context, elem){
|
||||
return $(elem) },
|
||||
|
||||
text: function(context, elem){
|
||||
return $('<span>')
|
||||
.append($('<pre>')
|
||||
@ -454,6 +453,7 @@ var macro = {
|
||||
},
|
||||
|
||||
|
||||
//
|
||||
// Parsing:
|
||||
// 1) expand macros
|
||||
// 2) apply filters
|
||||
@ -956,15 +956,13 @@ data.__proto__ = BaseData
|
||||
// XXX experimental...
|
||||
// ...for some reason these are called twice...
|
||||
var PathActions = {
|
||||
/*
|
||||
// XXX
|
||||
test: function(){
|
||||
var p = path2lst(this.location)
|
||||
|
||||
console.log('!!! TEST !!!')
|
||||
|
||||
this.location = p.slice(0, -1)
|
||||
},
|
||||
//*/
|
||||
this.location = p.slice(0, -1) },
|
||||
delete: function(){
|
||||
var p = normalizePath(path2lst(this.location).slice(0, -1))
|
||||
|
||||
@ -1091,7 +1089,6 @@ var Wiki = {
|
||||
delete this.__order
|
||||
delete this.__order_by
|
||||
this.__location = this.resolvePathVars(this.resolveDotPath(value))
|
||||
|
||||
this.resolvePathActions() },
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user