Skip to content

Commit

Permalink
feat: add basic example command
Browse files Browse the repository at this point in the history
  • Loading branch information
k2on committed Oct 26, 2024
1 parent e503909 commit a0f332e
Show file tree
Hide file tree
Showing 39 changed files with 2,359 additions and 402 deletions.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"useTabs": false
}
8 changes: 0 additions & 8 deletions apps/docs/.eslintrc.js

This file was deleted.

5 changes: 0 additions & 5 deletions apps/docs/next-env.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions apps/docs/next.config.js

This file was deleted.

28 changes: 0 additions & 28 deletions apps/docs/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions apps/docs/src/app/layout.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions apps/docs/src/app/page.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/docs/tsconfig.json

This file was deleted.

15 changes: 15 additions & 0 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@example/basic",
"private": true,
"version": "1.0.0",
"main": "./index.ts",
"scripts": {
"start": "tsx ./src/index.ts"
},
"dependencies": {
"@koons/cli": "*"
},
"devDependencies": {
"tsx": "^4.19.1"
}
}
6 changes: 6 additions & 0 deletions examples/basic/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { cli } from "@koons/cli";

cli({
help: () => console.log("Help command"),
version: () => console.log("Version 1.0"),
}).run();
53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
{
"private": true,
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"clean": "turbo clean && rm -rf node_modules",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo build --filter=docs^... && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"turbo": "^2.2.3"
},
"engines": {
"node": ">=18"
},
"name": "with-changesets",
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
"packages/*"
]
"private": true,
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"clean": "turbo clean && rm -rf node_modules",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo build --filter=docs^... && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"turbo": "^2.2.3"
},
"engines": {
"node": ">=18"
},
"name": "with-changesets",
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
"packages/*",
"examples/*"
]
}
8 changes: 0 additions & 8 deletions packages/acme-core/.eslintrc.js

This file was deleted.

33 changes: 0 additions & 33 deletions packages/acme-core/package.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages/acme-core/src/Button.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/acme-core/src/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/acme-core/tsconfig.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/acme-core/tsup.config.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/acme-utils/.eslintrc.js

This file was deleted.

33 changes: 0 additions & 33 deletions packages/acme-utils/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/acme-utils/src/index.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions packages/acme-utils/src/toSlug.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/acme-utils/src/useIsomorphicLayoutEffect.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions packages/acme-utils/src/usePrevious.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/acme-utils/tsconfig.json

This file was deleted.

29 changes: 29 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@koons/cli",
"version": "0.0.0",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"sideEffects": false,
"license": "MIT",
"files": [
"dist/**"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs",
"dev": "tsup src/index.ts --format esm,cjs --watch",
"lint": "eslint \"src/**/*.ts*\"",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"devDependencies": {
"@koons/tsconfig": "*",
"tsup": "^8.0.2",
"typescript": "5.5.4"
},
"dependencies": {
"react": "^18.2.0"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit a0f332e

Please sign in to comment.