MCPcopy Index your code
hub / github.com/NativeScript/nativescript-sdk-examples-js / orderExamples

Function orderExamples

scripts/build.js:36–48  ·  view source on GitHub ↗
(array, order, dirName)

Source from the content-addressed store, hash-verified

34// metadata.md - activity-indicator
35// example-order: styling, basics
36function 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
50function build() {
51 // Re-create the `dist` dir

Callers 1

getComponentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected