about summary refs log tree commit diff
path: root/scripts/generateApi.js
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-01-29 12:31:13 +0100
committerGitHub <noreply@github.com>2020-01-29 12:31:13 +0100
commitb424c1ce5573f72e36fcca00ef22e4b2f3dde9ff (patch)
treeff1d1de74e1b165a36d7804a49a3692e6cbea289 /scripts/generateApi.js
parent13c55f4d5fca3e3452317322e387f75e0690f9c8 (diff)
parent3e5f329cd8c9692e24f5fd56a5e4189bf2202e0d (diff)
downloadpuszcza-b424c1ce5573f72e36fcca00ef22e4b2f3dde9ff.tar.gz
puszcza-b424c1ce5573f72e36fcca00ef22e4b2f3dde9ff.zip
Merge pull request #27 from 19pdh/develop
Develop
Diffstat (limited to 'scripts/generateApi.js')
-rwxr-xr-xscripts/generateApi.js26
1 files changed, 0 insertions, 26 deletions
diff --git a/scripts/generateApi.js b/scripts/generateApi.js
deleted file mode 100755
index 4b7426a..0000000
--- a/scripts/generateApi.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import fs from 'fs'
-import k from '../api'
-
-let posts = k.getPosts()
-
-posts = posts.map(({ date, title, content, route }) => {
-  const { year, month, day } = date
-  const { description, meta } = content
-
-  return {
-    date: `${year}-${month}-${day}`,
-    title,
-    content: { description, meta },
-    route
-  }
-})
-
-fs.writeFile('./dist/api/posts.json', JSON.stringify(posts), err =>
-  err ? console.log(err) : null
-)
-
-fs.writeFile('./static/api/posts.json', JSON.stringify(posts), err =>
-  err ? console.log(err) : null
-)
-
-console.log(posts)