We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ec00c2 commit cbd4df5Copy full SHA for cbd4df5
cpkernel/src/resolver_local.js
@@ -215,6 +215,23 @@ export function getResolvers(appDir) {
215
// await convertLocal(path.join(appDir, name, ".pods"));
216
// }
217
let dir = path.join(appDir, name, ".pods");
218
+ if (!fs.existsSync(dir)) {
219
+ // This is a folder, without .pods. So init it.
220
+ await fs.promises.mkdir(dir, {
221
+ recursive: true,
222
+ });
223
+ // create ROOT.json
224
+ let root = {
225
+ id: "ROOT",
226
+ type: "DECK",
227
+ ns: "ROOT",
228
+ children: [],
229
+ };
230
+ await fs.promises.writeFile(
231
+ path.join(dir, "ROOT.json"),
232
+ JSON.stringify(root, null, 2)
233
+ );
234
+ }
235
let jsons = await fs.promises.readdir(dir);
236
let podlst = [];
237
for (let jsonfile of jsons) {
0 commit comments