MCPcopy Create free account
hub / github.com/fontsource/fontsource / template

Function template

packages/cli/src/templates/package.ts:13–81  ·  view source on GitHub ↗
(
	{ id, family, license, type }: Metadata,
	isVariable: boolean,
	existing?: ExistingData,
)

Source from the content-addressed store, hash-verified

11}
12
13const template = (
14 { id, family, license, type }: Metadata,
15 isVariable: boolean,
16 existing?: ExistingData,
17) => ({
18 name: isVariable ? `@fontsource-variable/${id}` : `@fontsource/${id}`,
19 version: existing?.oldVersion ?? BASE_VERSION,
20 description: `Self-host the ${family} font in a neatly bundled NPM package.`,
21 main: 'index.css',
22 publishConfig: { access: 'public' },
23 keywords: [
24 'fontsource',
25 'font',
26 'font family',
27 'google fonts',
28 id,
29 family,
30 'css',
31 'sass',
32 'front-end',
33 'web',
34 'typeface',
35 'variable',
36 ],
37 exports: {
38 '.': {
39 sass: './index.css',
40 default: './index.css',
41 },
42 './LICENSE': './LICENSE',
43 './*': {
44 sass: './*.css',
45 default: './*.css',
46 },
47 './*.css': {
48 sass: './*.css',
49 default: './*.css',
50 },
51 './files/*': {
52 sass: './files/*',
53 default: './files/*',
54 },
55 './files/*.woff': {
56 sass: './files/*.woff',
57 default: './files/*.woff',
58 },
59 './files/*.woff2': {
60 sass: './files/*.woff2',
61 default: './files/*.woff2',
62 },
63 './package.json': './package.json',
64 './metadata.json': './metadata.json',
65 './unicode.json': './unicode.json',
66 './scss': {
67 sass: './scss/metadata.scss',
68 },
69 },
70 author: type === 'other' ? license.attribution : 'Google Inc.',

Callers 1

packageJsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected