masterPortfolio icon indicating copy to clipboard operation
masterPortfolio copied to clipboard

Code refactoring and addressing other issues

Open dhruvkrishnavaid opened this issue 2 years ago • 12 comments

Earlier, when navigation items were center aligned in the Projects page and left aligned in all other pages. This PR fixes this issue by explicitly adding text-align: center; to header links.

dhruvkrishnavaid avatar Jun 26 '22 03:06 dhruvkrishnavaid

@saiteja13427 Please review this PR

dhruvkrishnavaid avatar Jun 26 '22 04:06 dhruvkrishnavaid

  • Added defer to fontawesome and iconify for better performance
  • Removed canvasjs and animejs because they were unused

dhruvkrishnavaid avatar Jun 26 '22 08:06 dhruvkrishnavaid

  • Add fetch script to package.json (Now run npm fetch instead of node git_data_fetcher.mjs)

dhruvkrishnavaid avatar Jun 26 '22 08:06 dhruvkrishnavaid

@dhruvkrishnavaid

  1. Please remove the package-lock.json as it's not required I think
  2. Also we are discussing to give some options while running the GitHub script. Thus we wouldn't want to add script in package json. Please revert those changes and we will be good to go.

saiteja13427 avatar Jun 26 '22 10:06 saiteja13427

The current package-lock.json was created using an older version of npm. The one in this PR just adds an automatically generated compatibility layer for latest versions of npm.

The args can be given to npm fetch using -- and they will be forwarded to node during runtime. For example npm fetch -- -l 200 will work the same as node git_data_fetcher.mjs -l 200. But if you say, I'll remove the fetch script from package.json in my next commit.

dhruvkrishnavaid avatar Jun 26 '22 15:06 dhruvkrishnavaid

@ashutosh1919 What is your opinion on this?

dhruvkrishnavaid avatar Jun 26 '22 15:06 dhruvkrishnavaid

This commit addresses #220.

  • Added dotenv
  • Updated react-scripts to the latest version to get benefit from latest performance and security fixes in create-react-app

NOTE: Updating react-scripts means that this project will no longer successfully build on Node.js versions prior to v12.2.0, hence updated the version of Node.js CI.

dhruvkrishnavaid avatar Jun 28 '22 08:06 dhruvkrishnavaid

I've added only the token to .env, so the username will still be hardcoded. This is because I remember facing some issue where Node could not successfully fetch the data because it was unable to read the username.

This should not be a matter of concern because our GitHub username is already public ;)

dhruvkrishnavaid avatar Jun 28 '22 08:06 dhruvkrishnavaid

@ashutosh1919 Your opinion is awaited :octocat:

dhruvkrishnavaid avatar Jul 22 '22 00:07 dhruvkrishnavaid

@dhruvkrishnavaid please remove changes in package-lock.json

ashutosh1919 avatar Jul 22 '22 19:07 ashutosh1919

I've reverted the changes in package-lock.json. The current changes are because of addition of dotenv and the upgrade of react-scripts to version 5.0.1. These changes are necessary else the CI build will fail due to improper sync of package.json and package-lock.json.

dhruvkrishnavaid avatar Jul 23 '22 01:07 dhruvkrishnavaid

I've used npm version 6.14.17, which is the version Node.js 14.x CI uses, to generate the current lockfile, to make sure this does not cause any issue :)

dhruvkrishnavaid avatar Jul 23 '22 01:07 dhruvkrishnavaid