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

Contact us

We’d love to hear from you! We’re not really all that evil, and we love discussing potential projects, intriguing ideas, and new opportunities. Complete the form below or drop us a line at surrender@evilmartians.com.

Martians at a glance
16
years in business

A product development consultancy that works with startups and established businesses, while also creating open source-based products and services