Skip to content

Commit

Permalink
bump(client): 1.0.1 -> 1.0.2
Browse files Browse the repository at this point in the history
feat: model construction for blogpage, etc
  • Loading branch information
hUwUtao committed May 27, 2024
1 parent db516e5 commit c7b2d0c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
14 changes: 14 additions & 0 deletions blog/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Model, Context } from "..";

const blogPageFields = ["date", "thumb", "intro", "body"];

export const BlogPage = (ctx: Context) =>
new Model<
typeof blogPageFields,
{
date: Date;
thumb: string;
intro: string;
body: string;
}
>(ctx, "blog.BlogPage");
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ export class Model<K extends string[], T extends ModelData<K>> {
return fetch(this.requestBuilder(options)).then((ok) => ok.json());
}
}

import { BlogPage } from "./blog/models";
export { BlogPage };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@team-fuho/wt",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"outDir": "./dist"
},
"include": ["**/*"],
"exclude": ["**/*.spec.ts"]
"exclude": ["**/*.spec.ts", "dist/**/*"]
}

0 comments on commit c7b2d0c

Please sign in to comment.