In this Release, I worked with brackets, thimble, and a new repo that Mozilla forked for my brackets issue http-server. For my brackets issue, I had to switch http-server to Http-server-gzip. humphd and gideonthomas had a discussion on what the best approach for this issue would be, and I had to wait till they agreed on what was to be done. They decided on forking the http-server repo those projects aren’t really maintained anymore. for my first fix, I had to add and if statement to check if the object was a gzip, and if true change the Content-Encoding header to gzip, here is the code:
this.headers[‘Content-Encoding’] = ‘gzip’;
Then I had to modify the package.JSON file to reference a GitHub dependency.
So I changed two lines 53, and 67
“production”: “npm start”,
“production”: “npm start — –gzip”,
These fixes were pretty simple, only part I had a problem was referencing the GitHub branch, since the document showed many different ways, and said some of them were outdated I had to do some trial and error, luckily the third time was the charm!
So this fix seemed pretty simple at first since I was provided some documents within the issue. I read on the yarn website how to download it for Ubuntu (thats the Vm that thimble uses) and followed the documentation on how to replace the npm commands. I started to write the code and decided I wanted to test it, well then I found out my thimble stopped working and was rejecting the port:3500. So I tried to fix this error for about 3 days, and my roommate Ray really had no idea how to fix it, since he is a Linux man. So I decided to ask for help on the Mozilla chat system, luckily pomax was able to help me fix my port issue, but now I am on a vm issue. so most of the code I will show now is theory since I was not able to test it.
To install yarn I did the command
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add –
echo “deb https://dl.yarnpkg.com/debian/ stable main“ | sudo tee /etc/apt/sources.list.d/yarn.list
Then to replace the npm I did this:
npm install -g http-server –loglevel=error # For hosting published projects
npm install –no-bin-links –loglevel=error
yarn global add http-server –loglevel=error # For hosting published projects
yarn install –no-bin-links –unsafe-perm –loglevel=error
Now, this is only a few lines, in total I’ve changed about 12 lines of code on the start-services.sh . I wish I could have tested it and make sure it was working before I put up my pull request , but I’ve been stuck in a rut and needed help. So now all I can really do is blog about this release until I fix the issue with thimble not loading correctly.
This Release has taught me a lot in working through problems and trying to solve them, more so with getting stuff to work and not with my code. I’ve really enjoyed working with thimble and brackets and I wish to continue working on these projects since I’ve learned to understand them & it has a great community. Through all the tips and tricks I’ve learned this semester just by talking to the developers on these projects, I am grateful for taking OSD600