jlengstorf / gatsby-theme-jam-example

An example submission for the Gatsby Theme Jam.
https://themejam.gatsbyjs.org
87 stars 389 forks source link

Change step 5 to 6 and add a new step 5 #1

Open luisFilipePT opened 5 years ago

luisFilipePT commented 5 years ago

I might have missed something and if thats the case just ignore :) but... Maybe it would be useful to have a step 5 mentioning:

  1. Update demo/gatsby-config.js with your THEMENAME
    module.exports = {
    -  plugins: ["gatsby-theme-jam-example"],
    +  plugins: ["gatsby-theme-THEMENAME"],
    }

6.Start the demo site. ...

This way I think it would work out of the box IMO, otherwise I think it triggers an error:

 ERROR  Failed to compile with 1 errors                                                                                                                                 11:30:28 PM
⠀
 error  in ../node_modules/gatsby-theme-jam-example/src/templates/page.js
⠀
Module parse failed: Unexpected token (6:2)
   1 /**
You may need an appropriate loader to handle this file type.

🙌

PS - If the issue is confirmed I can open a PR for the fix if it helps

raae commented 5 years ago

I run into similar issues if I do a yarn after step 4. I am guessing it then installs the workspace package under the new name and things break.

Theme name should be updated in /theme/package.json, /demo/package.json and /demo/gatsby-config.js.

I am totally new to yarn, but with my little testing it seems the whole "gatsby-theme-jam-example": "*", in /demo/package.json is not needed. Either remove or add renaming to instructions for consistency.

jlengstorf commented 5 years ago

@luisFilipePT whoops! Thanks for bringing this up — a PR would be extremely welcome, thank you!

@raae while it's not strictly required for development, without adding the theme as a dependency for the demo site this would break when it gets deployed.