You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-3Lines changed: 31 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,18 +48,46 @@ Fresco is built on top of React. To run Fresco from source use the following ste
48
48
Fresco is able to be hosted from a subdirectory of a domain (i.e. https://yourhost.com/fresco/). To enable this functionality, modify the `package.json` file
49
49
50
50
51
-
```
51
+
```json
52
52
{
53
-
"name": "fresco-app",
54
-
"version": "0.1.0",
53
+
"name": "fresco",
54
+
"version": "0.0.1",
55
55
"private": true,
56
56
"homepage": "/fresco",
57
57
...
58
58
59
59
```
60
60
61
+
Also, you'll need to modify the config inside `/src/config/index.json`.
62
+
63
+
``` json
64
+
{
65
+
"homepage": "/fresco"
66
+
}
67
+
```
68
+
61
69
Then use `npm run build` to build Fresco for deployment.
62
70
71
+
## Change default Fresco styles
72
+
73
+
You are able to change the default styles that Fresco loads up with. Update `/src/config/stylesDefault.json` with any number of Mapbox style JSONs. To load multiple styles in use an array structure like shown below:
74
+
75
+
``` json
76
+
[
77
+
{
78
+
"id": "style1",
79
+
...
80
+
},{
81
+
"id": "style2",
82
+
...
83
+
}
84
+
]
85
+
```
86
+
87
+
For a single style, just replace the contents of `/src/config/stylesDefault.json` with the style JSON.
88
+
89
+
When testing default styles, you'll have to clear out your localStorage `frescoStylesStore` or use an incognito window.
90
+
63
91
## Contributing
64
92
65
93
Contributions are welcome! Fork the repo and send in a PR with any bug fixes or features.
0 commit comments