John Lindquist: 0:00 Starting from an empty folder, I will create an index.js. Inside of that, I'll console.log("hello world"). If I run this with node index.js, it logs out hello world. If I npm install -g pkg and use pkg to package up my index.js, I'm going to --target macos and name the --output hello-world, hit Enter.
0:28 I now have an app which I can run called hello-world, which will log out hello world. This app bundled up Node and my code inside of index.js. I can share this with someone who does not have Node installed.
0:41 If I want to add some Node packages I'll npm init -y from my package.json and npm install project-name-generator and then anything I require. We'll just say gen = require ("project-name-generator"). I'll console.log(gen()), which I'll invoke, .spaced, so the result of this when I node index.js is a generated name for a project. If I run that same package command on index.js --target macos, this time I will name it just gen.