Slides: slides.com/dtauer/wc2017
Create a Github.com account
Download the Github Desktop Application
http://desktop.github.com
**Check if Visual Studio Code is installed and run updates
A repository is usually used to organize a single project.
Branching is the way to work on different versions of a repository at one time.
Saved changes are called commits.
A pull request, is proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch.
Markdown is a way to style text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like # or *.
Markdown is converted into HTML and often used in the README file
Hosted directly from your GitHub repository. Just edit, push, and your changes are live.
Sometimes apps and interfaces are annoying or confusing. Github Projects can be created and updated from the command line. Here are a few handy commands
http://www.uipixels.com/instagram-website-template-psd/
With Photos from Unsplash.com. Unsplash has a nice API that let's you request different sized photos. It's good for placeholders or demo assets: unsplash.it
BEM: Block Element Modifier
Great way for doing 1 Dimensional layouts (a row or a column of content)
Resources
NEW! Awesome for 2 Dimensional layouts (rows AND columns)
Resources
https://es6.io/
https://javascript30.com/
Node is a JavaScript-based server environment. We'll be running a server locally on our computers just like you would with PHP (XAMPP, MAMP) or Java (Tomcat)
Node comes with a Package Manager called NPM. We will use NPM to install packages (libraries) that the server will use
We will use NPM to initialize the project. NPM will create a package.json file which contains all the information about the project (name, versions, dependencies, scripts, etc).
The package.json file will be created and populated with the answers to the questions from the init command
Dependencies are 3rd-party libraries you want to use in your application. By default dependencies are added to the package.json file so anyone else accessing the project can see what's required to run it. Dependencies are installed with the command: npm install dependency-name
Development Dependencies are tools used for development. These dependencies are installed the same with but with an extra flag: npm install dependency-name -D
Let's install:
npm install express -S
npm install pug -S
npm install nodemon -D
We need a starting file. We can name it whatever we want, but normally it's index.js or server.js
In this file, we'll
Now that we have some code, it's time to start the server and test it. The package.json file has a scripts block where we can add different scripts to run from the command line
We can create a start script or a publish script and run these scripts from the command line.
We'll create a start script: node ./index.js
Anytime you change some code the server needs to be restarted. You can manually stop the server with CTRL + C in the command line. Then use your arrow keys to look through the last commands your ran to start the server
Doing this every time you change a file is super annoying, so we'll create a new dev script that uses nodemon to restart the server automatically
We'll create a dev script: nodemon ./index.js
Then run the script with: npm run dev
Pug is a HTML template language for creating reusable layouts. Node will compile these templates into valid HTML when they are requested.
Mixins are individual components that can be included in templates
<header>
<div class="inner">
<div class="header__logo">Instagram</div>
<div class="header__search">
<input type="text" placeholder="e.g. People">
</div>
<div>
<a href="#" class="button button--blue">Get the App</a>
<a href="#" class="button">Login</a>
</div>
</div>
</header>
header
.inner
.header__logo Instagram
.header__search
input(type="text" placeholder="e.g. People")
div
a.button.button--blue(href="#") Get the App
a.button(href="#") Login
HTML
Pug
<div class="images">
<div class="inner">
<a href="" class="image"><img src="http://unsplash.it/320/?image=99" alt="">
<span class="image__cover">View Image</span>
</a>
<a href="" class="image">
<img src="http://unsplash.it/320/?image=199" alt="">
<span class="image__cover">View Image</span>
</a>
</div>
.images
.inner
+MyImage(123)
+MyImage(199)
+MyImage(456)
+MyImage(999)
HTML
Pug with Mixins
mixin MyImage(id)
a.image(href="")
img(src=`http://unsplash.it/320/?image=${id}` alt="")
span.image__cover View Image
Heroku is a web application hosting platform that can host PHP, Ruby, Java, etc.
The hosting is free and can be connected to your Github account
When you push to Github, the project will be pushed to Heroku as well