—
A simple react app that grabs the latest gist of the specified user.
Intended to be super simple without any design or styling for now. This is just a small app to help me understand basics of React
To view the app you need to:
- Download the files or clone the repo
- Change to the “gistbox” directory
$ cd gistbox - Install dependencies ‘$ nom install’
- Start a local web server and visit the page in your browser
To start a server locally you can install NPM’s handy “serve” module
$ npm install serve -g
Start the server and open the page in your default browser:
open http://localhost:8000 && serve -p 8000
For fun this project uses gulp to automate the task of compiling the javascript. In this app we are using Browserify to package up our app. Browserify calls Babelify to transform the app into browed-compatible javascript since we are using some ES6.
Browserify is used in a gulp task to run ‘babelify’ when javascript files need to be transformed and compiled. This task essentially bundles up all of our dependencies for this app.
Babelify is called in the Browserify task to transform the JSX and ES6 into browser-compatible javascript for today’s browsers.
Compile assets before viewing the app:
$ gulp browserify
Default task to watch javascript files and compile them:
$ gulp
Note The app in this repo is already transformed and compiled so you don’t need to run these tasks to test the app.
The idea for this app came from the “Laracasts: Do You React?” series.