What is PackShip?
This guide will walk you through installing PackShip's dependencies and configuring Webpack.
1. Getting Started
Start by installing the PackShip global command:
PackShip Global Installation
For MacOS & Linux
sudo npm i -g packship@latestFor Windows
npm i -g packship@latestSetting Up Your Package with PackShip
packship initFollow the prompts, and your package will be ready!
2. Dependency Installation
Initialize `node modules` and `package-lock.json`
Install the necessary dependencies to ensure your package runs smoothly.
npm installIf you encounter dependency resolution issues, similar to this:

Run the following command to install dependencies:
npm install --legacy-peer-depsIf you see an EACCES error, run the following command to fix permissions:

sudo chown -R $(whoami) "$(npm config get cache)"Then, try installing the dependencies again:
npm installIf you encounter deprecated package warnings, you can safely ignore them or update the packages as needed.
Install the necessary dependencies to avoid redundancy and ensure proper package setup.
Main Dependencies
For TypeScript
npm install --save typescript @types/react @types/react-domFor JavaScript
npm install react react-domMake sure TypeScript and React typings are installed for development purposes. Install these commands only once to avoid duplication.
Babel for React & TypeScript
Install Babel presets to compile TypeScript and JSX/React syntax:
For TypeScript
npm install --save-dev @babel/preset-typescript @babel/preset-reactFor JavaScript
npm install --save-dev @babel/preset-reactBabel & Webpack Loaders
Install the necessary loaders for Babel and Webpack:
npm install --save-dev babel-loader webpackThese loaders ensure that Webpack and Babel can work together to transpile and bundle your code.
3. Publishing Your Npm Package
To publish your package, ensure the build is successful:
npm run buildFor new packages
Once the build succeeds, publish your package:
packship publishFor existing packages
If you're updating an existing package, update the version and then publish:
npm version patch/minor/major # Depending on your releasepackship publish