mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 18:29:23 +02:00
refactor(struct): split into separate package
This commit is contained in:
parent
03182c77c3
commit
c2e167b647
10 changed files with 75 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
"dependencies": {
|
||||
"@yume-chan/async-operation-manager": "^2.0.0",
|
||||
"@yume-chan/event": "^0.0.1",
|
||||
"@yume-chan/struct": "^0.0.0",
|
||||
"tslib": "^2.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { AutoDisposable } from '@yume-chan/event';
|
||||
import { Struct, StructInitType, StructValueType } from '@yume-chan/struct';
|
||||
import { AdbBufferedStream } from './buffered-stream';
|
||||
import { AdbStream } from './stream';
|
||||
import { AutoResetEvent, Struct, StructInitType, StructValueType } from './utils';
|
||||
import { AutoResetEvent } from './utils';
|
||||
|
||||
export enum AdbSyncRequestId {
|
||||
List = 'LIST',
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export * from './auto-reset-event';
|
||||
export * from './base64';
|
||||
export * from './event-iterator';
|
||||
export * from './struct';
|
||||
export { default as Struct } from './struct';
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
"references": [
|
||||
{
|
||||
"path": "../event/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "../struct/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
11
packages/struct/README.md
Normal file
11
packages/struct/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# `struct`
|
||||
|
||||
> TODO: description
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
const struct = require('struct');
|
||||
|
||||
// TODO: DEMONSTRATE API
|
||||
```
|
19
packages/struct/package-lock.json
generated
Normal file
19
packages/struct/package-lock.json
generated
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "@yume-chan/struct",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"tslib": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
|
||||
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz",
|
||||
"integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
30
packages/struct/package.json
Normal file
30
packages/struct/package.json
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "@yume-chan/struct",
|
||||
"version": "0.0.0",
|
||||
"description": "Easy to use C structure serializer and deserializer",
|
||||
"keywords": [
|
||||
"structure",
|
||||
"typescript"
|
||||
],
|
||||
"author": "Simon Chan <cnsimonchan@live.com>",
|
||||
"homepage": "https://github.com/yume-chan/ya-webadb#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/yume-chan/ya-webadb.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -b",
|
||||
"build:watch": "tsc -b -w"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/yume-chan/ya-webadb/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "4.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.0.1"
|
||||
}
|
||||
}
|
2
packages/struct/src/index.ts
Normal file
2
packages/struct/src/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
|||
export * from './struct';
|
||||
export { default as Struct } from './struct';
|
7
packages/struct/tsconfig.json
Normal file
7
packages/struct/tsconfig.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib", // /* Redirect output structure to the directory. */
|
||||
"rootDir": "./src", // /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue