Fixing some small things. And making some design decisions.
This commit is contained in:
parent
d5cfdcadc1
commit
cc6035eef0
@ -1,4 +1,4 @@
|
|||||||
import "./import.binc";
|
import "./import";
|
||||||
|
|
||||||
enum TestEnum {
|
enum TestEnum {
|
||||||
VAL1,
|
VAL1,
|
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/SimpleRPC",
|
"name": "@hibas123/jrpcgen",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"packageManager": "yarn@3.1.1",
|
"packageManager": "yarn@3.1.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "ts-node src/index.ts",
|
"start": "ts-node src/index.ts",
|
||||||
"test": "npm run start -- compile examples/example.binc -o=ts-node:examples/out && ts-node examples/test.ts"
|
"test": "npm run start -- compile examples/example.jrpc -o=ts-node:examples/out && ts-node examples/test.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/debug": "^4.1.7",
|
"@types/debug": "^4.1.7",
|
||||||
|
@ -96,7 +96,7 @@ function processFile(ctx: ProcessContext, file: string): Parsed | null {
|
|||||||
.map((statement) => {
|
.map((statement) => {
|
||||||
if (statement.type == "import") {
|
if (statement.type == "import") {
|
||||||
const base = Path.dirname(file);
|
const base = Path.dirname(file);
|
||||||
const resolved = Path.resolve(Path.join(base, statement.path));
|
const resolved = Path.resolve(Path.join(base, statement.path + ".jrpc"));
|
||||||
return processFile(ctx, resolved);
|
return processFile(ctx, resolved);
|
||||||
} else {
|
} else {
|
||||||
return statement;
|
return statement;
|
||||||
|
Loading…
Reference in New Issue
Block a user