Skip to content

Commit 6588285

Browse files
author
fabianmoronzirfas
committed
chore(regenerate): regen all files and create new ones. Added function-list for eslintrc
1 parent ab1994d commit 6588285

File tree

312 files changed

+54633
-50571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+54633
-50571
lines changed

.bin/api/data.json

Lines changed: 46730 additions & 44137 deletions
Large diffs are not rendered by default.

.bin/index.js

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ let sortedByCategory = _.chain(data)
172172
};
173173
}).value();
174174

175-
// let sortedBySubCategory = _.chain(data)
176-
// .groupBy('subcategory')
177-
// .map((key, val)=>{
178-
// return {
179-
// entries: key,
180-
// subcat: val
181-
// };
182-
// }).value();
183175

184176
let catsAndSubcats = [];
185177
sortedByCategory.forEach((ele)=>{
@@ -218,25 +210,40 @@ catsAndSubcats.forEach((element)=>{
218210
});
219211

220212

221-
// console.log(JSON.stringify(catsAndSubcats, null, 2));
213+
// console.log(JSON.stringify(data, null, 2));
222214

223-
fs.writeFile('./_data/categories.json', JSON.stringify(sortedByCategory, null, 2), (err)=>{
215+
var buildGlobalsObject = function(){
216+
let obj = {};
217+
data.forEach((ele)=>{
218+
obj[ele.name.includes('.') ? ele.name.split('.')[0] : ele.name] = true;
219+
});
220+
console.log(JSON.stringify(obj));
221+
return JSON.stringify(obj);
222+
223+
}
224+
fs.writeFile('./_data/function-list.json',buildGlobalsObject(), (err, data)=>{
224225
if(err) {
225226
throw err;
227+
}else{
228+
229+
}
230+
});
231+
232+
233+
let categoriesData = null;
234+
fs.writeFile('./_data/categories.json', JSON.stringify(sortedByCategory, null, 2), (err, data)=>{
235+
if(err) {
236+
throw err;
237+
}else{
238+
226239
}
227240
});
228241

229-
// we actually don't need this anymore.
230-
// fs.writeFile('./_data/sub-categories.json', JSON.stringify(sortedBySubCategory, null, 2), (err)=>{
231-
// if(err) {
232-
// throw err;
233-
// }
234-
// });
242+
generateFiles(sortedByCategory, true);
235243

236244
fs.writeFile('./_data/cats-and-subcats.json', JSON.stringify(catsAndSubcats, null, 2), (err)=>{
237245
if(err) {
238246
throw err;
239247
}
240248
});
241249

242-
generateFiles(true);

.bin/lib/data-generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ function generator(data) {
2222
});
2323
// make it a string
2424
let params = paramsList.join(', ');
25-
element.codetitle = `b.${element.name}(${params})`;
25+
element.codetitle = `${element.name}(${params})`;
2626
}else if (element.kind.toString() === 'constant' || element.kind.toString() === 'property') {
27-
element.codetitle = `b.${element.name}`;
27+
element.codetitle = `${element.name}`;
2828
} else if(element.kind.toString() === 'class') {
2929
element.codetitle = `${element.name}`;
3030
}

.bin/lib/files-and-folders.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var exports = module.exports = {};
99
// or a overwrite flag is set
1010
const fs = require('fs-extra');
1111
const YAML = require('yamljs');
12-
const data = require('../../_data/categories.json'); // load the cats
12+
let data = null;
1313
const pathExists = require('path-exists');
1414

1515
// console.log(process.cwd());
@@ -55,7 +55,8 @@ function process(ele, folder, ow) {
5555
});
5656
}
5757

58-
function generate(overwrite) {
58+
function generate(data ,overwrite) {
59+
5960
data.forEach((element, index, array)=>{
6061
if(element.cat !== 'null') {
6162
process(element, `./reference/${element.cat.toLowerCase()}/`, overwrite);

0 commit comments

Comments
 (0)