| 34 | // metadata.md - activity-indicator |
| 35 | // example-order: styling, basics |
| 36 | function orderExamples(array, order, dirName) { |
| 37 | var customSortArray = []; |
| 38 | order.forEach(function (item) { |
| 39 | var index = array.indexOf(dirName + "/" + item + "/article.md"); |
| 40 | if (index >= 0) { |
| 41 | customSortArray.push(array[index]); |
| 42 | array.splice(index, 1); |
| 43 | } |
| 44 | }); |
| 45 | array = array.sort(compareFiles); |
| 46 | var resultArray = customSortArray.concat(array); |
| 47 | return resultArray; |
| 48 | }; |
| 49 | |
| 50 | function build() { |
| 51 | // Re-create the `dist` dir |