Posts

Showing posts from December, 2020

Discuss the result in Release 0.4

Image
 After preparing for the fourth assignment, I start to code and test my project. I add a command ling flag "-d" to indicate that I will process a directory to test all the files for checking links. In addition, I create a new .js file to encapsulate all the coding about reading a directory.  After completing the code, I start to test my project. But unfortunately it outputs some errors.                                                                        Error message After research and analysis, I realize that there is a problem with the directory path. It can't find the real file in my local host. Then I fix the bug.                                                                        Fix the path bug Then I test my project again. It works well.                                                                   Successful output At last, I create a pull request to the link check repo.

Update the process about Release 0.4

 In the second blog of Release 0.4, I will update my process about my link check project . Until now, my link check project can test status of a single link and the status of all the links of a file. But it can't process a directory to check all the files which include the links. So, I decide to add this feature to my project. I create an issue in the repo of Github. During the studying of Javascript and C++ programming languages, I just know how to read a file. It is a new topic for me. So, I need to search for the resolution for reading a directory. After searching, I find that there are two ways to read a directory using JavaScript. One is "fs.readdir()". The other is "fs.readdirSync()".  The  fs.readdir() method  is used to asynchronously read the contents of a given directory. The callback of this method returns an array of all the file names in the directory. The options argument can be used to change the format in which the files are returned from the me

Choose a project in Release 0.4

 Release 0.4 is my fourth assignment for OSD600 course. There are three steps to complete it. The first step is to choose a project which you will work with. The second step is to update the process about the work. The last step is to show my result for the project. Because it is close to my test week. I don't have enough time to search for a new suitable project. So, I decide to work with the former project in this course. Actually I plan to work with my link checker project . I had designed some features which can be used to test if a link work well. But I think there are still something which I can promote. This is true for every IT project, and you can continually improve the project to make it better and better. In the first assignment for this course, my professor list many optional features which can be designed into the link check project. I will choose one of them which I don't complete to further refine my project.

Publish project in Lab 9

Image
This week we start to practice how to release your project into public. In this way, the users don't need to clone  and build your project to run it locally. They can install it globally and use it easily. In this lab, I utilize my link checker project to practice to release it. Because my project was written by Node.js, so I choose npm platform to create my release.  First of all, I read the npm documents and check my project files step by step. I make sure the package.json file includes everything required such as name, version, dependencies, scripts, author and so on. After modifying all the things, I push these changes into my GitHub. Second, I create an account in npm website . It  is a necessary step if you want to publish your project into npm platform. Then,  I us e the command "npm login" to login the npm platform. After that, I use the command "npm push" to release my project. In the first release operation, there is a 403 error which shows " Yo