Over my years on my path from a kid playing around with code(1982) to the present of being a senior developer, every year the number of paths of learning that I can take is growing exponentially. Sometimes these paths lead to dead ends and I spend my time learning something that is the Don’t get me wrong, I learned valuable lessons from those languages but I’ve had to unlearn <\/strong>about half of what I put 1000s of hours to learn. <\/p>\n\n\n\n So every year or so when a new way of doing things pops its head up, I’m always a bit resistant, but when a technology looks like it will stay around I (eventually) embrace it. <\/p>\n\n\n\n So for all those people have requested that I show them how to set up Phaser with NPM (Node package manager), here it is.<\/p>\n\n\n\n What is the node package manager(NPM)?<\/p>\n\n\n\n According to the official website:<\/p>\n\n\n\n npm makes it easy for JavaScript developers to share and reuse code, and makes it easy to update the code that you\u2019re sharing, so you can build amazing things. <\/p>npmjs.com For if it makes things easier or not, is debatable, however it is now being widely adopted as standard.<\/p>\n\n\n\n Install here<\/a><\/p>\n\n\n\n What is git?<\/p>\n\n\n\n Basically git copies files from one place to another and keeps track of what was copied and when, so it is easy to roll back to a previous time.<\/p>\n\n\n\n We need git here to copy files from github.com<\/p>\n\n\n\n Install here<\/a><\/p>\n\n\n\n Open a command prompt on Windows, or a terminal on Macs. You may need to search for it. Once you find it, make a shortcut where you can get to it quickly in future.<\/p>\n\n\n\n At the command prompt, make and navigate to an empty directory. I like to make directories for each of my project types live. Phaser, React, Vue, Richard Davey has put together a nice time-saving package up on GitHub. Now we clone the files from the phaser 3 project template git hub. Copy and paste the text below into your command prompt, replacing git clone https:\/\/github.com\/photonstorm\/phaser3-project-template.git game1<\/p>\n\n\n\n Then change the directory to your game directory<\/p>\n\n\n\n cd game1<\/p>\n\n\n\n Open the folder with the code editor of your choice. You’ll see something like this.<\/p>\n\n\n\n Open the package.json that was included with the template and replace It was difficult for me to find anything on WebPack on the web that made me understand what it was.<\/p>\n\n\n\n Step 1. Install the node package manager<\/h2>\n\n\n\n
<\/cite><\/blockquote>\n\n\n\n Step 2. Install Git<\/h2>\n\n\n\n
Git<\/em> is a free and open source distributed version control system <\/p><\/blockquote>\n\n\n\nStep 3. Open A command prompt<\/h2>\n\n\n\n
<\/figure>\n\n\n\n
Step 4. Make a directory <\/h2>\n\n\n\n
Use
cd phaser<\/p>\n\n\n\n<\/figure>\n\n\n\n
Step 5. Clone The Project<\/h2>\n\n\n\n
Step 6. Open your directory in your editor<\/h2>\n\n\n\n
<\/figure>\n\n\n\n
Step 7. Customize the package file<\/h2>\n\n\n\n
<\/figure>\n\n\n\n
About WebPack<\/h2>\n\n\n\n
https:\/\/webpack.js.org\/<\/a> <\/cite><\/blockquote>\n\n\n\n