Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitavoloboev committed Sep 17, 2023
1 parent c9ad9bc commit ae413c9
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 10 deletions.
1 change: 1 addition & 0 deletions cli/cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

13 changes: 13 additions & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "bun-scripts",
"scripts": {
"dev": "bun --watch cli.ts"
},
"license": "MIT",
"devDependencies": {
"bun-types": "^0.5.0"
},
"prettier": {
"semi": false
}
}
5 changes: 5 additions & 0 deletions cli/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Run

```
bun dev
```
5 changes: 5 additions & 0 deletions cli/todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- will be bound to `:`
- `:` alone will fzf search through package.json scripts to run
- `: <cmd>` does bun command
- check if ## Commands exists in readme, if yes take the description too so it shows command plus what command does
- use CLI libs I saved in Telegram saved messsages
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
{
"name": "@nikiv/ts",
"license": "MIT",
"version": "0.0.1",
"type": "module",
"name": "ts",
"scripts": {
"dev": "tput reset && bun --watch run.ts",
"build": "tsup lib/file.ts --format esm --dts",
"test:watch": "bun test --watch",
"node": "tput reset && tsx run.ts"
},
"main": "dist/file.js",
"types": "file.d.ts",
"devDependencies": {
"bun-types": "^0.5.0"
},
"prettier": {
"semi": false
},
"dependencies": {
"@clack/core": "^0.2.0",
"@clack/prompts": "^0.5.0",
Expand All @@ -43,5 +35,8 @@
"tsup": "^7.2.0",
"ufo": "^1.3.0",
"zx": "^7.1.1"
},
"prettier": {
"semi": false
}
}
26 changes: 26 additions & 0 deletions packages/util/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "@nikitavoloboev/util",
"scripts": {
"dev": "bun test --watch",
"build": "tsup src/index.ts --format esm --dts"
},
"type": "module",
"version": "0.0.1",
"publishConfig": {
"access": "public"
},
"exports": {
".": "./dist/index.js"
},
"files": [
"./dist",
"./src"
],
"license": "MIT",
"devDependencies": {
"bun-types": "^0.5.0"
},
"prettier": {
"semi": false
}
}
21 changes: 21 additions & 0 deletions packages/util/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Util

> Random useful code for my projects.
## Run tests

```
bun dev
```

## Build

```
bun run build
```

## Publish new version to NPM

```
npm publish --access=public
```
File renamed without changes.
1 change: 0 additions & 1 deletion lib/file.ts → packages/util/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { promises as fs } from "fs"
import path from "path"
import os from "os"


// take in JSON of some kind and write it to ~/src/data
// returns path of file on success
export async function writeContentToSrcData(
Expand Down
1 change: 1 addition & 0 deletions packages/util/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { writeContentToSrcData, writeContentToDesktopFile } from "./file"
8 changes: 8 additions & 0 deletions todo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
- setup turbo and do proper code sharing
- for some reason `bun run build` that uses `tsup` fails with error, fix it
- make publishing to npm smooth and automated, check out [bump](https://github.com/fabiospampinato/bump)

## Try

Expand All @@ -15,3 +17,9 @@
- https://github.com/vadimdemedes/pastel
- https://github.com/vadimdemedes/ink-ui
- https://github.com/theseyan/bkg

## Better npm publishing

- inspiration
- https://github.com/inlang/monorepo/blob/main/inlang/source-code/result/package.json
- https://github.com/thetarnav/nothing-but/tree/main/packages

0 comments on commit ae413c9

Please sign in to comment.