Posts

Showing posts from December, 2020

OSD600 Release 0.4 Part 3

Image
 This is the last blog for OSD600 and the last part of release 0.4! I am excited to be writing this as after this I will be done with everything I need to do for my classes this semester, and graduate! One issue I noticed while working on this is I did not fully understand what was needed to "port" a component from Gatsby to Next. At first, I thought everything you needed to do to port a component was in this migration guide  posted in the issue . After talking to some people on Slack I learned we must not only follow the migration guide but also convert the JavaScript code in the components to TypeScript. I have worked with Typescript before so I had an idea of how it works/what it is (it's basically JavaScript with types), but I never knew how to convert JavaScript code to TypeScript code. After doing some research I learned this process can be broken down into two simple steps: 1. Change all the .jsx files to .tsx files. 2. Add types to all the variables made. Eg. func

OSD600- Release 0.4 Part 2

Image
 To prepare for the issue I am planning on doing for release 0.4 I spent this week reading the code and learning how to view and test the login component I will port from gatsby to next! I first added the folders needed to the next/ directory and copied the LogIn component to next/components, this way everything will be organized while I do my work. One road bump was figuring out where and how to call the components for testing, but after careful study of the code, I learned how to do it. I then comment out the code in index.tsx  and called the login component. It didn't work! I realized that since I have not ported the component to next I will not be able to call it from the index.tsx. I have begun reading how to port components and already made some small modifications (eg. changing the hrefs). This week was dedicated to planning and understanding how everything works. I used to think that's not so important, but based on my past experiences I know this will pay off next wee

OSD600- Lab 10

Image
 This is it... the final lab of OSD600! The semester is almost over, and although I have really enjoyed this course and learned so much, I can't wait for the semester to end! Mainly because this is my last one then I graduate 🎓! This lab helps tie everything we did this semester by asking us to publish our link checker programs! since I wrote mine in Node I started looking into how to publish it to npm . I must admit, publishing to npm was not as hard as I thought it would be. This YouTube video really helped guide me. I also read the docs . However, there was one problem with all these resources. They did not show how to publish a command-line tool to npm. I understand I could have modified some of my code so the user can require() it, but it didn't make sense to me. I felt the user experience would be more enjoyable if they can install and use it as a command-line tool! I asked David about this and he told me about npx ! npx allows you to run modules from the terminal! This