Skip to content

Commit

Permalink
add build script for dynamo observables
Browse files Browse the repository at this point in the history
  • Loading branch information
im6 committed Jan 23, 2024
1 parent 9fd7e09 commit 273d79d
Show file tree
Hide file tree
Showing 4 changed files with 1,439 additions and 1,653 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@types/jest": "^29.5.1",
"@types/node": "^20.2.5",
"dotenv": "^16.0.3",
"dynamodb-observables": "^1.0.0",
"eslint": "^8.41.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
Expand Down
6 changes: 4 additions & 2 deletions packages/crawler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const siteData$ = getSiteData$();
const githubData$ = getGithubData$();

githubData$.subscribe({
next: ([d0, d1]) => {
next: (res: any) => {
const [d0, d1] = res;
const cateMap = generateCateMap(d0);
const data = groupGithub(d1, cateMap);
fs.writeFile(
Expand All @@ -37,7 +38,8 @@ githubData$.subscribe({
});

siteData$.subscribe({
next: ([grps, sites]) => {
next: (res: any) => {
const [grps, sites] = res;
const siteList = groupSite(sites, grps);
fs.writeFile(
resolve(process.cwd(), '../../', siteJsonPath),
Expand Down
5 changes: 4 additions & 1 deletion packages/dynamodb-observables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"license": "MIT",
"version": "1.0.0",
"main": "dist/index.js",
"types": "dist/index.d.ts"
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc"
}
}
Loading

0 comments on commit 273d79d

Please sign in to comment.