File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 55 "scripts" : {
66 "test" : " echo \" Error: no test specified\" && exit 1" ,
77 "build" : " node dist/build.js" ,
8+ "render" : " node dist/render.js" ,
89 "postinstall" : " npx tsc"
910 },
1011 "repository" : {
Original file line number Diff line number Diff line change 1+ import { Card } from './trello/api'
2+ import * as path from 'path'
3+ import { readFromFileCache } from './cache/cache-to-file'
4+ import { render } from './website/render'
5+
6+ const srcDir = path . join ( __dirname , '..' , 'src' )
7+ const webDir = path . join ( __dirname , '..' , 'web' )
8+ const cacheLocation = path . join ( webDir , 'cards.json' )
9+ const readCachedCards = readFromFileCache < Card [ ] > ( cacheLocation )
10+
11+ readCachedCards ( )
12+ . then ( cards =>
13+ render ( {
14+ cards,
15+ webDir,
16+ srcDir,
17+ } ) ,
18+ )
19+ . then ( ( ) => {
20+ console . log ( 'website generated successfully' )
21+ } )
22+ . catch ( error => {
23+ console . error ( error )
24+ process . exit ( 1 )
25+ } )
You can’t perform that action at this time.
0 commit comments