[wpkg-users] wpkg: js "plugins" or "mods"

Andy Welch Andy.Welch at blackbay.com
Fri Oct 15 00:13:52 CEST 2010


Hi all

 

I am loathe to start messing with wpkg.js, instead I like the idea of a
simple plugin approach

 

A plugins folder containing one or more files can be loaded and eval'd
as js code before main() runs, or, as one of the first tasks of main()

 

This would allow selective mod's to individual functions, leaving the
core wpkg.js file untouched. Simply code an amended function in
plugins\blah.js and voila it us run by the cscript interpreter instead
of what is in the wpkg.js main file.

 

At the least, this allows an easy method of separating out new
development effort - I can include functions I am touching in the
plugins folder and, once stabilised, submit them as core mods if
necessary.

 

Perhaps "Overloads" or "Mods" is a preferred name?

 

Method:-

 

a)      Check for plugins folder

b)      List js files

c)       Interate through list if not empty

d)      Eval each file

e)      If no errors carry on as per usual

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20101015/21df62bc/attachment-0001.html>


More information about the wpkg-users mailing list