The npm pack command creates a zipped bundle of the distribution files as well as some of the other project files. This bundle could then be uploaded to the NPM directory for distribution. After creating this bundle, Kent explores the contents and spends some time configuring the packager so only the necessary files are included.
(dramatic electronic music)…- So, now that we are transplanting what we want to…send to the NPM registry is the dist folder.…So, I'm going to show you…a really handy thing that you can do…to make sure you know what you're sending to NPM…and that is a command called NPM pack.…This is,…as part of the published…scripts that NPM is running when you say, okay publish,…one of the first things it does is…internally, it runs NPM pack…so that it creates a zip folder…and then that's what gets uploaded to the NPM registry.…
And so if you're ever wondering, okay,…what am I sending to the registry?…Then you can run NPM pack and then open…that zipped file.…That will create a folder called package…and then here you'll see everything that you're sending…up there which is most of the things that we…have in our project.…Let me zoom in a little bit.…So, we have our test directory, our source directory,…a README, package.json, license, dist and Code of Conduct.…So, we don't care about sending either one of these two…directories, the source and the test,…
Note: This course was created by Frontend Masters. It was originally released on 08/09/2016. We're pleased to host this training in our library.
- Creating an open-source library
- Linting and testing
- Code coverage
- Installing and configuring Babel
- Peer dependencies
- Forking and renaming
- Continuous integration and automating releases
Skill Level Intermediate
1. Creating an Open-Source Library
2. Linting and Testing
3. Git Hooks, Babel, and Webpack
4. Continuous Integration and Automating Releases
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.