Added scripts
This commit is contained in:
21
index.js
Normal file
21
index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const ghpages = require('gh-pages');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra')
|
||||
|
||||
const pathOfApps = path.join(path.join(__dirname, 'v1'), 'apps');
|
||||
const pathOfList = path.join(path.join(__dirname, 'v1'), 'autogeneratedlist.json');
|
||||
|
||||
fs.readdir(pathOfApps, function(err, items) {
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i] = items[i].replace('.json', '')
|
||||
}
|
||||
|
||||
fs.outputJsonSync(pathOfList, {
|
||||
appList: items
|
||||
})
|
||||
|
||||
ghpages.publish('v1', function(err) {
|
||||
console.log(err)
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user