Giter Site home page Giter Site logo

Comments (21)

domwakeling avatar domwakeling commented on August 17, 2024 1

I think I see what the code is doing and will have a look at implementing this if no-one else is working on it?

from learn.

thomask-gh avatar thomask-gh commented on August 17, 2024

In the original freeCodeCamp app, get-words.js generates greetings from words.json. get-words.js's randomCompliment function is then used but I don't really know how. Here, the “Happy coding!” message is defined and then exported to be reused here.

from learn.

Bouncey avatar Bouncey commented on August 17, 2024

Hi @thomaskuntzz thanks for taking the time to look into this. It seems you have uncovered a bug in freecodecamp/freecodecamp.

We should be updating the successMessage when the challenge changes. Much like we are doing with challengeMeta and challengeFiles here in componentDidMount and here in componentDidUpdate. In ClassicShow as well as Project

If I can help you further, let me know 😁

from learn.

thomask-gh avatar thomask-gh commented on August 17, 2024

I was just taking a look at the code to see if I could help with this, but I don't feel like I can implement this myself, so I just wrote what I understood of how it works right now, just to make the life of whoever will take this on easier 😊

from learn.

Bouncey avatar Bouncey commented on August 17, 2024

Awesome @domwakeling! Let me know if something needs explained better 👍

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

Stupid question probably, but ... can I npm rather than yarn, or do I need to install yarn?

from learn.

thomask-gh avatar thomask-gh commented on August 17, 2024

yarn and npm install are equivalent (both package managers are used to do the same opreations and are interoperable) 😉

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

Thanks, wasn't sure if using npm would add a conflict (guess it might add a second lock file?)

from learn.

raisedadead avatar raisedadead commented on August 17, 2024

I would stick to yarn if I am adding / modifying / removing packages. As long as you are NOT doing that you are good to go.

Also do not add the lockfile to your commit when you make a PR, if you opt for npm.

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

No problem. Can't run the develop script using npm so installing yarn!

from learn.

Bouncey avatar Bouncey commented on August 17, 2024

I know it could be a pain doing it all the time, but changing yarn for npm run will get round that for you 👍

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

Think I'd need to change all the scripts in package.json (npm run develop throws a 'missing package yarn' error). Also apparently some issues with getting yarn via homebrew, and there was me thinking it'd be easy 🙄

from learn.

Bouncey avatar Bouncey commented on August 17, 2024

@domwakeling Copy/paste this into you package.json.

see more...
{
  "name": "learn-freecodecamp-org",
  "description": "Gatsby default starter",
  "version": "1.0.0",
  "author": "Kyle Mathews <[email protected]>",
  "dependencies": {
    "adler32": "^0.1.7",
    "auth0-js": "^9.5.1",
    "babel-core": "^6.26.0",
    "babel-jest": "^22.4.3",
    "babel-standalone": "^6.26.0",
    "brace": "^0.11.1",
    "chai": "^4.1.2",
    "copy-webpack-plugin": "^4.5.1",
    "debug": "^3.1.0",
    "dotenv": "^5.0.1",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-15": "^1.0.5",
    "gatsby": "^1.9.243",
    "gatsby-link": "^1.6.39",
    "gatsby-plugin-google-fonts": "^0.0.4",
    "gatsby-plugin-offline": "^1.0.15",
    "gatsby-plugin-react-helmet": "^2.0.8",
    "gatsby-plugin-react-next": "^1.0.11",
    "gatsby-plugin-sitemap": "^1.2.21",
    "gatsby-source-filesystem": "^1.5.29",
    "gatsby-source-mongodb": "^1.5.19",
    "gatsby-transformer-json": "^1.0.16",
    "gatsby-transformer-remark": "^1.7.39",
    "jest": "^22.4.3",
    "lodash": "^4.17.5",
    "loop-protect": "^2.1.6",
    "mongodb": "^3.0.5",
    "react": "16",
    "react-bootstrap": "^0.32.1",
    "react-dom": "16",
    "react-helmet": "^5.2.0",
    "react-monaco-editor": "^0.14.1",
    "react-redux": "^5.0.7",
    "react-reflex": "^2.2.1",
    "react-router-redux": "^5.0.0-alpha.9",
    "react-test-renderer": "^16.3.1",
    "redux": "^3.7.2",
    "redux-actions": "^2.3.0",
    "redux-form": "5",
    "redux-observable": "^0.18.0",
    "reselect": "^3.0.1",
    "rxjs": "^5.5.7",
    "store": "^2.0.12",
    "uglifyjs-webpack-plugin": "^1.2.4",
    "validator": "^9.4.1"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "npm run build:frame-runner && gatsby build",
    "build:frame-runner": "webpack --config ./webpack-frame-runner.js",
    "build:loop-protect": "webpack --config ./webpack-loop-protect.js",
    "develop": "npm run build:frame-runner && gatsby develop",
    "format": "npm run format:gatsby && npm run format:src && npm run format:utils && npm run lint",
    "format:gatsby": "prettier --write './gatsby*.js'",
    "format:src": "prettier --write './src/**/*.js'",
    "format:utils": "prettier --write './utils/**/*.js'",
    "lint": "npm run lint:gatsby && npm run lint:src && npm run lint:utils",
    "lint:gatsby": "eslint ./gatsby*.js --fix",
    "lint:src": "eslint ./src . --fix",
    "lint:utils": "eslint ./utils . --fix",
    "pretty": "npm run format && npm run lint",
    "test": "npm run format && jest src",
    "test:watch": "jest --watch src"
  },
  "jest": {
    "verbose": true,
    "transform": {
      "^.+\\.js$": "babel-jest"
    },
    "moduleNameMapper": {
      "^.+\\.(css|less)$": "<rootDir>/src/__mocks__/cssStub.js"
    }
  },
  "devDependencies": {
    "babel-eslint": "^8.2.2",
    "enzyme-adapter-react-16": "^1.1.1",
    "eslint": "^4.19.1",
    "eslint-config-freecodecamp": "^1.1.1",
    "eslint-plugin-import": "^2.9.0",
    "eslint-plugin-prefer-object-spread": "^1.2.1",
    "eslint-plugin-react": "^7.7.0",
    "prettier": "^1.11.1",
    "sinon": "^4.5.0"
  }
}

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

sigh

Sorry about this; I'm now hitting an error message which (essentially) is complaining about a spread operator (...file in line 78 of seed/buildChallenges.js). Have tried using both npm and yarn (complete uninstall and fresh clone, install etc) and getting it both ways. Could this be a babel issue?

from learn.

raisedadead avatar raisedadead commented on August 17, 2024

https://yarnpkg.com/en/ and follow installation instructions

Ignore that, you are using homebrew. I have had the same setup.

from learn.

Bouncey avatar Bouncey commented on August 17, 2024

Which version of node are you using @domwakeling? It should be version 8+ to use the object spread operator

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

Looks like noob issues. node -v returns v6.9.1 but running brew upgrade node returns 'node 10.1.0 already installed'. Is there some easy way to fix this or do I need to install nvm?

from learn.

Bouncey avatar Bouncey commented on August 17, 2024

I have found nvm being the best option when working with node versions 👍

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

OK, thanks. Another odyssey coming up!

from learn.

raisedadead avatar raisedadead commented on August 17, 2024

Hi @domwakeling Lets keep the issue thread clean for issue specific discussions, and continue on
Contributors Chat room for troubleshooting.

from learn.

domwakeling avatar domwakeling commented on August 17, 2024

Fix proposed in PR #41

from learn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.