From f144307a41a542fd9e75aa51522ee5c5f57925a4 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 3 Dec 2019 11:32:19 +0100 Subject: Fix parsing order --- lib/getPosts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/getPosts.ts b/lib/getPosts.ts index 38e419c..c363c67 100644 --- a/lib/getPosts.ts +++ b/lib/getPosts.ts @@ -4,13 +4,13 @@ import { readDir } from "./utils"; function getPosts(path: string): Array { let routesArray: Post[] = []; - const years = readDir(`${path}`); + const years = readDir(`${path}`).reverse(); years.forEach((year: string) => { - const months = readDir(`${path}/${year}`); + const months = readDir(`${path}/${year}`).reverse(); months.forEach((month: string) => { - const days = readDir(`${path}/${year}/${month}`); + const days = readDir(`${path}/${year}/${month}`).reverse(); days.forEach((day: string) => { - const files = readDir(`${path}/${year}/${month}/${day}`); + const files = readDir(`${path}/${year}/${month}/${day}`).reverse(); files.forEach((file: string) => { const fsRoute = `${path}/${year}/${month}/${day}/${file}`; try { -- cgit 1.4.1 From 4fa984027fca682f7ec67020833a59a3dd8b7c97 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Tue, 3 Dec 2019 11:36:30 +0100 Subject: Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a63af7..455c939 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kronikarz", - "version": "1.0.1", + "version": "1.1.0", "description": "System elektronicznej kroniki", "main": "dist/index.js", "types": "dist/index.d.ts", -- cgit 1.4.1