Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish scripts #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.1.3 (October 28, 2022)
* Introduced publish scripts

## 3.1.2 (October 28, 2022)
* To fix the incorrect deploy of 3.1.1

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## Table of Contents
- [Description](#description)
- [Publish](#publish)
- [Available Functions](#Available-Functions)
- [REST Clients](#REST-Clients)
- [NoAuthRestClient](#NoAuthRestClient)
Expand Down Expand Up @@ -30,6 +31,10 @@ To install, type
npm install @elastic.io/component-commons-library
```

# Publish
To publish the library one first needs to run `tsc` and then publish via either `npm publish` or `npm publish --tag dev`.
Alternatively, and this is a recommended way, you can simply run a predefined npm script - one of `npm run publish-dev` or `npm run publish-prod`.

# Available Functions

## REST Clients
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"posttest": "tsc",
"test": "nyc mocha --require ts-node/register \"spec/**/*spec.ts\" --timeout 50000",
"integration-test": "npm run pretest && nyc mocha --require ts-node/register \"spec-integration/**/*spec.ts\" --timeout 500000",
"build": "rm -rf dist && tsc"
"build": "rm -rf dist && tsc",
"publish-dev": "npm run build && npm publish --tag dev",
"publish-prod": "npm run build && npm publish"
},
"dependencies": {
"@elastic.io/jsonata-moment": "1.1.5",
Expand Down