Introduction to Webpack and node modules for scaffolding a Javascript development environment.
Since we are creating our own server, it doesn't really matter where you clone this repository to on your hard drive.
We're using Yarn to set things up, but you can also use NPM, if you don't wanna try new things. ;-(
- Fork repository to your Github account.
- Clone to your local computer via Github Desktop or terminal command
git clone https://github.com/pbrocks/pmpro-webpack-scaffold.git
. This will add the minimal files needed. - Open
index.html
in a browser. You should be able to right click on the file and selectOpen in Browser
- You should see raw html and text explaining that you need to run
Yarn
. - Notice this is not what you see here http://localhost:8080 in your browser.
- In a terminal window, navigate to this folder. On a Mac, you can open the terminal, type
cd
from wherever you are. Make sure you have the space after 'cd'. Then grab this repo's folder and drag it into the terminal window. You should then see the path to this repo in your terminal prompt. Press Enter. - Run
yarn install
. - When node has finished installing the modules, run
yarn start
to begin the server. - Open http://localhost:8080 in your browser.