Skip to content

Commit

Permalink
chore(release): v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kettei-sproutty committed Aug 17, 2024
1 parent 125bebe commit c6e44cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "colsys",
"version": "0.1.0",
"version": "0.1.1",
"description": "A light and zero-dependecy terminal string styling library",
"license": "(MIT OR Apache-2.0)",
"keywords": [
"colsys",
"colsys",
"color",
"colors",
"terminal",
"console",
"style",
"styles",
"format",
"format",
"log",
"text",
"terminal-colors",
Expand All @@ -21,7 +21,7 @@
"terminal-effects",
"color-toolkit",
"console-effects"
],
],
"files": [
"src",
"package.json",
Expand All @@ -39,8 +39,8 @@
"types": "./src/main.d.ts"
}
},
"scripts": {
"build": "node build.mjs",
"scripts": {
"release": "node release.mjs",
"format": "biome format --write",
"test": "vitest"
},
Expand Down
10 changes: 8 additions & 2 deletions build.mjs → release.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { execSync } from "node:child_process";
import { exec } from "node:child_process";
import fs from "node:fs";
import { promisify } from 'node:util'

const pkg = fs.readFileSync("package.json");
const packageJSON = JSON.parse(pkg);
Expand All @@ -9,6 +10,11 @@ packageJSON.devDependencies = undefined;

fs.writeFileSync("package.json", JSON.stringify(packageJSON, undefined, "\t"));

execSync("pnpm pack");
const execPromise = promisify(exec);

await execPromise("pnpm pack");
const { stdout } = await execPromise("pnpm publish --no-git-checks")

console.log(stdout);

fs.writeFileSync("package.json", pkg);

0 comments on commit c6e44cf

Please sign in to comment.