@drivy/cobalt 0.23.0 → 0.24.0
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/package.json +3 -2
- package/styles/core/fonts.scss +7 -0
- package/styles/core.scss +1 -0
- package/styles/fonts/README.md +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"core-js": "3.26.1",
|
|
69
69
|
"css-loader": "6.7.2",
|
|
70
70
|
"eslint": "8.28.0",
|
|
71
|
+
"file-loader": "6.2.0",
|
|
71
72
|
"jest": "29.3.1",
|
|
72
73
|
"jest-environment-jsdom": "29.3.1",
|
|
73
74
|
"nested-object-access": "^0.2.5",
|
|
@@ -133,7 +134,7 @@
|
|
|
133
134
|
},
|
|
134
135
|
"files": [
|
|
135
136
|
"tokens/**/*",
|
|
136
|
-
"**/*.{scss,css,d.ts,js,js.map,svg,png,woff,woff2}",
|
|
137
|
+
"**/*.{scss,css,d.ts,js,js.map,svg,png,woff,woff2,md}",
|
|
137
138
|
".stylelintrc.js"
|
|
138
139
|
],
|
|
139
140
|
"publishConfig": {
|
package/styles/core.scss
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Our official font `BrownPro` in its `Bold` version is a licensed paid web font, meaning that we can't distribute it through our NPM package. So you won't find any font files directly in our design system. If you want to use a font as `Brown-Pro`, just add a font file in this `fonts/` folder named `BrownPro-Bold.woff`.
|
|
2
|
+
|
|
3
|
+
You can do it using a `postinstall` script to automatically doing it when installing/upgrading the Cobalt NPM package:
|
|
4
|
+
```javascript
|
|
5
|
+
const path = require("path")
|
|
6
|
+
const fs = require("fs-extra")
|
|
7
|
+
|
|
8
|
+
fs.copyFileSync(
|
|
9
|
+
path.join("<path_to_your_font_to_copy>", "BrownPro-Bold.woff"),
|
|
10
|
+
path.join(__dirname, "../node_modules/@drivy/cobalt/styles/fonts/BrownPro-Bold.woff")
|
|
11
|
+
)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
By doing this, Cobalt will use your provided font when using the `BrownPro` family.
|