Skip to content

Commit

Permalink
update readme and packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
GarretTomlin committed Sep 15, 2023
1 parent 45724d5 commit 3dad45a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/loud-items-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kysely-migrator": major
---

first release
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ npm install -g kysely-migrator

# Usage

`kysely-migrator-cli` is a **library** designed to assist you in creating your own migration script. It does aim to provide an executables command.
`kysely-migrator-cli` is a **library** designed to assist you in creating your own migration script. It does provides executables command.

To use create a json file call `migrator.json`

```json
{
"databaseUrl": "${DATABASE_URL}", // leave has is, there should be an env variable with the same name(your database connection)
"migrationFolder": "./src/database/migrations" // path to your migrations folder
"migrationFolder": "../../src/database/migrations" // path to your migrations folder
}
```

And it is that simple go straight ahead and create your migrations
`And it's that simple go straight ahead and create your migrations`

kysely-migrator migrator:create --name test
`kysely-migrator migrator:create --name test`


Output:
Expand Down
28 changes: 20 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,47 @@
{
"name": "kysely-migrator",
"module": "bin/migrator.ts",
"type": "module",
"devDependencies": {
"bun-types": "latest"
},
"module": "commonjs",
"main": "./src/bin/migrator.ts",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"build": "tsup src/**/*.ts --format cjs,esm --dts",
"release": "bun run build && changeset publish",
"release": "yarn run build && changeset publish",
"lint": "tsc",
"test": "jest",
"start": "ts-node"
},
"peerDependencies": {
"typescript": "^5.0.0",
"@changesets/cli": "^2.26.2"
"@changesets/cli": "^2.26.2",
"typescript": "^5.0.0"
},
"bin": {
"migrator": "./src/bin/migrator.ts"
},
"dependencies": {
"@changesets/cli": "^2.26.2",
"@types/pg": "^8.10.2",
"@types/yargs": "^17.0.24",
"changesets": "^1.0.2",
"commander": "^11.0.0",
"dotenv": "^16.3.1",
"gluegun": "^5.1.3",
"install": "^0.13.0",
"jest-mock-console": "^2.0.0",
"kysely": "^0.26.3",
"pg": "^8.11.3",
"pg-promise": "^11.5.4",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"yargs": "^17.7.2"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@types/jest": "^29.5.4",
"jest": "^29.7.0"
}
}

0 comments on commit 3dad45a

Please sign in to comment.