Skip to content
This repository was archived by the owner on May 18, 2022. It is now read-only.

Update Kaws' CSV import script to also update the sitemap seed JSON #40

Closed
wants to merge 1 commit into from
Closed

Conversation

yuki24
Copy link
Contributor

@yuki24 yuki24 commented Dec 17, 2018

finishes https://artsyproduct.atlassian.net/browse/GROW-1051

  • Adds aws-sdk dependency
  • Extracts convertCSVToJson into its own file so scripts/bootstrapOrUpdate.ts and scripts/updateSitemapJson.ts share the logic
  • Adds yarn update-sitemap ./collections.csv that updates the S3 object

Todo

  • Add tests?

import { Collection } from "../src/Entities"
import { loadCsvAsCollection } from "./loadCsvAsColleciton"

const AWS = require("aws-sdk")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why not import did not work but require did...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you try import * as AWS from "aws-sdk"

@yuki24
Copy link
Contributor Author

yuki24 commented Dec 17, 2018

Closing as I'll have to re-write the entire script to use MongoDB.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants