@ukic/fonts 2.0.0-alpha.117 → 2.0.0-alpha.119
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 +2 -2
- package/README.md +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ukic/fonts",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.119",
|
|
4
4
|
"description": "@ukic/fonts provides typography assets to ICDS components",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf ./dist && webpack --config webpack.config.js",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"webpack": "^5.70.0",
|
|
20
20
|
"webpack-cli": "^4.9.2"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "4deaa17746fb4b314bc767c3ffc3a4fa80d2cd3d"
|
|
23
23
|
}
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Using the UI Kit Fonts
|
|
2
|
-
|
|
3
|
-
This package includes fonts used within ICDS components.
|
|
4
|
-
|
|
5
|
-
## Adding a font
|
|
6
|
-
|
|
7
|
-
This will add a font to the package. You shouldn't have to do this.
|
|
8
|
-
|
|
9
|
-
Install the desired font from `@fontsource`:
|
|
10
|
-
|
|
11
|
-
````
|
|
12
|
-
npm install @fontsource/open-sans --save-dev
|
|
13
|
-
````
|
|
14
|
-
|
|
15
|
-
Import the package or particular font weight CSS file into `src/fonts.js`:
|
|
16
|
-
|
|
17
|
-
````js
|
|
18
|
-
// src/fonts.js
|
|
19
|
-
import '@fontsource/open-sans/300.css';
|
|
20
|
-
````
|
|
21
|
-
|
|
22
|
-
Run `npm run build` and a `dist` directory will appear with the font files and main `font.css` file
|
|
23
|
-
|
|
24
|
-
## Using this package
|
|
25
|
-
|
|
26
|
-
Run `npm install @ukic/fonts` at the root level of your project.
|
|
27
|
-
|
|
28
|
-
The `fonts.css` file can be imported:
|
|
29
|
-
|
|
30
|
-
### Javascript
|
|
31
|
-
|
|
32
|
-
````js
|
|
33
|
-
import '@ukic/fonts/dist/fonts.css'
|
|
34
|
-
````
|
|
35
|
-
|
|
36
|
-
### CSS
|
|
37
|
-
|
|
38
|
-
````css
|
|
39
|
-
/* In some cases, reference to the node_modules directory may be required. */
|
|
40
|
-
@import '@ukic/fonts/dist/fonts.css'
|
|
41
|
-
````
|
|
42
|
-
|
|
43
|
-
### Build
|
|
44
|
-
|
|
45
|
-
Webpack is used to extract the fonts from `node_modules/@fontsource/*` directory and build the `fonts.css` file
|