@croco/utils-next-font-pretendard 0.0.1 → 0.0.3
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/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +17 -11
- package/readme.md +26 -26
- package/src/index.js +0 -13
- package/src/index.mjs +0 -5
- /package/{src → dist}/index.d.mts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var i=Object.create;var e=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var w=(r,o)=>{for(var t in o)e(r,t,{get:o[t],enumerable:!0})},n=(r,o,t,d)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!f.call(r,a)&&a!==t&&e(r,a,{get:()=>o[a],enumerable:!(d=l(o,a))||d.enumerable});return r};var m=(r,o,t)=>(t=r!=null?i(c(r)):{},n(o||!r||!r.__esModule?e(t,"default",{value:r,enumerable:!0}):t,r)),F=r=>n(e({},"__esModule",{value:!0}),r);var g={};w(g,{pretendardFont:()=>b});module.exports=F(g);var p=m(require("next/font/local")),b=(0,p.default)({src:"../PretendardVariable.woff2",display:"swap",weight:"45 920"});0&&(module.exports={pretendardFont});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"next/font/local";var t=r({src:"../PretendardVariable.woff2",display:"swap",weight:"45 920"});export{t as pretendardFont};
|
package/package.json
CHANGED
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@croco/utils-next-font-pretendard",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"files": [
|
|
6
|
-
"
|
|
6
|
+
"dist",
|
|
7
7
|
"PretendardVariable.woff2"
|
|
8
8
|
],
|
|
9
|
-
"main": "./
|
|
10
|
-
"types": "./
|
|
11
|
-
"import": "./
|
|
12
|
-
"module": "./
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"module": "./dist/index.mjs",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"require": {
|
|
16
|
-
"types": "./
|
|
17
|
-
"default": "./
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"import": {
|
|
20
|
-
"types": "./
|
|
21
|
-
"default": "./
|
|
20
|
+
"types": "./dist/index.d.mts",
|
|
21
|
+
"default": "./dist/index.mjs"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"next": "^14.0.0"
|
|
26
|
+
"next": "^14.0.0 || ^15.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
+
"tsup": "8.3.5",
|
|
30
|
+
"next": "15.1.2",
|
|
29
31
|
"@croco/eslint-config": "0.0.0",
|
|
30
32
|
"@croco/utils-tsconfig": "0.0.0"
|
|
31
33
|
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
32
37
|
"scripts": {
|
|
38
|
+
"build": "tsup src/index.ts --format cjs,esm --dts --minify",
|
|
33
39
|
"typecheck": "tsc --noEmit",
|
|
34
40
|
"lint": "eslint **/*.ts*"
|
|
35
41
|
}
|
package/readme.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# @croco/utils-next-font-pretendard
|
|
2
|
-
|
|
3
|
-
[Next.js Font Optimization](https://nextjs.org/docs/app/building-your-application/optimizing/fonts#local-fonts)을 사용하기 위한 Pretendard 폰트 패키지입니다.
|
|
4
|
-
|
|
5
|
-
## 라이선스 및 출처
|
|
6
|
-
|
|
7
|
-
- [Pretendard](https://github.com/orioncactus/pretendard) - [SIL Open Font License 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
|
|
8
|
-
- `PretendardVariable.woff2` 파일은 [GitHub 저장소](https://github.com/orioncactus/pretendard/tree/main/packages/pretendard/dist/web/variable/woff2)에서 가져왔습니다.
|
|
9
|
-
|
|
10
|
-
## 사용법
|
|
11
|
-
|
|
12
|
-
```tsx
|
|
13
|
-
// app/layout.tsx
|
|
14
|
-
import { pretendardFont } from '@croco/utils-next-font-pretendard';
|
|
15
|
-
|
|
16
|
-
export default function RootLayout() {
|
|
17
|
-
return (
|
|
18
|
-
<html lang="ko">
|
|
19
|
-
...
|
|
20
|
-
<body className={pretendardFont.className}>
|
|
21
|
-
...
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
1
|
+
# @croco/utils-next-font-pretendard
|
|
2
|
+
|
|
3
|
+
[Next.js Font Optimization](https://nextjs.org/docs/app/building-your-application/optimizing/fonts#local-fonts)을 사용하기 위한 Pretendard 폰트 패키지입니다.
|
|
4
|
+
|
|
5
|
+
## 라이선스 및 출처
|
|
6
|
+
|
|
7
|
+
- [Pretendard](https://github.com/orioncactus/pretendard) - [SIL Open Font License 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
|
|
8
|
+
- `PretendardVariable.woff2` 파일은 [GitHub 저장소](https://github.com/orioncactus/pretendard/tree/main/packages/pretendard/dist/web/variable/woff2)에서 가져왔습니다.
|
|
9
|
+
|
|
10
|
+
## 사용법
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
// app/layout.tsx
|
|
14
|
+
import { pretendardFont } from '@croco/utils-next-font-pretendard';
|
|
15
|
+
|
|
16
|
+
export default function RootLayout() {
|
|
17
|
+
return (
|
|
18
|
+
<html lang="ko">
|
|
19
|
+
...
|
|
20
|
+
<body className={pretendardFont.className}>
|
|
21
|
+
...
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
27
|
```
|
package/src/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var r = require('next/font/local');
|
|
4
|
-
|
|
5
|
-
function _interopDefault(e) {
|
|
6
|
-
return e && e.__esModule ? e : { default: e };
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
var r__default = /*#__PURE__*/ _interopDefault(r);
|
|
10
|
-
|
|
11
|
-
const a = r__default.default({ src: '../PretendardVariable.woff2', display: 'swap' });
|
|
12
|
-
|
|
13
|
-
exports.pretendardFont = a;
|
package/src/index.mjs
DELETED
|
File without changes
|
/package/{src → dist}/index.d.ts
RENAMED
|
File without changes
|