feat: stub registry

This commit is contained in:
cha0s 2019-05-21 21:10:32 -05:00
parent cc01b4c9ce
commit 64fb810965

View File

@ -1,9 +1,14 @@
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
import {globalRegistry, Resource} from '@avocado/resource';
const RESOURCE_PATH = path.resolve(process.cwd(), 'resource'); const RESOURCE_PATH = path.resolve(process.cwd(), 'resource');
function writeFixture(uri, json) { function writeFixture(uri, json) {
// const uuid = Resource.uuid();
// json.uuid = uuid;
// globalRegistry.register(uri, uuid);
fs.writeFileSync(path.join(RESOURCE_PATH, uri), JSON.stringify(json)); fs.writeFileSync(path.join(RESOURCE_PATH, uri), JSON.stringify(json));
} }
@ -23,3 +28,6 @@ writeFixture('mama-kitty.entity.json', mamaKittyJSON());
// Write rooms. // Write rooms.
import {kittyFireJSON} from './fixtures/kitty-fire.room'; import {kittyFireJSON} from './fixtures/kitty-fire.room';
writeFixture('kitty-fire.room.json', kittyFireJSON()); writeFixture('kitty-fire.room.json', kittyFireJSON());
// Flush registry.
// globalRegistry.flush();