Skip to content

Commit

Permalink
Merge pull request #60 from Ubugeeei/7-publish
Browse files Browse the repository at this point in the history
#7 publish
  • Loading branch information
ubugeeei authored Oct 18, 2023
2 parents dcdb279 + 1abfc95 commit c16db13
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@example/tools",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"scripts": {
"tecack": "node ../../packages/tools/bin/bin.js",
"codegen": "node ../../packages/tools/bin/bin.js codegen",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tecack",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"type": "module",
"description": "",
"keywords": [],
Expand All @@ -21,6 +21,7 @@
},
"scripts": {
"prepare": "husky install",
"deploy": "sh scripts/deploy.sh",
"build": "pnpm run bundle && pnpm run build:dts",
"bundle": "node scripts/build.js",
"build:dts": "rm -rf temp && tsc -p tsconfig.build.json && node scripts/dts.js && rm -rf temp",
Expand Down
21 changes: 18 additions & 3 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"name": "@tecack/backend",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"description": "@tecack/backend",
"main": "dist/index.js",
"keywords": [],
"author": "Ubugeeei <ubuge1122@gmail.com>",
"license": "MIT"
"license": "MIT",
"keywords": [
"typescript",
"hand writing recognition",
"hand writing",
"kanji",
"japanese"
],
"homepage": "https://ubugeeei.github.io/tecack",
"repository": {
"type": "git",
"url": "https://github.com/Ubugeeei/tecack.git",
"directory": "packages/backend"
},
"files": [
"dist"
]
}
21 changes: 18 additions & 3 deletions packages/dataset/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"name": "@tecack/dataset",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"description": "",
"main": "dist/index.js",
"keywords": [],
"author": "Ubugeeei <ubuge1122@gmail.com>",
"license": "MIT"
"license": "MIT",
"keywords": [
"typescript",
"hand writing recognition",
"hand writing",
"kanji",
"japanese"
],
"homepage": "https://ubugeeei.github.io/tecack",
"repository": {
"type": "git",
"url": "https://github.com/Ubugeeei/tecack.git",
"directory": "packages/dataset"
},
"files": [
"dist"
]
}
21 changes: 18 additions & 3 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"name": "@tecack/frontend",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"description": "",
"main": "dist/index.js",
"keywords": [],
"author": "Ubugeeei <ubuge1122@gmail.com>",
"license": "MIT"
"license": "MIT",
"keywords": [
"typescript",
"hand writing recognition",
"hand writing",
"kanji",
"japanese"
],
"homepage": "https://ubugeeei.github.io/tecack",
"repository": {
"type": "git",
"url": "https://github.com/Ubugeeei/tecack.git",
"directory": "packages/frontend"
},
"files": [
"dist"
]
}
21 changes: 18 additions & 3 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"name": "@tecack/shared",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"description": "",
"main": "dist/index.js",
"keywords": [],
"author": "Ubugeeei <ubuge1122@gmail.com>",
"license": "MIT"
"license": "MIT",
"keywords": [
"typescript",
"hand writing recognition",
"hand writing",
"kanji",
"japanese"
],
"homepage": "https://ubugeeei.github.io/tecack",
"repository": {
"type": "git",
"url": "https://github.com/Ubugeeei/tecack.git",
"directory": "packages/shared"
},
"files": [
"dist"
]
}
21 changes: 18 additions & 3 deletions packages/tecack/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
{
"name": "tecack",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"description": "tecack is a simple drawing library for the web.",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Ubugeeei <ubuge1122@gmail.com>",
"license": "ISC"
"license": "ISC",
"keywords": [
"typescript",
"hand writing recognition",
"hand writing",
"kanji",
"japanese"
],
"homepage": "https://ubugeeei.github.io/tecack",
"repository": {
"type": "git",
"url": "https://github.com/Ubugeeei/tecack.git",
"directory": "packages/tecack"
},
"files": [
"dist"
]
}
18 changes: 17 additions & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
{
"name": "@tecack/tools",
"version": "0.0.1",
"version": "0.0.1-alpha.7",
"description": "@tecack/tools",
"bin": {
"tecack": "./bin/bin.js"
},
"author": "Ubugeeei <ubuge1122@gmail.com>",
"license": "MIT",
"keywords": [
"typescript",
"hand writing recognition",
"hand writing",
"kanji",
"japanese"
],
"homepage": "https://ubugeeei.github.io/tecack",
"repository": {
"type": "git",
"url": "https://github.com/Ubugeeei/tecack.git",
"directory": "packages/tools"
},
"files": [
"bin"
],
"dependencies": {
"adm-zip": "^0.5.10",
"citty": "^0.1.4",
Expand Down
9 changes: 9 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ export const buildCli = async () => {
target: "node18",
platform: "node",
});
// write shebang
const shebang = "#!/usr/bin/env node";
fs.writeFileSync(
path.resolve(`${CLI_OUT_DIR}/bin.js`),
`${shebang}\n${fs.readFileSync(path.resolve(`${CLI_OUT_DIR}/bin.js`))}`,
);
finishedBuild(CLI_OUT_DIR);

// copy jTegaki.zip
Expand Down Expand Up @@ -58,7 +64,10 @@ export const buildTecack = () =>
const res = esbuild.build({
entryPoints: [path.resolve(`packages/${pkg}/src/index`)],
bundle: true,
minify: true,
target: "es2018",
outdir: `packages/${pkg}/dist`,
format: "esm",
});
res.then(() => finishedBuild(`packages/${pkg}/dist`));
return res;
Expand Down
11 changes: 11 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pnpm publish packages/tecack --access=public

pnpm publish packages/frontend --access=public

pnpm publish packages/backend --access=public

pnpm publish packages/dataset --access=public

pnpm publish packages/shared --access=public

pnpm publish packages/tools --access=public

0 comments on commit c16db13

Please sign in to comment.