Developing Backbone.js Applications textbook: base.css and bg.png - javascript

I am following along a textbook ("Developing Backbone.js Applications" by Addy Osmani, who runs his own GitHub account) to build my first Backbone.js app, and it seems that I can't download two of the files that I need for the app, base.css and bg.png, from his repositories. Like, when I even try to type up the repository that has base.css, I am bought to a GitHub themed page indicating a 404 error.
Could you please help me find the files I need for this app?

You may have come across an older version of the book, as it seems that the links have been fixed now. These links will work:
base.css
bg.png
These are common styles from a site called TodoMVC, so any copy of the CSS or bg.png you might have found should work fine.

Related

Github pages' jekyll creates 1 line HTML files

I am using Github pages to deploy a static website built using jekyll.
The porject was forked from https://academicpages.github.io/ (I am a beginner in all of this)
For some reason, the "local" (on my machine) behavior of jekyll and the "remote" (i.e. using Github Actions) behavior are different :
Remotely, the built HTML files are 1-liners.
This is quite annoying since Javascript comments (starting with \ and ending at the end of the line) are all over the place.
This undesirable behavior is not present locally.
How can I make configure the jekyll from github pages to behave the same locally and remotely ?
Cheers,
Gabriel
This is due to the compress_html plugin in the production config. The dev config doesn't have this so it doesn't minify locally. You could remove the plugin entirely or experiment with options to fit your needs.

How to keep my React code from being minified on Github?

I'm fairly new on the React scene and just finished a few small react applications. I deployed two of these applications to Github Pages, and they both function perfectly.
However, I noticed that the files in my repository are minified. Not only that, but the language meter shows it as 100% html. It's nitpicky, but I'd like for it to display JavaScript/CSS too. I would greatly prefer my files be visible, just in case anyone wanted to look at how my application was built (mainly recruiters).
Is there some way to make these files visible/UNminified without sacrificing performance?
Is there any reason I wouldn't necessarily need to undertake this? --> (would employers care?)
You're committing your built project, but you should upload the source code!
To expose your github pages you have to build the project inside the docs folder, so you can have source code and build on the same branch!

PWA not finding javascript files in directories

I'm trying for a while now to create a PWA in Oracle APEX by following some instructions on http://vmorneau.me/apex-pwa-part4/, but I'm having no luck in certain parts.
I've installed the demo to test it and see what's wrong, but I'm having the same issues with the demo app, namely some important files not being detected/found when I run it. I thought I had configured something wrong previously, but this time it was supposed to work properly.
Example, I have the app.js inside the js directory in Apex:
When I run the app, I get these messages:
I tried checking the file path the same way I tried to see if the manifest.json file was in the proper root folder, and it couldn't be found:
This looks like a common problem I see on the forums, that doesn't relate to the PWA concept. You'll probably find the same thing if you tried to refer to static files loaded into the workspace.
See Morten's example regarding a fixing the configuration
https://ora-00001.blogspot.com/2016/12/apex-plugin-files-and-404-not-found-in-ords.html
Or placed your files in the middle tier, using /i/ (or preferrably a custom location /c/)

Jekyll Minimal Mistakes theme - Add plugin

so I know this is very specific, but since I am mostly new to programming on websites, I hope you can help me :)
I am trying to integrate the jekyll-lunr-js-search (https://github.com/slashdotdash/jekyll-lunr-js-search) into the minimal-mistakes theme and having a few problems with it.
I followed the instructions for the search but already had problems there, since it seems mmistakes is already prepped to be on github-pages:
There are just gh-pages conform plugins in the Gemfile.
There is no _plugins folder
The plugins used are in the /assets/js/plugins folder and just called via package.json where they are uglifyjs(ed)
So since I do not know much about the technology, I guess I would have to uglifyjs the jekyll-lunr-js-search js files too, but I am did not find a way to get this to work. There has no index.json been created.
Thanks for the help!
Okay, so what I found was this link which makes the search easy in Jekyll on Github Pages.
It does not really solve the problem at hand but it gives me the beginning I can improve.
Wrong file location
The README.md file at jekyll-lunr-js-search mentions that you must place your build/jekyll_lunr_js_search.rb inside the _plugins folder in the root of your Jekyll site.
Plugins on GitHub Pages
However, all GitHub Pages sites are generated using the --safe option to disable custom plugins for security reasons. Unfortunately, this means Jekyll plugins won’t work if you’re deploying to GitHub Pages.
(You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.)
You can only use these plugins on GitHub Pages.
Helpful resources
https://jekyllrb.com/docs/plugins/
https://pages.github.com/versions/
http://rayhightower.com/blog/2016/01/04/how-to-make-lunrjs-jekyll-work-together/

Understanding the role of "building" in an open source javascript package?

I'm kind of a noob to this kind of thing. I'm interested in using MIDI.js (https://github.com/mudcube/MIDI.js/) to build a musical web app, not too different from the demos they have listed and downloadable.
My expectation of MIDI.js, which is not well documented, is that it would be a bunch of javascript code that I can use, sort of like jquery.
So I don't have an understanding of the role of a "build" folder, or node.js, or a gruntfile (barely know what that is).
My question is, what is their to build? There are several example html files (with js) included in the download that run right away on my local apache server, so what is left to be built?
Thanks
From the repo it looks like the build step simply concatenates the various source files into a single MIDI.js file as well as creating the minified version.

Categories