leaflet-extras / leaflet-providers

An extension to Leaflet that contains configurations for various free tile providers.
https://leaflet-extras.github.io/leaflet-providers/preview/
BSD 2-Clause "Simplified" License
2.12k stars 662 forks source link

build: switch from mversion to npm-version #475

Closed brunob closed 1 year ago

brunob commented 1 year ago

Maybe we should add a npm run lint in preversion stage before calling npm run min @jieter ?

brunob commented 1 year ago

Maybe we should keep old shortcuts with this patch, but i don't think it's useful.

diff --git a/package.json b/package.json
index e3d1c80..3743e27 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,9 @@
         "lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*",
         "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js",
         "preversion": "npm run min",
-        "postversion": "git push && git push --tags && npm publish"
+        "postversion": "git push && git push --tags && npm publish",
+        "release-patch": "npm version patch",
+        "release-minor": "npm version minor"
     },
     "license": "BSD-2-Clause",
     "bugs": {