Skip to content

Commit 2c89401

Browse files
author
brizental
committed
Update web extensions sample instructions
1 parent ef5e5c9 commit 2c89401

File tree

4 files changed

+1638
-3048
lines changed

4 files changed

+1638
-3048
lines changed

samples/web-extension/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ Whenever this web extensions popup is opened it will trigger Glean.js events.
1010
1111
## How to run this sample
1212

13-
1. Build Glean.js for web extensions. On the root folder of this repository run:
14-
15-
```bash
16-
npm run build:webext
17-
```
18-
19-
2. Generate metrics and pings files.
13+
1. Generate metrics and pings files.
2014

2115
```bash
2216
npm run glean_parser
@@ -26,6 +20,11 @@ npm run glean_parser
2620
> glean_parser is a Python package. To install it run `pip install glean_parser`.
2721
> Javascript support was added to glean_parser on version 2.1.0, make sure your version is up to date.
2822
23+
2. Link the `@mozilla/glean` package. On this `web-extension` folder run:
24+
25+
```bash
26+
npm link @mozilla/glean
27+
```
2928

3029
3. Build this sample. On this `web-extension` folder run:
3130

samples/web-extension/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
"use strict";
66

7-
import Glean from "glean";
7+
import Glean from "@mozilla/glean/webext";
88
import { custom } from "./generated/pings";
99
import { webextStarted, popupOpened } from "./generated/sample";
1010

0 commit comments

Comments
 (0)