contentful-userland / gatsby-contentful-starter

Gatsby starter for a Contentful project from the community.
https://contentful-userland.github.io/gatsby-contentful-starter/
MIT License
279 stars 123 forks source link

Deployment issue related to package.json #69

Closed thecodingwhale closed 4 years ago

thecodingwhale commented 4 years ago

I was doing some deployment using Netlify and stuck more than 4 hours. I keep scratching my head the build failed issue keep looking this file: ./bin/hello.js but I can't find it I already run cleanup-repository to remove all the setup files.

And then while checking the package.json I find this, "postinstall": "node ./bin/hello.js",.

It would be better after running the cleanup-repository it should delete the postinstall and cleanup-repository in package.json

Also how I can create PR for this? Thank you.

stefanjudis commented 4 years ago

@thecodingwhale That is very valid and I agree that the cleanup should also adjust the package.json to remove the post-install and cleanup-repository script.

I'm happy to take a PR that adjusts the package.json. If you need help with "how to make a PR" I'm happy to guide you to the right resources. :)

thecodingwhale commented 4 years ago

hi @stefanjudis I would happily create a PR for this one :) Can you help me how? Thank you.

stefanjudis commented 4 years ago

Because you don't have write access to this repo you'd have to create a fork to your user account. :) gatsby-contentful-starter will then be available in your own github account.

Then you can add the changes you want to perform. In this case, you could add another script, that reads the package.json and removes the unneeded scripts. (there are other ways to do that but this is how I would approach it 🙈) This script would then need to be deleted in the clean up too. :)

After you committed and pushed your changes to your fork, you can follow the GitHub instructions to open a pull request to the original userland repository. :)

Does that help?

thecodingwhale commented 4 years ago

hi @stefanjudis I've created a PR for the fix for this one: https://github.com/contentful-userland/gatsby-contentful-starter/pull/73

thank you.

stefanjudis commented 4 years ago

Looking at it already. :) I'll have some tiny notes for improvement, but looks good. :)

Thank you!

thecodingwhale commented 4 years ago

@stefanjudis if you have new ideas to improve this project. Just ask me and I'm willing to help you out :)

stefanjudis commented 4 years ago

There are some open issues, that could be tackled. And just FYI, we one merged PR you get write access to the repo/org. :) (you have a pending invitation right now)

As long as you follow PRs (feel free to tag me too) you can move forward with things you consider to be valuable to the community. :)

THanks again!