File tree Expand file tree Collapse file tree 6 files changed +42
-17
lines changed Expand file tree Collapse file tree 6 files changed +42
-17
lines changed Original file line number Diff line number Diff line change
1
+ # https://taskfile.dev
2
+
3
+ version : ' 3'
4
+
5
+ tasks :
6
+ build:posts :
7
+ silent : true
8
+ dir : data
9
+ cmds :
10
+ - npm run build:posts
11
+
12
+ build:rss :
13
+ silent : true
14
+ dir : data
15
+ cmds :
16
+ - npm run build:rss
17
+
18
+ build:frontend :
19
+ silent : true
20
+ dir : frontend
21
+ cmds :
22
+ - npm run build
23
+
24
+ run:frontend :
25
+ silent : true
26
+ dir : frontend
27
+ cmds :
28
+ - npm run dev
29
+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- // import { config } from '$lib/config.json';
2
1
import {
3
2
PUBLIC_DATASOURCE_TYPE ,
4
3
PUBLIC_DATASOURCE ,
5
- PUBLIC_LOGGING_ENABLED
6
4
} from '$env/static/public' ;
7
5
6
+ import { log } from '$lib/utils/logger.js' ;
7
+
8
8
9
9
let POSTS_CACHE = null ;
10
10
@@ -18,7 +18,7 @@ export const getPosts = (fetch) => {
18
18
} ;
19
19
20
20
if ( PUBLIC_DATASOURCE_TYPE == 'local' ) {
21
- return import ( '../posts.json' ) . then ( posts => {
21
+ return import ( '../../ posts.json' ) . then ( posts => {
22
22
POSTS_CACHE = posts . default
23
23
} ) . then ( ( ) => POSTS_CACHE ) ;
24
24
}
@@ -30,10 +30,3 @@ export const getPosts = (fetch) => {
30
30
} )
31
31
. then ( ( ) => POSTS_CACHE ) ;
32
32
} ;
33
-
34
-
35
- export const log = ( obj , message ) => {
36
- if ( PUBLIC_LOGGING_ENABLED == 'true' ) {
37
- console . log ( `${ obj } => ${ message } ` )
38
- }
39
- } ;
Original file line number Diff line number Diff line change
1
+ import { PUBLIC_LOGGING_ENABLED } from '$env/static/public' ;
2
+
3
+
4
+ export const log = ( obj , message ) => {
5
+ if ( PUBLIC_LOGGING_ENABLED == 'true' ) {
6
+ console . log ( `${ obj } => ${ message } ` )
7
+ }
8
+ } ;
Original file line number Diff line number Diff line change 1
- import { getPosts } from '$lib/helpers .js' ;
1
+ import { getPosts } from '$lib/utils/loader .js' ;
2
2
3
3
4
4
export const load = ( { fetch} ) => {
Original file line number Diff line number Diff line change 1
- import { getPosts } from '$lib/helpers .js' ;
1
+ import { getPosts } from '$lib/utils/loader .js' ;
2
2
3
3
4
4
export const load = ( { fetch, params} ) => {
You can’t perform that action at this time.
0 commit comments