@guardian/ophan-tracker-js 2.1.0-next.0 → 2.1.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme.md CHANGED
@@ -10,7 +10,7 @@ $ npm install ophan-tracker-js
10
10
 
11
11
  ## Contribute
12
12
 
13
- #### Proxy tracker-ts:
13
+ #### Proxy tracker-js:
14
14
 
15
15
  1. Install dependencies
16
16
 
@@ -19,28 +19,22 @@ $ npm install ophan-tracker-js
19
19
  .../ophan/tracker-js $ npm install
20
20
  ```
21
21
 
22
- 2. In one terminal window:
23
-
24
- ```
25
- .../ophan/tracker-js $ npm run coffee-to-esm:watch
26
- ```
27
-
28
- 3. In another terminal window:
22
+ 2. In another terminal window:
29
23
 
30
24
  ```
31
25
  .../ophan/tracker-js $ lighttpd -f lighttpd.conf -D
32
26
  ```
33
27
 
34
- 4. Install FoxyProxy (https://getfoxyproxy.org/downloads/) in your browser and create a rule that forces j.ophan.co.uk
28
+ 3. Install FoxyProxy (https://getfoxyproxy.org/downloads/) in your browser and create a rule that forces j.ophan.co.uk
35
29
  to localhost 8000. (For me FoxyProxy needed a few switches on and off before it decided to start talking to lighttpd.)
36
30
 
37
- 5. In another terminal window, start a server that is [running the Guardian frontend](https://github.com/guardian/frontend/blob/main/docs/01-start-here/01-installation-steps.md)
31
+ 4. In another terminal window, start a server that is [running the Guardian frontend](https://github.com/guardian/frontend/blob/main/docs/01-start-here/01-installation-steps.md)
38
32
 
39
- 6. Navigate to where you are running the Guardian locally (e.g. https://localhost:9000/uk)
33
+ 5. Navigate to where you are running the Guardian locally (e.g. https://localhost:9000/uk)
40
34
 
41
- 7. Ensure FoxyProxy is enabled
35
+ 6. Ensure FoxyProxy is enabled
42
36
 
43
- 8. Develop with pleasure
37
+ 7. Develop with pleasure
44
38
 
45
39
  ## Publish
46
40
 
@@ -62,8 +56,14 @@ We use `changesets` for automated publishing of the NPM package:
62
56
 
63
57
  3. When the PR is merged, the [`changesets` github action](https://github.com/changesets/action) will create a new PR, [example here](https://github.com/guardian/ophan/pull/5626). On merging this generated PR, the action will publish to NPM. (This checks the subdirectory correctly.)
64
58
 
65
- _Note:_ This seems like an unnecessary extra step and another PR to merge. This action is useful for multi-package repos, and packages with more frequent changes where it consolidates changes from multiple PR's into a single release. This therefore does not apply to us, but we've had issues publishing straight to NPM via the initial action on merge to main.
66
-
67
59
  ##### S3 Bucket
68
60
 
69
61
  * [https://j.ophan.co.uk/](https://j.ophan.co.uk/jobs.js) - CDN/S3, [deployed through RiffRaff](https://riffraff.gutools.co.uk/deployment/history?projectName=ophan%3A%3Aophan-tracker-js&page=1) and used by some Guardian sites like https://jobs.theguardian.com/. An advantage of this approach is that sites using it immediately get Tracker JS updates, without developer intervention.
62
+
63
+ ##### Rollup
64
+
65
+ The generated files from Rollup are only used for publishing to the CDN to use SystemJS / AMD
66
+
67
+ ##### Example Usage
68
+
69
+ You can see example usage of the library on theguardian.com [here](https://github.com/guardian/dotcom-rendering/blob/main/dotcom-rendering/src/client/ophan/ophan.ts)