File tree Expand file tree Collapse file tree 4 files changed +1638
-3048
lines changed Expand file tree Collapse file tree 4 files changed +1638
-3048
lines changed Original file line number Diff line number Diff 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
2216npm 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
30293 . Build this sample. On this ` web-extension ` folder run:
3130
Original file line number Diff line number Diff line change 44
55"use strict" ;
66
7- import Glean from "glean" ;
7+ import Glean from "@mozilla/ glean/webext " ;
88import { custom } from "./generated/pings" ;
99import { webextStarted , popupOpened } from "./generated/sample" ;
1010
You can’t perform that action at this time.
0 commit comments