From 683a810a434e4b699a2b0a0ca91ba279979617c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9Fmur?= Date: Wed, 31 Jul 2024 14:22:27 +0300 Subject: [PATCH] cvdl-ts: package cvdl as a command line utility --- cvdl-ts/package.json | 53 +++++++++++++++++++----------------- cvdl-ts/src/cli/index.js | 3 ++ cvdl-ts/src/cli/package.json | 25 +++++++++++++++++ 3 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 cvdl-ts/src/cli/index.js create mode 100644 cvdl-ts/src/cli/package.json diff --git a/cvdl-ts/package.json b/cvdl-ts/package.json index 369989c..fd99ca5 100644 --- a/cvdl-ts/package.json +++ b/cvdl-ts/package.json @@ -1,27 +1,30 @@ { - "name": "cvdl-ts", - "version": "1.0.24", - "description": "Typescript Implementation of CVDL Compiler", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "files": ["/dist"], - "dependencies": { - "@types/blob-stream": "^0.1.32", - "@types/fontkit": "^2.0.5", - "@types/pdfkit": "^0.13.1", - "blob-stream": "^0.1.3", - "fontkit": "^2.0.2", - "marked": "^13.0.2", - "pdfkit": "^0.13.0", - "ts-pattern": "^5.2.0" - }, - "devDependencies": { - "@types/node": "^20.8.7", - "globals": "^15.8.0" - }, - "scripts": { - "build": "tsc", - "start": "ts-node src/index.ts", - "cli": "ts-node src/cli.ts" - } + "name": "cvdl-ts", + "version": "1.0.24", + "description": "Typescript Implementation of CVDL Compiler", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "/dist" + ], + "dependencies": { + "@types/blob-stream": "^0.1.32", + "@types/fontkit": "^2.0.5", + "@types/pdfkit": "^0.13.1", + "blob-stream": "^0.1.3", + "fontkit": "^2.0.2", + "marked": "^13.0.2", + "pdfkit": "^0.13.0", + "ts-pattern": "^5.2.0" + }, + "devDependencies": { + "@types/node": "^20.8.7", + "globals": "^15.8.0" + }, + "scripts": { + "build": "tsc", + "start": "ts-node src/index.ts", + "start:cli": "node src/cli/index.js", + "cli": "ts-node src/cli.ts" + } } diff --git a/cvdl-ts/src/cli/index.js b/cvdl-ts/src/cli/index.js new file mode 100644 index 0000000..ddafa56 --- /dev/null +++ b/cvdl-ts/src/cli/index.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +//** This executable file will have the commands for the CLI */ diff --git a/cvdl-ts/src/cli/package.json b/cvdl-ts/src/cli/package.json new file mode 100644 index 0000000..58b8376 --- /dev/null +++ b/cvdl-ts/src/cli/package.json @@ -0,0 +1,25 @@ +{ + "name": "cvdl-ts", + "version": "1.0.0", + "description": "A CLI tool for cvdl-ts", + "types": "dist/index.d.ts", + "bin": { + "cvdl-ts": "./index.js" + }, + "scripts": { + "build": "tsc", + "start": "node index.js" + }, + "keywords": [ + "cvdl-ts" + ], + "repository": { + "type": "git", + "url": "https://github.com/alpaylan/tail" + }, + "bugs": { + "url": "https://github.com/alpaylan/tail/issues" + }, + "license": "MIT", + "homepage": "https://github.com/alpaylan/tail" +}