mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 23:46:03 +01:00
refactor(package): import shared and declare cache in server/client
This commit is contained in:
@@ -1,9 +1,5 @@
|
|||||||
import * as lib from './resource';
|
import * as lib from './resource';
|
||||||
import { cache, onCache } from '../shared/resource';
|
|
||||||
|
|
||||||
cache.playerId = PlayerId();
|
|
||||||
cache.serverId = GetPlayerServerId(cache.playerId);
|
|
||||||
|
|
||||||
export { cache, onCache };
|
|
||||||
export * from './resource';
|
export * from './resource';
|
||||||
|
export * from '../shared';
|
||||||
export default lib;
|
export default lib;
|
||||||
|
|||||||
6
package/client/resource/cache/index.ts
vendored
Normal file
6
package/client/resource/cache/index.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import { cache, onCache } from '../../../shared';
|
||||||
|
|
||||||
|
cache.playerId = PlayerId();
|
||||||
|
cache.serverId = GetPlayerServerId(cache.playerId);
|
||||||
|
|
||||||
|
export { cache, onCache };
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import * as lib from './resource';
|
import * as lib from './resource';
|
||||||
import { cache, onCache } from '../shared/resource';
|
|
||||||
export * from './resource';
|
|
||||||
|
|
||||||
|
export * from './resource';
|
||||||
|
export * from '../shared';
|
||||||
export default lib;
|
export default lib;
|
||||||
export { cache, onCache };
|
|
||||||
|
|||||||
3
package/server/resource/cache/index.ts
vendored
Normal file
3
package/server/resource/cache/index.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import { cache, onCache } from '../../../shared';
|
||||||
|
|
||||||
|
export { cache, onCache };
|
||||||
@@ -1,4 +1 @@
|
|||||||
import * as lib from './resource';
|
|
||||||
export * from './resource';
|
export * from './resource';
|
||||||
|
|
||||||
export default lib;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user