Skip to content

Commit 24ecf5f

Browse files
Npm publish config (#13)
* fix: NPM publish configuration * fix: Updated Readme file * fix: Added npm-publish file * fix: Added workflow * fix: Updated use-shared-publish.yml file * fix: Updated use-shared-publish.yml file * fix: Updated use-shared-publish.yml file * fix: Update Readme file * fix: Updated Changelog.md file * fix: Updated file name to upload to s3 * fix: Fixed umd file name in sample application * fix: Updated Third_party file * fix: Remove publish to yml check
1 parent bec3de2 commit 24ecf5f

13 files changed

+7587
-2083
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build and Publish
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
push:
8+
branches:
9+
- stable
10+
11+
jobs:
12+
build-and-publish:
13+
uses: newrelic/video-core-js/.github/workflows/npm-publish.yml@stable
14+
with:
15+
node-version: 'lts/*'
16+
s3-path: 'media-agents/browser/dash'
17+
file-to-upload: 'dist/umd/newrelic-video-dash.min.js'
18+
secrets:
19+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
21+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# CHANGELOG
22

3-
## [3.0.1] - 2025-04-22
3+
## [3.0.2] - 2025-05-14
44

5-
- **Compatibility:** Ensured Dash.js Tracker is compatible with the latest release of Dash.js Player.
6-
- **Update:** The `errorName` attribute has been deprecated and `errorMessage` is introduced as its replacement.
5+
### Enhancements
6+
7+
* **Publishing to npm:** The package can now be published to npm, making it easily accessible.
8+
9+
### Build
10+
11+
* **Distribution Formats:** Added `cjs`, `esm`, and `umd` builds to the `dist` folder, ensuring compatibility with CommonJS, ES Modules, and UMD module formats.
712

813
## [3.0.0] - 2024/01/22
914

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,28 @@ To integrate New Relic Tracker Agent into your web application effectively, you'
3030
</body>
3131
</html>
3232
```
33+
## Adding the agent package to your project
34+
35+
To make the tracker available to your application, install via [NPM](https://docs.npmjs.com/cli/v8/commands/npm-install) or [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/).
36+
37+
```shell
38+
$ npm install @newrelic/video-dash
39+
```
40+
41+
```shell
42+
$ yarn add @newrelic/video-dash
43+
```
3344

3445
## Instantiating the Dash Tracker
3546

3647
```javascript
48+
//Add import statement
49+
import DashTracker from "@newrelic/video-dash";
3750
// Add a DashTracker
38-
nrvideo.Core.addTracker(new nrvideo.DashTracker(player));
51+
const tracker = new DashTracker(player);
3952

4053
//For setting custom attributes const tracker
41-
const tracker = new nrvideo.DashjsTracker(player, {
54+
const tracker = new DashTracker(player, {
4255
customData: {
4356
contentTitle: 'Override Existing Title',
4457
customPlayerName: 'myGreatPlayer',
@@ -51,9 +64,7 @@ tracker.setUserId('userId');
5164

5265
// For Sending custom Action with Attributes
5366

54-
const tracker = new nrvideo.DashTracker(player);
55-
56-
nrvideo.Core.addTracker(tracker);
67+
const tracker = new DashTracker(player);
5768

5869
tracker.sendCustom('CUSTOM_ACTION', 'state time', {
5970
test1: 'value1',

THIRD_PARTY_NOTICES.md

Lines changed: 812 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)