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:
|
bootstrap.js: scripts/bootstrap.js
|
||||||
node make_bootstrap.js
|
node $<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: bootstrap
|
.PHONY: bootstrap
|
||||||
bootstrap: bootstrap.js
|
bootstrap: bootstrap.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f bootstrap.js
|
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:
|
### General Documentation:
|
||||||
<pwiki-comment>
|
<pwiki-comment>
|
||||||
|
|
||||||
- [General info](README.md) - This document.
|
- [General info](README.md) - This document.
|
||||||
- [Bootstrap path](bootstrap/Doc/Path.md) - Path mechanics.
|
- [Bootstrap path](bootstrap/Doc/Path.md) - Path mechanics.
|
||||||
- [Bootstrap macros](bootstrap/Doc/Macros.md) - Macro documentation
|
- [Bootstrap macros](bootstrap/Doc/Macros.md) - Macro documentation
|
||||||
|
|
||||||
</pwiki-comment>
|
</pwiki-comment>
|
||||||
<!--[pWiki[
|
<!--[pWiki[
|
||||||
|
|
||||||
- [Doc/About] - This document.
|
- [Doc/About] - This document.
|
||||||
- [Doc/Path] - Path mechanics.
|
- [Doc/Path] - Path mechanics.
|
||||||
- [Doc/Macros] - Macro documentation
|
- [Doc/Macros] - Macro documentation
|
||||||
|
|
||||||
]]-->
|
]]-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Project:
|
### Project:
|
||||||
|
|
||||||
- The project on [GitHub](https://github.com/flynx/pWiki)
|
- The project on [GitHub](https://github.com/flynx/pWiki)
|
||||||
- pWiki [live demo (hosted on Gitgub)](https://flynx.github.io/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
|
The data is stored in sessionStorage on the client, closing the tab/browser
|
||||||
@ -72,15 +68,10 @@ will reset the wiki._
|
|||||||
|
|
||||||
### License and Copyright
|
### License and Copyright
|
||||||
|
|
||||||
|
|
||||||
pWiki is developed by [Alex A. Naanou](https://github.com/flynx) and
|
pWiki is developed by [Alex A. Naanou](https://github.com/flynx) and
|
||||||
licensed under the
|
licensed under the <pwiki-comment>[3-Clause BSD License](LICENSE)
|
||||||
<pwiki-comment>
|
</pwiki-comment><!--[pWiki[ [3-Clause BSD License](#LICENSE) ]]-->
|
||||||
[3-Clause BSD License](LICENSE)
|
|
||||||
</pwiki-comment>
|
|
||||||
<!--[pWiki[
|
|
||||||
[3-Clause BSD License](#LICENSE)
|
|
||||||
]]-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- @filter(markdown) -->
|
<!-- @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(-wikiword) */
|
||||||
|
/* @filter(text) */
|
||||||
/* vim:set ts=4 sw=4 ft=css : */
|
/* 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
|
// can get using native JS lookup mechanisms, or at least the
|
||||||
// farthest I've pushed it so far...
|
// farthest I've pushed it so far...
|
||||||
var pWikiPage =
|
var pWikiPage =
|
||||||
module.pWikiPage = object.Constructor('pWikiPage',
|
module.pWikiPage =
|
||||||
|
object.Constructor('pWikiPage',
|
||||||
actions.mix(
|
actions.mix(
|
||||||
// XXX not sure if we need this here...
|
// XXX not sure if we need this here...
|
||||||
//actions.MetaActions,
|
//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
|
var p = path
|
||||||
.replace('bootstrap/', '')
|
.replace('bootstrap/', '')
|
||||||
.replace(/\.(json|txt|md|css|html)/, '')
|
.replace(/\.(json|txt|md|css|html)/, '')
|
||||||
|
console.log('Found:', p)
|
||||||
p
|
|
||||||
&& console.log('Found:', p)
|
|
||||||
|
|
||||||
bootstrap[p] = {
|
bootstrap[p] = {
|
||||||
text: fs.readFileSync(path).toString(),
|
text: fs.readFileSync(path).toString(),
|
||||||
} })
|
} })
|
||||||
.on('end', function(){
|
.on('end', function(){
|
||||||
|
|
||||||
|
// extra root stuff...
|
||||||
if(fs.existsSync('README.md')){
|
if(fs.existsSync('README.md')){
|
||||||
console.log('Setting:', 'About')
|
console.log('Setting:', 'About')
|
||||||
bootstrap['Doc/About'] = {
|
bootstrap['Doc/About'] = {
|
||||||
text: fs.readFileSync('README.md').toString(),
|
text: fs.readFileSync('README.md').toString(),
|
||||||
} }
|
} }
|
||||||
if(fs.existsSync('LICENSE')){
|
|
||||||
console.log('Setting:', 'LICENSE')
|
|
||||||
bootstrap['LICENSE'] = {
|
|
||||||
text: fs.readFileSync('LICENSE').toString(),
|
|
||||||
} }
|
|
||||||
if(!bootstrap.WikiHome){
|
if(!bootstrap.WikiHome){
|
||||||
console.log('Setting:', 'WikiHome')
|
console.log('Setting:', 'WikiHome')
|
||||||
bootstrap.WikiHome = {
|
bootstrap.WikiHome = {
|
||||||
text: '@include(Doc/About)'
|
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, '
|
var txt = '// This file is generated automatically, '
|
||||||
+'all changes made here will be lost.'
|
+'all changes made here will be lost.'
|
||||||
9
wiki.js
9
wiki.js
@ -344,7 +344,6 @@ var macro = {
|
|||||||
|
|
||||||
html: function(context, elem){
|
html: function(context, elem){
|
||||||
return $(elem) },
|
return $(elem) },
|
||||||
|
|
||||||
text: function(context, elem){
|
text: function(context, elem){
|
||||||
return $('<span>')
|
return $('<span>')
|
||||||
.append($('<pre>')
|
.append($('<pre>')
|
||||||
@ -454,6 +453,7 @@ var macro = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Parsing:
|
// Parsing:
|
||||||
// 1) expand macros
|
// 1) expand macros
|
||||||
// 2) apply filters
|
// 2) apply filters
|
||||||
@ -956,15 +956,13 @@ data.__proto__ = BaseData
|
|||||||
// XXX experimental...
|
// XXX experimental...
|
||||||
// ...for some reason these are called twice...
|
// ...for some reason these are called twice...
|
||||||
var PathActions = {
|
var PathActions = {
|
||||||
/*
|
// XXX
|
||||||
test: function(){
|
test: function(){
|
||||||
var p = path2lst(this.location)
|
var p = path2lst(this.location)
|
||||||
|
|
||||||
console.log('!!! TEST !!!')
|
console.log('!!! TEST !!!')
|
||||||
|
|
||||||
this.location = p.slice(0, -1)
|
this.location = p.slice(0, -1) },
|
||||||
},
|
|
||||||
//*/
|
|
||||||
delete: function(){
|
delete: function(){
|
||||||
var p = normalizePath(path2lst(this.location).slice(0, -1))
|
var p = normalizePath(path2lst(this.location).slice(0, -1))
|
||||||
|
|
||||||
@ -1091,7 +1089,6 @@ var Wiki = {
|
|||||||
delete this.__order
|
delete this.__order
|
||||||
delete this.__order_by
|
delete this.__order_by
|
||||||
this.__location = this.resolvePathVars(this.resolveDotPath(value))
|
this.__location = this.resolvePathVars(this.resolveDotPath(value))
|
||||||
|
|
||||||
this.resolvePathActions() },
|
this.resolvePathActions() },
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user