Steps to follow in setting up a nodeJS environment (Ubuntu)
- https://snapcraft.io/node
- https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
- https://snapcraft.io/code + telemetry off
– note to run this you may need to enter on the bash command line to prevent some annoying keyboard shortcut problem
GTK_IM_MODULE="xim" code
3.1 https://www.gatsbyjs.com/tutorial/part-zero/ (Prettier plugin for vscode)
3.2 https://stackoverflow.com/a/50892839 don’t forget the vscode-vim extension and this fix for code folds
3.3 https://github.com/VSCodeVim/Vim#-faq even more tips here (shift-esc to escape intellisense without entering normal mode, etcetera)
https://www.gatsbyjs.com/docs/quick-start/
- npm install -g gatsby-cli + telemetry off
- gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-hello-world
https://www.gatsbyjs.com/docs/end-to-end-testing/
- cd gatsby-site
npm install --save-dev cypress start-server-and-test
- vim cypress.json [new file]
{ "baseUrl": "http://localhost:8000/" }
- vim package.json, add the lines cy:open… and test:e2e… example shown below
{ `"scripts": {` "develop": "gatsby develop", "cy:open": "cypress open", "test:e2e": "start-server-and-test develop http://localhost:8000 cy:open" } }
npm run test:e2e