GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shama/letswritecode: :mortar_board: code examples for Let's Write Code

BranchesTags
Open more actions menu

Latest commit

 

History

90 Commits
90 Commits

Folders and files

NameName
Last commit message
Last commit date
ajax-requests
ajax-requests
 
 
async-js-with-promises
async-js-with-promises
 
 
beginning-client-server-javascript-with-io-node
beginning-client-server-javascript-with-io-node
 
 
content-security-policy
content-security-policy
 
 
creating-desktop-apps-with-electron
creating-desktop-apps-with-electron
 
 
css-selector-precedence
css-selector-precedence
 
 
debugging-javascript
debugging-javascript
 
 
dom-event-listeners
dom-event-listeners
 
 
drawing-animating-svgs
drawing-animating-svgs
 
 
easier-webgl-shaders-stackgl
easier-webgl-shaders-stackgl
 
 
electron-webpack-vuejs
electron-webpack-vuejs
 
 
ember-computed-properties
ember-computed-properties
 
 
ember-fundamentals
ember-fundamentals
 
 
essential-es6-es2015
essential-es6-es2015
 
 
getting-started-with-browserify
getting-started-with-browserify
 
 
getting-started-with-electron-1.0
getting-started-with-electron-1.0
 
 
getting-started-with-virtual-dom
getting-started-with-virtual-dom
 
 
getting-started-with-vuejs
getting-started-with-vuejs
 
 
getting-started-with-webpack
getting-started-with-webpack
 
 
how-to-make-chrome-extensions
how-to-make-chrome-extensions
 
 
intro-to-leveldb
intro-to-leveldb
 
 
intro-to-webgl-and-shaders
intro-to-webgl-and-shaders
 
 
javascript-filereader
javascript-filereader
 
 
javascript-generators
javascript-generators
 
 
javascript-modules
javascript-modules
 
 
javascript-mutation-observer
javascript-mutation-observer
 
 
javascript-prototypal-inheritance
javascript-prototypal-inheritance
 
 
javascript-prototype-fun
javascript-prototype-fun
 
 
javascript-proxy
javascript-proxy
 
 
js-arrays
js-arrays
 
 
js-timers
js-timers
 
 
learn-to-yo-yo
learn-to-yo-yo
 
 
learning-js-functions
learning-js-functions
 
 
mastering-callbacks
mastering-callbacks
 
 
multi-window-electron-desktop-app
multi-window-electron-desktop-app
 
 
node-process-child-process
node-process-child-process
 
 
node-streams
node-streams
 
 
nodejs-cli
nodejs-cli
 
 
nodejs-server
nodejs-server
 
 
p2p-video-chat-webrtc
p2p-video-chat-webrtc
 
 
packaging-distributing-electron-apps
packaging-distributing-electron-apps
 
 
simple-p2p-with-webrtc
simple-p2p-with-webrtc
 
 
tagged-template-literals
tagged-template-literals
 
 
testing-client-server-javascript
testing-client-server-javascript
 
 
transform-your-bundles-with-browserify
transform-your-bundles-with-browserify
 
 
two-d-animations-with-canvas-javascript
two-d-animations-with-canvas-javascript
 
 
vuejs-computed-properties
vuejs-computed-properties
 
 
what-is-async-javascript
what-is-async-javascript
 
 
what-is-isomorphic-javascript
what-is-isomorphic-javascript
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

Repository files navigation

Let's Write Code

All the code examples for the youtube series Let's Write Code

Ideas?

If you have any screencast you'd like to see or suggestions, please open an issue here. Thanks!

Dev Setup

Throughout these videos I typically use the same development environment. This is a guide through that development setup.

Dependencies

Rather than copying / pasting script tags into my HTML for 3rd party code, I use npm. The npm command comes with Node.js. When I run npm install jquery, it downloads the 3rd party files into the node_modules/jquery/ folder.

The package.json file can hold those dependencies and versions, so the next time you want to install those files, run npm install in the same folder.

Build Tool

Browserify is a tool that reads your JavaScript source files and files you've installed with npm. Then outputs those files loaded in the correct order to a single bundled file.

You can install the browserify command on your machine with: npm install browserify -g.

To create a bundled file, run browserify index.js -o bundle.js, where index.js is the entry point to all your scripts.

In your index.js file, you can include other files with require('./other.js') or a 3rd party file installed with npm by doing require('jquery').

Once you have generated this bundle.js file, you can add a single script tag in your HTML: <script src="bundle.js"></script> and host those assets like any other HTML, JavaScript and CSS files.

Dev Server

While rapidly developing, running the browserify command every time you make a change in the code can get tedious. Also having to FTP, git push or some other method to deploy the code to a server can slow your development down.

I use a tool called budo which runs a server locally on your machine (http://localhost:9966) and automatically bundles your code with Browserify as you refresh the page or live as you make changes if you have the --live option on.

Install the budo command with: npm install budo and run the server with: budo index.js. Now you can rapidly develop the code by viewing localhost:9966.

For convenience, I add the budo command to the scripts section of my package.json:

{
  "scripts": {
    "start": "budo index.js:bundle.js"
  }
}

Now I only need to run npm start to start developing code.

Deployment

After you're done developing the code, run browserify index.js -o bundle.js to create your JavaScript bundle. Add the script tag to your HTML: <script src="bundle.js"></script> to load that JavaScript file.

Then upload those files to your remote server. Either via FTP/SFTP, git deploying, heroku, firebase or whatever method you normally use to deploy your website.

About

🎓 code examples for Let's Write Code

www.youtube.com/user/kylerobinsonyoung

Topics

educationjavascriptvideo

Resources

Readme
Activity

Stars

796 stars

Watchers

68 watching

Forks

728 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.