emily-css 1.0.5 → 1.0.7

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/README.md CHANGED
@@ -175,7 +175,6 @@ Edit `emily.config.json` to customise:
175
175
  },
176
176
 
177
177
  "purge": {
178
- "sourceDir": "./src",
179
178
  "extensions": [".html", ".jsx", ".tsx", ".vue"]
180
179
  }
181
180
  }
@@ -254,7 +253,7 @@ All utilities are built with WCAG 2.2 AA in mind:
254
253
  npm test
255
254
  ```
256
255
 
257
- 66 automated tests covering colour generation, utilities, variants, config integrity, and build output. All passing.
256
+ 72 automated tests covering colour generation, utilities, variants, config integrity, and build output. All passing.
258
257
 
259
258
  ## Troubleshooting
260
259
 
@@ -278,17 +277,26 @@ npx emily-css purge
278
277
 
279
278
  ## Fonts
280
279
 
281
- Emily includes built-in support for **Inter** and **Lexend** via Google Fonts. Set `fontFamily` in your config and the generated CSS handles the import automatically:
280
+ EmilyUI includes built-in support for **Inter** and **Lexend** via Google Fonts CDN. No font files to download or host — the generated CSS handles the import automatically.
281
+
282
+ Set `fontFamily` as an object to use different fonts for headings and body:
282
283
 
283
284
  ```json
284
- "fontFamily": "inter"
285
+ "fontFamily": {
286
+ "heading": "lexend",
287
+ "body": "inter"
288
+ }
285
289
  ```
286
290
 
291
+ Or as a string if you want one font throughout:
292
+
287
293
  ```json
288
- "fontFamily": "lexend"
294
+ "fontFamily": "inter"
289
295
  ```
290
296
 
291
- To use your own font, set `fontFamily` to any value (e.g. `"system"` for system-ui), then add your own `@import` or `<link>` to your HTML before loading `emily.css`.
297
+ Supported values: `inter`, `lexend`, `system` (system-ui stack), `georgia`, `mono`.
298
+
299
+ To use a custom font, set `fontFamily` to any other value and add your own `@import` or `<link>` to your HTML before loading `emily.css`.
292
300
 
293
301
  ## Support
294
302
 
package/bin/emilyui.js CHANGED
@@ -5,7 +5,8 @@ const command = process.argv[2];
5
5
  if (command === "init") {
6
6
  require("../src/init.js");
7
7
  } else if (command === "build") {
8
- require("../src/index.js");
8
+ const { build } = require("../src/index.js");
9
+ build();
9
10
  } else if (command === "purge") {
10
11
  require("../src/purge-cmd.js");
11
12
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emily-css",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "A config-driven utility CSS framework. Define your brand once, generate the CSS.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -857,7 +857,10 @@ function build(options = {}) {
857
857
  // components → reserved for future component styles
858
858
  // utilities → generated utility classes (highest priority)
859
859
  const { fontFace, bodyFont } = generateFontCSS(config);
860
- console.log(`✓ Font: ${config.fontFamily || 'system'}`);
860
+ const fontLabel = typeof config.fontFamily === 'object'
861
+ ? 'heading: ' + (config.fontFamily.heading || 'system') + ', body: ' + (config.fontFamily.body || 'system')
862
+ : (config.fontFamily || 'system');
863
+ console.log('✓ Font: ' + fontLabel);
861
864
 
862
865
  const baseCss = `
863
866
  /* Box sizing */