| 11 | } |
| 12 | |
| 13 | const 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.', |