2. Node.js and npm
Activity 3: Creating a npm Package to Parse HTML
Solution:
- In an empty folder, use npm to create a new package. You can use all the default values for the options:
$ npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults. See 'npm help json' for definitive documentation on these fields and exactly what they do. Use 'npm install <pkg>' afterwards to install a package and save it as a dependency in the package.json file. Press ^C at any time to quit. package name: (Activity03) version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to .../Lesson02/Activity03/package.json: { Â Â "name": "Activity03", Â Â "version": "1.0.0", Â Â "description": "", Â Â "main"...