mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-25 17:45:34 +00:00
Use the new Docker-based, beta version of CircleCI. This adds a docker image that has the correct deps to run flow, and then migrates from the old circle.yml format to the new. This gets test runs wayyyyy down. Earlier today, on the old stack, before optimizations, we were at > 9 min for PR builds (aka, CI runs without a website deploy). The build for this PR ran in 1 min 33 seconds. Woo!
37 lines
796 B
JavaScript
Executable File
37 lines
796 B
JavaScript
Executable File
const path = require('path');
|
|
var fs = require('fs');
|
|
var join = require('path').join;
|
|
|
|
var files = [];
|
|
function crawl(location) {
|
|
var dir = fs.readdirSync(location);
|
|
dir.map(function(name, index) {
|
|
var stat = fs.statSync(join(location, name));
|
|
if (stat.isDirectory()) {
|
|
crawl(join(location, name));
|
|
} else {
|
|
files.push(join(location, name));
|
|
}
|
|
});
|
|
}
|
|
crawl('docs');
|
|
|
|
var names = files.map(function(file) {
|
|
const nameWithExt = file.split('docs' + path.sep)[1];
|
|
const name = nameWithExt.split('.md')[0];
|
|
return name;
|
|
});
|
|
|
|
var mdData = {};
|
|
|
|
names.map(function(name) {
|
|
mdData[name] = fs.readFileSync('docs' + path.sep + name + '.md', {
|
|
encoding: 'utf8',
|
|
});
|
|
});
|
|
|
|
fs.writeFileSync(
|
|
'website' + path.sep + 'docs-dist.json',
|
|
JSON.stringify(mdData)
|
|
);
|