0.0.2 • Published 3 years ago

frontend-shared v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Create new module

Package.json

1) Create new folder in packages 2) Create package.json 3) !!!Set name in package.json 4) Add workspace in packaje.json

{
  "name": "@frontend-shared/{name}",
  "version": "1.0.2",
  "main": "./index.ts",
  "license": "MIT",
  "typings": "./index.ts",
  "workspaces": [
    "@frontend-shared/{name}"
  ],
}

Publish module

1) Commit all changes 2) Launch the publication command from package.json that is located in the root

Command

   "scripts": {
    "release-patch": "lerna publish patch --npm-tag latest", // 1.0.0 -> 1.0.1
    "release-minor": "lerna publish minor --npm-tag latest", // 1.0.0 -> 1.1.0
    "release-major": "lerna publish major --npm-tag latest", // 1.0.0 -> 2.0.0
    "alpha-patch": "lerna publish prepatch --npm-tag next",  //1.0.0 -> 1.0.1-alpha.0
    "alpha-minor": "lerna publish preminor --npm-tag next",  //1.0.0 -> 1.1.0-alpha.0
    "alpha-major": "lerna publish premajor --npm-tag next"   //1.0.0 -> 2.0.0-alpha.0
  }