Make babel-standalone an ESModule and enable flow (#9025)

* Make babel-standalone an ESModule and enable flow

* autogenerate plugin list

* Make config an array
This commit is contained in:
Daniel Tschinder
2019-03-06 14:30:43 -08:00
committed by GitHub
parent d8a5329834
commit fb81e8f8b4
13 changed files with 507 additions and 210 deletions

View File

@@ -0,0 +1,14 @@
const fs = require("fs");
const path = require("path");
module.exports = function writeFileAndMkDir(file, content) {
try {
fs.mkdirSync(path.dirname(file));
} catch (error) {
if (error.code !== "EEXIST") {
throw error;
}
}
fs.writeFileSync(file, content);
};