Skip to content

Commit bbd4111

Browse files
authored
Upgraded upgrade guide (#347)
1 parent 5415a35 commit bbd4111

File tree

1 file changed

+2
-81
lines changed

1 file changed

+2
-81
lines changed

UPGRADE.md

+2-81
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,3 @@
1-
# Paradox
2-
3-
This first section is what Paradox most likely needs to update. The "Version 2 to Version 3" section is the full reference guide.
4-
5-
### NPM
6-
7-
Updates are still being made, so this command may need to be run again later
8-
9-
```
10-
yarn upgrade traitify-widgets@alpha
11-
```
12-
13-
### Auth
14-
15-
```
16-
// Old
17-
Traitify.setHost("https://api.traitify.com");
18-
Traitify.setPubliCKey("Your Traitify public key");
19-
20-
// New
21-
Traitify.http.authKey = "Your Traitify public key";
22-
Traitify.http.host = "https://api.traitify.com";
23-
```
24-
25-
### Component
26-
27-
```
28-
// Old
29-
assessment = traitify.ui.component();
30-
assessment.assessmentID("an assessment id you have generated via a server side client");
31-
assessment.target("#the-id-of-the-target-you-wish-to-render-to");
32-
assessment.render();
33-
34-
// New
35-
Traitify.options.assessmentID = "your-assessment-id";
36-
Traitify.render("#the-id-of-the-target-you-wish-to-render-to");
37-
```
38-
39-
When using a benchmark
40-
41-
```
42-
Traitify.options.benchmarkID = "your-benchmark-id";
43-
Traitify.options.profileID = "your-profile-id";
44-
```
45-
46-
### Locale
47-
48-
```
49-
// Old
50-
assessment.locale("es-us");
51-
Traitify.ui.setLocale("es-us");
52-
53-
// New
54-
Traitify.options.locale = "es-us";
55-
Traitify.updateLocale("es-us"); // Needed if widget is already rendered
56-
```
57-
58-
### Report
59-
60-
```
61-
// Old
62-
assessment.perspective("thirdPerson");
63-
assessment.view("manager");
64-
65-
// New
66-
Traitify.options.report = "manager";
67-
```
68-
69-
### Other
70-
71-
- Remove `.theme("paradox")`
72-
731
# Version 2 to Version 3
742

753
## General
@@ -92,8 +20,6 @@ Traitify.options.report = "manager";
9220

9321
### CDN
9422

95-
##### NOTE: This change is not yet live
96-
9723
```
9824
<!-- Old -->
9925
<script src="https://cdn.traitify.com/js/v2/traitify.js"></script>
@@ -102,19 +28,14 @@ Traitify.options.report = "manager";
10228
<script src="https://cdn.traitify.com/js/v3/traitify.js"></script>
10329
```
10430

105-
### Installation
106-
107-
##### NOTE: This change is not yet live
31+
### npm
10832

10933
```
110-
npm i --save traitify-widgets@latest
11134
npm i --save traitify-widgets@2 // To continue to use the old version
11235
```
11336

114-
##### NOTE: This is the current workaround
115-
11637
```
117-
npm i --save traitify-widgets@alpha
38+
npm i --save traitify-widgets@latest // New version
11839
```
11940

12041
## Usage

0 commit comments

Comments
 (0)