@@ -61,6 +61,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var fs = __importStar(require("fs-extra"));
|
var fs = __importStar(require("fs-extra"));
|
||||||
|
var file_1 = require("./generateJson/file");
|
||||||
var paths = __importStar(require("./paths"));
|
var paths = __importStar(require("./paths"));
|
||||||
// Do this as the first thing so that any code reading it knows the right env.
|
// Do this as the first thing so that any code reading it knows the right env.
|
||||||
process.env.BABEL_ENV = "production";
|
process.env.BABEL_ENV = "production";
|
||||||
@@ -73,6 +74,13 @@ process.on("unhandledRejection", function (err) {
|
|||||||
});
|
});
|
||||||
fs.removeSync(paths.templateNodeModules);
|
fs.removeSync(paths.templateNodeModules);
|
||||||
fs.ensureSymlinkSync(paths.appNodeModules, paths.templateNodeModules);
|
fs.ensureSymlinkSync(paths.appNodeModules, paths.templateNodeModules);
|
||||||
|
try {
|
||||||
|
fs.statSync((0, file_1.radarPath)());
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.error("".concat((0, file_1.radarPath)(), " not found. Please create ").concat((0, file_1.radarPath)(), " and add your markdown files to build the techradar."));
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
var generateJson = function () { return __awaiter(void 0, void 0, void 0, function () {
|
var generateJson = function () { return __awaiter(void 0, void 0, void 0, function () {
|
||||||
var createRadar, save, radar;
|
var createRadar, save, radar;
|
||||||
return __generator(this, function (_a) {
|
return __generator(this, function (_a) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
import * as fs from "fs-extra";
|
import * as fs from "fs-extra";
|
||||||
|
|
||||||
|
import { radarPath } from "./generateJson/file";
|
||||||
import * as paths from "./paths";
|
import * as paths from "./paths";
|
||||||
|
|
||||||
// Do this as the first thing so that any code reading it knows the right env.
|
// Do this as the first thing so that any code reading it knows the right env.
|
||||||
@@ -17,6 +18,15 @@ process.on("unhandledRejection", (err) => {
|
|||||||
fs.removeSync(paths.templateNodeModules);
|
fs.removeSync(paths.templateNodeModules);
|
||||||
fs.ensureSymlinkSync(paths.appNodeModules, paths.templateNodeModules);
|
fs.ensureSymlinkSync(paths.appNodeModules, paths.templateNodeModules);
|
||||||
|
|
||||||
|
try {
|
||||||
|
fs.statSync(radarPath());
|
||||||
|
} catch (e) {
|
||||||
|
console.error(
|
||||||
|
`${radarPath()} not found. Please create ${radarPath()} and add your markdown files to build the techradar.`
|
||||||
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const generateJson = async () => {
|
const generateJson = async () => {
|
||||||
const { createRadar } = require("./generateJson/radar");
|
const { createRadar } = require("./generateJson/radar");
|
||||||
const { save } = require("./generateJson/file");
|
const { save } = require("./generateJson/file");
|
||||||
|
|||||||
Reference in New Issue
Block a user