From b4ab74f07b253f4658f667bfe68568911d92b827 Mon Sep 17 00:00:00 2001 From: Suphakit P Date: Fri, 11 Oct 2024 01:03:51 +0700 Subject: [PATCH] feat: added packaging tools --- .gitignore | 6 +++++- package.json | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 430cbc6..186752e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ /.vscode /node_modules -.DS_Store \ No newline at end of file +.DS_Store +dist + +pnpm-lock.yaml +yarn.lock \ No newline at end of file diff --git a/package.json b/package.json index 916a8e9..52661d9 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,29 @@ "fs": "^0.0.1-security", "os": "^0.1.2", "path": "^0.12.7", + "pkg": "^5.8.1", "yargs": "^17.2.1" }, "scripts": { - "dev": "node ./bin/cli.js" + "dev": "node ./bin/cli.js", + "build": "pkg ." }, "bin": { "d-mark": "./bin/cli.js" + }, + "pkg": { + "scripts": "bin/**/*.js", + "targets": [ + "node18-macos-arm64", + "node18-windows-arm64", + "node18-linux-arm64", + "node18-macos-x64", + "node18-windows-x64", + "node18-linux-x64" + ], + "options": [ + "experimental-modules" + ], + "outputPath": "dist" } }