Skip to content

Commit

Permalink
Merge pull request #1 from OraOpenSource/master
Browse files Browse the repository at this point in the history
OraOpenSource#67 revert changes that caused this issue to stable verison. (ran: gi…
  • Loading branch information
barsema authored Jan 18, 2018
2 parents ddae4c3 + 307ba60 commit 2e09ad8
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 1,016 deletions.
11 changes: 3 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ var
Handlebars = require('./lib/handlebars.js'),
extend = require('node.extend'),
debug = require('./lib/debug.js'),
pmd = require('./lib/pmd.js')(debug, extend),
search = require('./lib/search.js')(debug, extend)
pmd = require('./lib/pmd.js')(debug, extend)
;


Expand Down Expand Up @@ -88,10 +87,6 @@ if (config.toc.template){
var objs = pmd.generateData(config);
objs = pmd.mergeObjs(objs);

// First generate the TOC than the files, so the packages also have a TOC
pmd.generateToc(config, objs);
pmd.saveToFile(config, pmd.globalFiles);

// Check if the search library is enabled
if(config.search) {
search.run(config, pmd.globalFiles);
}
pmd.saveToFile(config, objs);
1 change: 0 additions & 1 deletion default.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"projectDispName" : "",
"debug" : false,
"search": false,
"toc" : {
"fileName" : "index.md"
},
Expand Down
2 changes: 0 additions & 2 deletions docs/config.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ When this project is installed a default `config.json` is generated in the proje
{
"<projectName>" : {
"debug" : false,
"search": false,
"folders" : {
"output" : {
"path" : "/Users/giffy/Documents/GitHub/oraopensource/oos-utils/docs"
Expand All @@ -34,7 +33,6 @@ Parameter | Required | Description
--- | --- | ---
`<projectName>` | required | Unique name of the project.
`<projectName>.debug` | optional | Default: `false`. Run app in debug mode.
`<projectName>.search` | optional | Default: `false`. Also enable the search module (only available for HTML templates).
`<projectName>.folders` | required | single JSON object array of objects. Use the an array if the project has multiple folders to process.
`<projectName>.folders.output` | required | JSON object for output information
`<projectName>.folders.output.delete` | optional | Boolean to delete contents in folder. Default `false`.
Expand Down
12 changes: 0 additions & 12 deletions docs/handlebars.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,3 @@ Handlebars has basic condition processing. `ifCond` allows for more complex and
Ex: `{{#ifCond params.length '||' return}}...{{/ifCond}}`

It's notation is `value1, operator, value2`. The `operator` is a string and can be any of the following: `==`, `===`, `<`, `<=`, `>`, `>=`, `&&`, `||`.

### `times`

Executes the body with the amount of times inserted as the first parameter

Ex: `{{times 10}}`

### `now`

Will return the current timestamp

Ex: `{{now}}`
13 changes: 0 additions & 13 deletions lib/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,5 @@ Handlebars.registerHelper('entityFilter', function(entityType, options) {
return options.fn(retEntities);
});

// Register the normal for loop as a helper function inside Handlebars
Handlebars.registerHelper('times', function(n, block) {
var accum = '';
for(var i = 0; i < n; ++i)
accum += block.fn(i);
return accum;
});

// Gets the current timestamp, used for disabling cached Javascript files, will cache a file until next build
Handlebars.registerHelper('now', function() {
return Date.now();
});


module.exports = Handlebars;
Loading

0 comments on commit 2e09ad8

Please sign in to comment.