mirror of
https://github.com/apache/superset.git
synced 2026-04-09 19:35:21 +00:00
* rename /explorev2/ -> /explore/ * add redirect for existing explorev2 urls * fix long line * remove extra line * fix missed ref in spec
26 lines
666 B
JavaScript
26 lines
666 B
JavaScript
/* eslint no-console: 0 */
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
import { controls } from './explore/stores/controls';
|
|
|
|
function exportFile(fileLocation, content) {
|
|
fs.writeFile(fileLocation, content, function (err) {
|
|
if (err) {
|
|
console.log(`File ${fileLocation} was not saved... :(`);
|
|
} else {
|
|
console.log(`File ${fileLocation} was saved!`);
|
|
}
|
|
});
|
|
}
|
|
|
|
function main() {
|
|
const APP_DIR = path.resolve(__dirname, './');
|
|
const dir = APP_DIR + '/../dist/';
|
|
if (!fs.existsSync(dir)) {
|
|
fs.mkdirSync(dir);
|
|
}
|
|
const blob = { controls };
|
|
exportFile(APP_DIR + '/../backendSync.json', JSON.stringify(blob, null, 2));
|
|
}
|
|
main();
|