This is the repository for the PJSON loader.
Installation
npm install --save pjson-loader
Usage
API
var pjsonLoader = ; pjsonLoader; pjsonLoader; pjsonLoader;
Examples
Default options.
// Use the default options. Pass an empty object to opts. /* { rootDir: 'server', pjsonPath: 'pjson', fragmentsPath: 'fragments', pagesPath: 'pages', middleware: [] } */ // App is your express application to bind the /pjson route to. pjsonLoader;
Specifying directory option
Pages and fragments should always be in the pjson directory.
var myOpts = rootDir: "myDir" pjsonPath: "myPjsonPath" fragmentsPath: "myFragmentsPath" pagesPath: "myPagesPath" middleware: myMiddleWareFuncs ... pjsonLoader;
Tests
npm run test