Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gatsby-transformer-xml #1465

Merged
merged 5 commits into from
Aug 9, 2017
Merged

Add gatsby-transformer-xml #1465

merged 5 commits into from
Aug 9, 2017

Conversation

Khaledgarbaya
Copy link
Contributor

@Khaledgarbaya Khaledgarbaya commented Jul 11, 2017

Summary

This PR adds the logic for gatsby-transform-xml package

TODO

  • Add Documentation
  • Add tests

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 1848894ddd29774dcb557361c152f35a822f972a

https://deploy-preview-1465--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 11, 2017

Deploy preview ready!

Built with commit 1848894ddd29774dcb557361c152f35a822f972a

https://deploy-preview-1465--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 11, 2017

Deploy preview ready!

Built with commit 34e1ca6

https://deploy-preview-1465--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 1848894ddd29774dcb557361c152f35a822f972a

https://deploy-preview-1465--gatsbyjs.netlify.com

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jul 11, 2017

Deploy preview ready!

Built with commit ad2f8ccc98a24ea02d22eb38b0c5625070e831c8

https://deploy-preview-1465--gatsbyjs.netlify.com

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jul 11, 2017

Deploy preview ready!

Built with commit 34e1ca6

https://deploy-preview-1465--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jul 11, 2017

Deploy preview failed.

Built with commit ad2f8ccc98a24ea02d22eb38b0c5625070e831c8

https://app.netlify.com/sites/image-processing/deploys/5964e005a700c4202e22c642

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 42af351e721090974bfc6e2ed8fb58130cfe2144

https://app.netlify.com/sites/using-glamor/deploys/5964be85cf321c20b7caf54b

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 42af351e721090974bfc6e2ed8fb58130cfe2144

https://app.netlify.com/sites/using-contentful/deploys/5964be85cf321c20b7caf54f

@Khaledgarbaya Khaledgarbaya changed the title [WIP] Add gatsby-transformer-xml Add gatsby-transformer-xml Jul 11, 2017
Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

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

So... I'm having doubts about even doing an XML transformer. Not that it wouldn't be valuable but XML is used in such complex & unexpected ways that I'm not sure we could build a generic XML transformer that'd be useful.

Perhaps it'd be better to just have a nice docs page on building your own XML transformer to meet the needs of a specific project?

"id": "bk101",
"internal": Object {
"contentDigest": "446732570969e52599dded1ba4941b65",
"type": "UndefinedXml",
Copy link
Contributor

Choose a reason for hiding this comment

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

"Undefined" looks like this needs fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KyleAMathews I just found the same issue in the gatsby-transform-json should it be node.internal.name instead of node.name ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh hmmm... ok I guess perhaps this and the JSON test are kinda correct. If the node you're building from is a File node then node.name would be the file name. So for the tests we should just set a name on the fake test nodes so the snapshots don't look weird.

Could you do that here + to the JSON transformer test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

@KyleAMathews
Copy link
Contributor

@Khaledgarbaya thoughts on my comment above?

@Khaledgarbaya
Copy link
Contributor Author

Khaledgarbaya commented Jul 28, 2017 via email

@KyleAMathews
Copy link
Contributor

Ok! I agree, yeah, something is better than nothing and if people with advanced or unusual needs find this transformer isn't meeting their needs, it'd be easy to fork and customize so better to have something than nothing.

There was what looks like one bug that I left a comment on. Please fix that and let's get this released!

@Khaledgarbaya
Copy link
Contributor Author

@KyleAMathews Done, and I started an other PR to fix the JSON transform tests

@KyleAMathews KyleAMathews merged commit 0fca7b1 into gatsbyjs:master Aug 9, 2017
@KyleAMathews
Copy link
Contributor

Thanks!! This is a cool transformer :-)

@Khaledgarbaya btw, the README said it transforms "JXML" which I assume was a typo? I pushed a change before merging but return it if that's what you meant.

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

Successfully merging this pull request may close these issues.

3 participants