about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-14 21:57:50 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-14 21:57:50 +0200
commit4fe5fef70b111ab0e10d91ee7060302a52ca3b76 (patch)
treeb0d93c439bd9050938344cf4534a1ff4b4e3cc55 /scripts
parentccb84eca016c8b81c074f17f188f4df47fa770ce (diff)
downloadpuszcza-4fe5fef70b111ab0e10d91ee7060302a52ca3b76.tar.gz
puszcza-4fe5fef70b111ab0e10d91ee7060302a52ca3b76.zip
Revert "Add kronikarz"
This reverts commit d400b53bee9ba563810171c217710d4176b7c367.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generateApi.js12
-rwxr-xr-xscripts/postbuild.sh2
2 files changed, 6 insertions, 8 deletions
diff --git a/scripts/generateApi.js b/scripts/generateApi.js
index f72745e..128387c 100755
--- a/scripts/generateApi.js
+++ b/scripts/generateApi.js
@@ -1,16 +1,14 @@
-import fs from 'fs'
-import k from '../api'
+const fs = require('fs')
 
-let posts = k.getPosts()
+let { getPosts } = require('../api/api')
 
-posts = posts.map(({ date, title, content, route }) => {
-  const { year, month, day } = date
-  const { description, meta } = content
+let posts = getPosts()
 
+posts = posts.map(({ year, month, day, title, data, route }) => {
   return {
     date: `${year}-${month}-${day}`,
     title,
-    content: { description, meta },
+    data,
     route
   }
 })
diff --git a/scripts/postbuild.sh b/scripts/postbuild.sh
index 85e35f9..749bfdd 100755
--- a/scripts/postbuild.sh
+++ b/scripts/postbuild.sh
@@ -2,5 +2,5 @@
 
 mkdir ./dist/api
 
-node -r esm ./scripts/generateApi.js
+node ./scripts/generateApi.js