Added some debugging to webpack

This commit is contained in:
Jesper Wrang 2018-01-16 01:35:12 +01:00
parent 9bab14ffcb
commit 3a327f008f
2 changed files with 5 additions and 3 deletions

View file

@ -36,7 +36,6 @@ const handleThreadComment = (comment, results) => {
}
const handleMoreChildren = (results, threadID) => (
// console.log(results.morechildrenIDs.map(idArray => idArray))
Promise.all(results.morechildrenIDs.map(idArray =>
fetchMultiple(`https://oauth.reddit.com/api/morechildren?link_id=t3_${threadID}&children=`, idArray, redditAuth)))
.then(responsesArrays => Promise.all(responsesArrays.map(jsonMultiple)))
@ -79,8 +78,8 @@ const handleThread = thread => {
const { subreddit, id: threadID } = extractPost(thread)
return Promise.all([
...results.continueThisThreadIDs.map(id => getThread(subreddit, threadID, id)),
// .then(subthreads => subthreads.map(subthread => handleThread(subthread)))),
...results.continueThisThreadIDs.map(id => getThread(subreddit, threadID, id)
.then(subthread => handleThread(subthread))),
handleMoreChildren(results, threadID),
])
.then(resultsArray => {
@ -89,6 +88,8 @@ const handleThread = thread => {
// from all 'continue this thread' posts
console.log(resultsArray)
resultsArray.pop()
console.log(results)
console.log(resultsArray)
})
// zip
// )

View file

@ -6,4 +6,5 @@ module.exports = merge(common, {
devServer: {
historyApiFallback: true,
},
devtool: 'cheap-module-eval-source-map',
});