Run test before publish (treat test as prepublishOnly)

(Khải) #1

It is often a good idea to test before publishing a package, but it is inconvenient to always have to write prepublishOnly to automate this. So I ask to make this behavior default.

  • By default, run test script when npm publish is executed.
  • If prepublishOnly appears in package.json, ignore test.
  • If --no-test cli flag presents, ignore test.