Clean Publish

Clean Publish logo

Services & Skills

Share on

The clean-publish command copies project files (excluding configuration files) to a temporary folder, removes the extra and development-only scripts from package.json, and calls npm publish on the temporary folder.

A simple example:

  • Before cleaning:
node_modules
src
.eslintrc
.prettierrc
package.json
{
  "name": "author",
  "scripts": {
    "lint": "eslint"
  },
  "dependencies": {},
  "devDependencies": {}
}
  • After cleaning:

node_modules, .eslintrc, .prettierrc, lint scripts and the devDependecies field were removed (empty objects will also be deleted).

src
package.json
{
  "name": "author",
}
Authors

Explore more open source projects

Let's solve your hard problems

Martians at a glance
18
years in business

We're experts at helping developer products grow, with a proven track record in UI design, product iterations, cost-effective scaling, and much more. We'll lay out a strategy before our engineers and designers leap into action.

If you prefer email, write to us at surrender@evilmartians.com