Skip to content

Commit

Permalink
improve clis, simplify tsconfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhouston committed Jun 19, 2023
1 parent 8ce3449 commit adb7543
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"eslint.probe": ["javascript", "javascriptreact", "typescript","json"],
"eslint.probe": ["javascript", "javascriptreact", "typescript", "json"],
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"cSpell.words": [
Expand All @@ -9,6 +9,7 @@
"interruptible",
"lerp",
"Nullary",
"outfile",
"reserialization",
"reserialized",
"Slerp",
Expand Down
2 changes: 1 addition & 1 deletion apps/exec-graph/bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

import { main } from '../dist/index.js';
const { main } = require('../dist/index.js');

main();
1 change: 0 additions & 1 deletion apps/exec-graph/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "exec-graph",
"version": "0.0.1",
"type": "module",
"bin": "./bin/cli.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.js",
Expand Down
5 changes: 4 additions & 1 deletion apps/exec-graph/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
} from '@behave-graph/core';
import { program } from 'commander';

import { name, version } from '../package.json';

type ProgramOptions = {
upgrade?: boolean;
trace?: boolean;
Expand Down Expand Up @@ -131,7 +133,8 @@ async function execGraph({

export const main = async () => {
program
.name('exec-graph')
.name(name)
.version(version)
.argument('<filename>', 'path to the behavior-graph json to execute')
.option('-t, --trace', `trace node execution`)
.option('-p, --profile', `profile execution time`)
Expand Down
1 change: 0 additions & 1 deletion apps/exec-graph/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
2 changes: 1 addition & 1 deletion apps/export-node-spec/bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node

import { main } from '../dist/index.js';
const { main } = require('../dist/index.js');

main();
1 change: 0 additions & 1 deletion apps/export-node-spec/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "export-node-spec",
"version": "0.0.1",
"type": "module",
"bin": "./bin/cli.js",
"types": "./dist/index.d.ts",
"module": "./dist/index.js",
Expand Down
5 changes: 4 additions & 1 deletion apps/export-node-spec/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ import {
import { program } from 'commander';
import { stringify } from 'csv-stringify';

import { name, version } from '../package.json';

export const main = async () => {
// Logger.onVerbose.clear();

program
.name('exec-graph')
.name(name)
.version(version)
.argument('<filename>', 'path to the output node-spec json export')
.option('-c, --csv', `output in CSV mode`);

Expand Down
1 change: 0 additions & 1 deletion apps/export-node-spec/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
1 change: 0 additions & 1 deletion apps/graph-editor/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"jsx": "react-jsx"
}
Expand Down
1 change: 0 additions & 1 deletion apps/three-viewer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"jsx": "react-jsx"
}
Expand Down
1 change: 0 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
}
}
1 change: 0 additions & 1 deletion packages/flow/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"jsx": "react-jsx"
}
Expand Down

0 comments on commit adb7543

Please sign in to comment.