From d64a8a5e54b328e91275575903b8c546be86cb99 Mon Sep 17 00:00:00 2001 From: matthewgonzalez Date: Sun, 26 Nov 2017 18:13:39 -0800 Subject: [PATCH] modify readme; update version to prepare for release --- README.md | 13 +++++-------- lib/__tests__/font.test.ts | 2 +- lib/css.ts | 4 ++-- lib/font.ts | 2 +- package.json | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 50f4f43..745bb9e 100644 --- a/README.md +++ b/README.md @@ -28,19 +28,16 @@ npm run lint npm run test ``` -### Recommended CSS +### Generated CSS (recommended) _Stolen directly from the Typekit site 💂💰_ ```css + @font-face { - font-family:"my-font"; - font-style: italic; - font-weight: 400; - src: url("https://mysite.com/my-font-400.woff2") format("woff2), - url("https://mysite.com/my-font-400.woff") format("woff"), - url("https://mysite.com/my-font-400.ttf") format("truetype"), /* if TTF file available */ - url("https://mysite.com/my-font-400.otf") format("opentype"); /* if OTF file available */ + font-family:"My Font"; + src:url("my-font.woff2") format("woff2"),url("my-font.woff") format("woff"),url("my-font.otf") format("opentype"); + font-style:normal;font-weight:400; } ``` diff --git a/lib/__tests__/font.test.ts b/lib/__tests__/font.test.ts index 42eab17..802e8d2 100644 --- a/lib/__tests__/font.test.ts +++ b/lib/__tests__/font.test.ts @@ -24,5 +24,5 @@ it('should have an extension', () => { it('should have a human font name', () => { expect(fc.fontNameHuman).not.toBeUndefined() expect(fc.fontNameHuman).not.toEqual(null) - fc.cleanup() + fc.cleanup() }) diff --git a/lib/css.ts b/lib/css.ts index 9c658bc..0a417d1 100644 --- a/lib/css.ts +++ b/lib/css.ts @@ -14,12 +14,12 @@ export class CSS extends Font { font-family:"${fontNameHuman}"; src:url("${nameWithoutExt}.woff2") format("woff2"),url("${nameWithoutExt}.woff") format("woff"),url("${nameWithoutExt}.otf") format("opentype"); font-style:normal;font-weight:400; - } +} ` fs.writeFileSync(this.outFile, cssOutput) } - get ext() { + get ext () { return 'css' } diff --git a/lib/font.ts b/lib/font.ts index b992728..41dca89 100644 --- a/lib/font.ts +++ b/lib/font.ts @@ -30,7 +30,7 @@ export class Font { } export () { - + const font = this.readFont() const outBuffer = font.write({ diff --git a/package.json b/package.json index 13350b3..e5047f4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fontplop", "productName": "fontplop", - "version": "1.2.0", + "version": "1.3.0", "description": "Drag'n'drop font converter.", "main": "src/index.ts", "scripts": {