yummacss 2.1.0 → 3.0.1

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.
Files changed (78) hide show
  1. package/LICENSE +17 -18
  2. package/README.md +58 -23
  3. package/dist/cli/commands/build.js +43 -0
  4. package/dist/cli/commands/init.js +19 -0
  5. package/dist/cli/commands/watch.js +48 -0
  6. package/dist/cli/config/defaultConfig.js +9 -0
  7. package/dist/cli/config/templates.js +33 -0
  8. package/dist/cli/lang.js +23 -0
  9. package/dist/cli/lib/cli-lang.js +23 -0
  10. package/dist/cli/lib/cli-ui.js +14 -0
  11. package/dist/cli/services/configLoader.js +42 -0
  12. package/dist/cli/services/minifyService.js +16 -0
  13. package/dist/cli/services/purgeService.js +12 -0
  14. package/dist/cli/services/scssCompiler.js +34 -0
  15. package/dist/cli/src/cli.js +16 -0
  16. package/dist/cli/utils/cli-ui.js +13 -0
  17. package/dist/cli/utils/ui.js +15 -0
  18. package/package.json +65 -24
  19. package/src/_fonts.scss +8 -6
  20. package/src/abstracts/_breakpoints.scss +12 -10
  21. package/src/abstracts/_index.scss +5 -0
  22. package/src/abstracts/_theme.scss +19 -16
  23. package/src/abstracts/_variables.scss +70 -56
  24. package/src/abstracts/functions/_create-values.scss +16 -0
  25. package/src/abstracts/functions/_ignore-neutral.scss +9 -0
  26. package/src/abstracts/functions/_index.scss +2 -0
  27. package/src/abstracts/mixins/_create-colors.scss +39 -0
  28. package/src/abstracts/mixins/_create-utilities.scss +39 -0
  29. package/src/abstracts/mixins/_extend-utilities.scss +24 -0
  30. package/src/abstracts/mixins/_index.scss +3 -0
  31. package/src/reset/_stylecent.scss +231 -0
  32. package/src/utilities/_background.scss +95 -0
  33. package/src/utilities/_border.scss +313 -0
  34. package/src/utilities/_box-model.scss +274 -91
  35. package/src/utilities/_color.scss +85 -0
  36. package/src/utilities/_effect.scss +98 -0
  37. package/src/utilities/_flexbox.scss +122 -56
  38. package/src/utilities/_grid.scss +52 -95
  39. package/src/utilities/_index.scss +14 -0
  40. package/src/utilities/_interactivity.scss +304 -0
  41. package/src/utilities/_outline.scss +53 -0
  42. package/src/utilities/_positioning.scss +436 -0
  43. package/src/utilities/_svg.scss +27 -0
  44. package/src/utilities/_table.scss +35 -0
  45. package/src/utilities/_transform.scss +164 -0
  46. package/src/utilities/_typography.scss +167 -57
  47. package/src/utilities/maps/_index.scss +12 -0
  48. package/src/utilities/maps/box-model/_dimension.scss +16 -0
  49. package/src/utilities/maps/box-model/_height.scss +16 -0
  50. package/src/utilities/maps/box-model/_margin.scss +10 -0
  51. package/src/utilities/maps/box-model/_padding.scss +10 -0
  52. package/src/utilities/maps/box-model/_width.scss +16 -0
  53. package/src/utilities/maps/flexbox/_flex-basis.scss +12 -0
  54. package/src/utilities/maps/grid/_gap.scss +5 -0
  55. package/src/yummacss-core.scss +3 -0
  56. package/src/yummacss.scss +4 -0
  57. package/.prettierrc +0 -9
  58. package/CHANGELOG.md +0 -58
  59. package/dist/yumma-core.css +0 -238809
  60. package/dist/yumma-core.min.css +0 -1
  61. package/dist/yumma.css +0 -238878
  62. package/dist/yumma.min.css +0 -1
  63. package/gulpfile.js +0 -44
  64. package/src/_base.scss +0 -72
  65. package/src/abstracts/_colors.scss +0 -29
  66. package/src/abstracts/_extensions.scss +0 -19
  67. package/src/abstracts/_functions.scss +0 -3
  68. package/src/abstracts/_layout.scss +0 -18
  69. package/src/abstracts/_mixins.scss +0 -575
  70. package/src/core.scss +0 -3
  71. package/src/utilities/_borders.scss +0 -214
  72. package/src/utilities/_effects.scss +0 -74
  73. package/src/utilities/_filters.scss +0 -57
  74. package/src/utilities/_interactions.scss +0 -111
  75. package/src/utilities/_layout.scss +0 -310
  76. package/src/utilities/_outlines.scss +0 -76
  77. package/src/utilities/_tables.scss +0 -61
  78. package/src/yumma.scss +0 -23
package/LICENSE CHANGED
@@ -1,21 +1,20 @@
1
- MIT License
1
+ Copyright (c) 2023-present Yumma CSS maintained by Renildo Pereira.
2
2
 
3
- Copyright (c) Yumma CSS
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
4
10
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
11
13
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
20
- OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,31 +1,66 @@
1
- <div align="center">
2
- <a href="https://yummacss.com" target="_blank">
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="https://www.yummacss.com/assets/vectors/dark-logo.svg">
5
- <source media="(prefers-color-scheme: light)" srcset="https://www.yummacss.com/assets/vectors/light-logo.svg">
6
- <img alt="Yumma CSS" src="https://www.yummacss.com/assets/vectors/light-logo.svg" width="220" style="max-width: 100%;">
7
- </picture>
8
- </a>
9
- </div>
1
+ # [@yummacss](https://www.npmjs.com/package/yummacss)
10
2
 
11
- <p align="center">
12
- All the tools you need in one package, with abbreviated utility classes — goodbye, massive codebases!
13
- <br>
14
- <a href="https://yummacss.com"><strong>Read the documentation ↝</strong></a>
15
- </p>
3
+ A CSS framework for the web with abbreviated styles.
16
4
 
17
- ---
5
+ [![NPM Version](https://img.shields.io/npm/v/yummacss?style=plastic&label=yummacss&labelColor=eaedfc&color=413cb8)](https://www.npmjs.com/package/yummacss)
6
+ [![NPM Downloads](https://img.shields.io/npm/d18m/yummacss?style=plastic&label=downloads&labelColor=eaedfc&color=413cb8)](https://www.npmjs.com/package/yummacss)
18
7
 
19
- ### Support
8
+ ## Getting started
20
9
 
21
- [Join our Discord server](https://discord.gg/CGw5vyqmQ6). To get support just createa post in the `#help` channel with the <kbd>yummacss</kbd> tag.
10
+ Yumma CSS is a CSS framework packed with a set of abbreviated utility classes for building faster and more maintainable UIs.
22
11
 
23
- ### Contributing
12
+ ### Installing
24
13
 
25
- I'd love your help with Yumma CSS. I've included some links below which you might find useful.
14
+ A step by step series of examples that tell you how to get a development
15
+ environment running
26
16
 
27
- - [Join us on the `#yummacss` channel on Discord](https://discord.gg/V6s5jg5TfX)
28
-
29
- ### Licensing
17
+ Install Yumma CSS
30
18
 
31
- MIT — Copyright (c) 2023–present [Renildo Pereira](https://github.com/yumma-lib/yumma-css/graphs/contributors).
19
+ ```
20
+ npm i yummacss -D
21
+ ```
22
+
23
+ Initialize configuration
24
+
25
+ ```
26
+ npx yummacss init
27
+ ```
28
+
29
+ Our [framework guides](https://www.yummacss.com/docs/installation#framework-guides) will teach you how to set up your configuration file.
30
+
31
+ ## Development setup
32
+
33
+ The Yumma CSS CLI provides several commands to help you work with your Yumma CSS files.
34
+
35
+ > [!IMPORTANT]
36
+ > Make sure you have a `yumma.config.js` file set up before running these commands. If you haven’t, run `npx yummacss init` first.
37
+
38
+ ### Building styles
39
+
40
+ The `build` command will compile your Yumma CSS files once.
41
+
42
+ ```bash
43
+ npx yummacss build
44
+ ```
45
+
46
+ ### Watching changes
47
+
48
+ The `watch` command will watch for changes in your Yumma CSS files and recompile them automatically.
49
+
50
+ ```bash
51
+ npx yummacss watch
52
+ ```
53
+
54
+ ## Documentation
55
+
56
+ Head over to [yummacss.com](https://www.yummacss.com) for the full documentation.
57
+
58
+ ## Built with
59
+
60
+ - [gulp](https://www.npmjs.com/package/gulp) - The streaming build system.
61
+ - [sass](https://www.npmjs.com/package/sass) - CSS with superpowers.
62
+ - [typescript](https://www.npmjs.com/package/typescript) - A language for application-scale JavaScript.
63
+
64
+ ## License
65
+
66
+ This project is licensed under the [MIT License](LICENSE)
@@ -0,0 +1,43 @@
1
+ import { writeFileSync } from "fs";
2
+ import { messages } from "../lib/cli-lang.js";
3
+ import { cli } from "../lib/cli-ui.js";
4
+ import { loadConfig } from "../services/configLoader.js";
5
+ import { minifyCSS } from "../services/minifyService.js";
6
+ import { purgeCSS } from "../services/purgeService.js";
7
+ import { compileSCSS } from "../services/scssCompiler.js";
8
+ let cache = {};
9
+ export async function build(existingConfig, forceRebuild = false) {
10
+ const buildSpinner = cli.startSpinner(messages.build.start);
11
+ const startTime = Date.now();
12
+ try {
13
+ const config = existingConfig || (await loadConfig());
14
+ const configHash = JSON.stringify(config);
15
+ const configChanged = cache.configHash !== configHash;
16
+ let css;
17
+ if (forceRebuild || configChanged || !cache.css) {
18
+ buildSpinner.text = messages.build.compiling;
19
+ const result = await compileSCSS(config);
20
+ css = result.css;
21
+ cache = {
22
+ css: result.css,
23
+ dependencies: result.dependencies,
24
+ configHash,
25
+ };
26
+ }
27
+ else {
28
+ css = cache.css;
29
+ buildSpinner.text = messages.build.usingCache;
30
+ }
31
+ buildSpinner.text = messages.build.purging;
32
+ const purgedCSS = await purgeCSS(css, config);
33
+ buildSpinner.text = messages.build.minifying;
34
+ const finalCSS = minifyCSS(purgedCSS, config);
35
+ writeFileSync(config.output, finalCSS);
36
+ buildSpinner.succeed(messages.build.success(Date.now() - startTime, config.output));
37
+ }
38
+ catch (error) {
39
+ buildSpinner.fail(messages.build.fail);
40
+ cli.error(error instanceof Error ? error.message : messages.common.unknownError);
41
+ process.exit(1);
42
+ }
43
+ }
@@ -0,0 +1,19 @@
1
+ import { writeFileSync } from "fs";
2
+ import { generateConfigFile } from "../config/templates.js";
3
+ import { messages } from "../lib/cli-lang.js";
4
+ import { cli } from "../lib/cli-ui.js";
5
+ const DEFAULT_CONFIG_EXTENSION = ".js";
6
+ export function init() {
7
+ const init = cli.startSpinner(messages.init.start);
8
+ try {
9
+ const configContent = generateConfigFile(DEFAULT_CONFIG_EXTENSION);
10
+ const configFileName = `yumma.config${DEFAULT_CONFIG_EXTENSION}`;
11
+ writeFileSync(configFileName, configContent);
12
+ init.succeed(messages.init.success);
13
+ }
14
+ catch (error) {
15
+ init.fail(messages.init.fail);
16
+ cli.error(error instanceof Error ? error.message : messages.common.unknownError);
17
+ process.exit(1);
18
+ }
19
+ }
@@ -0,0 +1,48 @@
1
+ import chok from "chokidar";
2
+ import { globby } from "globby";
3
+ import { messages } from "../lib/cli-lang.js";
4
+ import { cli } from "../lib/cli-ui.js";
5
+ import { loadConfig } from "../services/configLoader.js";
6
+ import { build } from "./build.js";
7
+ let currentConfig;
8
+ let buildTimeout = null;
9
+ let changedFiles = new Set();
10
+ export async function watch() {
11
+ const watchSpinner = cli.startSpinner(messages.watch.start);
12
+ try {
13
+ currentConfig = await loadConfig();
14
+ await build(currentConfig, true);
15
+ const files = await globby(currentConfig.source);
16
+ const watcher = chok.watch(files, {
17
+ awaitWriteFinish: {
18
+ pollInterval: 50,
19
+ stabilityThreshold: 200,
20
+ },
21
+ ignored: /(^|[/\\])\../,
22
+ ignoreInitial: true,
23
+ persistent: true,
24
+ });
25
+ watcher
26
+ .on("add", (path) => handleChange(path, "added"))
27
+ .on("change", (path) => handleChange(path, "changed"))
28
+ .on("unlink", (path) => handleChange(path, "removed"));
29
+ function handleChange(path, event) {
30
+ changedFiles.add(path);
31
+ if (buildTimeout) {
32
+ clearTimeout(buildTimeout);
33
+ }
34
+ buildTimeout = setTimeout(async () => {
35
+ if (changedFiles.size > 0) {
36
+ await build(currentConfig, true);
37
+ changedFiles.clear();
38
+ }
39
+ buildTimeout = null;
40
+ }, 500); // 500ms
41
+ }
42
+ }
43
+ catch (error) {
44
+ watchSpinner.fail(messages.watch.fail);
45
+ cli.error(error instanceof Error ? error.message : messages.common.unknownError);
46
+ process.exit(1);
47
+ }
48
+ }
@@ -0,0 +1,9 @@
1
+ const defaultConfig = {
2
+ source: [""],
3
+ output: "",
4
+ buildOptions: {
5
+ reset: true,
6
+ minify: false,
7
+ },
8
+ };
9
+ export { defaultConfig };
@@ -0,0 +1,33 @@
1
+ import { readFileSync } from "fs";
2
+ import { join, dirname } from "path";
3
+ import { fileURLToPath } from "url";
4
+ import { defaultConfig } from "./defaultConfig.js";
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+ const TEMPLATES_DIR = join(__dirname, "templates");
8
+ const CONFIG_PLACEHOLDER = "{{CONFIG}}";
9
+ const SUPPORTED_TEMPLATES = [
10
+ { extension: ".js", templateFile: "yumma.config.js.template" },
11
+ ];
12
+ function loadTemplate(templateFile) {
13
+ const templatePath = join(TEMPLATES_DIR, templateFile);
14
+ return readFileSync(templatePath, "utf-8");
15
+ }
16
+ function generateConfigContent(template, config) {
17
+ const configString = JSON.stringify(config, null, 2);
18
+ return template.replace(CONFIG_PLACEHOLDER, configString);
19
+ }
20
+ export function generateConfigFile(extension) {
21
+ const templateInfo = SUPPORTED_TEMPLATES.find(t => t.extension === extension);
22
+ if (!templateInfo) {
23
+ throw new Error(`Unsupported config extension: ${extension}`);
24
+ }
25
+ const template = loadTemplate(templateInfo.templateFile);
26
+ return generateConfigContent(template, defaultConfig);
27
+ }
28
+ export function getSupportedExtensions() {
29
+ return SUPPORTED_TEMPLATES.map(t => t.extension);
30
+ }
31
+ export function isSupportedExtension(extension) {
32
+ return SUPPORTED_TEMPLATES.some(t => t.extension === extension);
33
+ }
@@ -0,0 +1,23 @@
1
+ export const messages = {
2
+ build: {
3
+ start: "Building...",
4
+ compiling: "Compiling...",
5
+ usingCache: "Using cache...",
6
+ purging: "Purging...",
7
+ minifying: "Minifying...",
8
+ success: (ms, output) => `Build done in ${ms}ms. (${output})`,
9
+ fail: "Build failed.",
10
+ },
11
+ init: {
12
+ start: "Creating config...",
13
+ success: "Config created.",
14
+ fail: "Config failed.",
15
+ },
16
+ watch: {
17
+ start: "Watching for changes...",
18
+ fail: "Watch failed.",
19
+ },
20
+ common: {
21
+ unknownError: "Unknown error.",
22
+ },
23
+ };
@@ -0,0 +1,23 @@
1
+ export const messages = {
2
+ build: {
3
+ start: "Building...",
4
+ compiling: "Compiling...",
5
+ usingCache: "Using cache...",
6
+ purging: "Purging...",
7
+ minifying: "Minifying...",
8
+ success: (ms, output) => `Build done in ${ms}ms. (${output})`,
9
+ fail: "Build failed.",
10
+ },
11
+ init: {
12
+ start: "Creating config...",
13
+ success: "Config created.",
14
+ fail: "Config failed.",
15
+ },
16
+ watch: {
17
+ start: "Watching...",
18
+ fail: "Watch failed.",
19
+ },
20
+ common: {
21
+ unknownError: "Unknown error.",
22
+ },
23
+ };
@@ -0,0 +1,14 @@
1
+ import ora from "ora";
2
+ const spinner = ora({
3
+ spinner: "sand",
4
+ });
5
+ const cli = {
6
+ success: (msg) => console.log(`✔ ${msg}`),
7
+ info: (msg) => console.log(`ℹ ${msg}`),
8
+ error: (msg) => console.log(`✗ ${msg}`),
9
+ startSpinner: (text) => {
10
+ const spinner = ora({ spinner: "sand", color: "white" }).start(text);
11
+ return spinner;
12
+ },
13
+ };
14
+ export { spinner, cli };
@@ -0,0 +1,42 @@
1
+ import { join, extname } from "path";
2
+ import { pathToFileURL } from "url";
3
+ import { existsSync } from "fs";
4
+ import { defaultConfig } from "../config/defaultConfig.js";
5
+ import { getSupportedExtensions } from "../config/templates.js";
6
+ const CONFIG_BASE = "yumma.config";
7
+ const SUPPORTED_EXTENSIONS = getSupportedExtensions();
8
+ const EXTENSION_LOADERS = {
9
+ ".js": async (path) => {
10
+ const configUrl = pathToFileURL(path).href;
11
+ return (await import(configUrl)).default;
12
+ },
13
+ };
14
+ function findConfigFile(cwd) {
15
+ for (const ext of SUPPORTED_EXTENSIONS) {
16
+ const file = join(cwd, `${CONFIG_BASE}${ext}`);
17
+ if (existsSync(file))
18
+ return file;
19
+ }
20
+ return null;
21
+ }
22
+ export async function loadConfig() {
23
+ const cwd = process.cwd();
24
+ const configPath = findConfigFile(cwd);
25
+ if (!configPath) {
26
+ throw new Error(`No config file found. Supported: ${CONFIG_BASE}${SUPPORTED_EXTENSIONS.join(", ")}`);
27
+ }
28
+ const ext = extname(configPath);
29
+ const loader = EXTENSION_LOADERS[ext];
30
+ if (!loader) {
31
+ throw new Error(`Unsupported config file extension: ${ext}`);
32
+ }
33
+ const userConfig = await loader(configPath);
34
+ return {
35
+ ...defaultConfig,
36
+ ...userConfig,
37
+ buildOptions: {
38
+ ...defaultConfig.buildOptions,
39
+ ...userConfig.buildOptions,
40
+ },
41
+ };
42
+ }
@@ -0,0 +1,16 @@
1
+ import { transform } from "lightningcss";
2
+ export function minifyCSS(css, config) {
3
+ try {
4
+ const result = transform({
5
+ filename: "style.css",
6
+ code: Buffer.from(css),
7
+ minify: config.buildOptions.minify,
8
+ sourceMap: false,
9
+ });
10
+ return result.code.toString();
11
+ }
12
+ catch (error) {
13
+ console.error("Minification error:", error);
14
+ throw error;
15
+ }
16
+ }
@@ -0,0 +1,12 @@
1
+ import { globby } from "globby";
2
+ import { PurgeCSS } from "purgecss";
3
+ export async function purgeCSS(css, config) {
4
+ const purgeCSSResult = await new PurgeCSS().purge({
5
+ content: await globby(config.source),
6
+ css: [{ raw: css }],
7
+ defaultExtractor: (content) => {
8
+ return content.match(/[\w-/\\:]+/g) || [];
9
+ },
10
+ });
11
+ return purgeCSSResult[0].css;
12
+ }
@@ -0,0 +1,34 @@
1
+ import { dirname, join } from "path";
2
+ import { fileURLToPath } from "url";
3
+ import * as sass from "sass-embedded";
4
+ const __filename = fileURLToPath(import.meta.url);
5
+ const __dirname = dirname(__filename);
6
+ const packageRoot = join(__dirname, "../../..");
7
+ export async function compileSCSS(config) {
8
+ const scssFile = config.buildOptions.reset
9
+ ? "yummacss.scss"
10
+ : "yummacss-core.scss";
11
+ try {
12
+ const result = await sass.compileAsync(join(packageRoot, "src", scssFile), {
13
+ style: "expanded",
14
+ loadPaths: [join(packageRoot, "src")],
15
+ importers: [
16
+ {
17
+ findFileUrl(url) {
18
+ return new URL(url, `file://${join(packageRoot, "src/")}`);
19
+ },
20
+ },
21
+ ],
22
+ });
23
+ return {
24
+ css: result.css,
25
+ dependencies: result.loadedUrls
26
+ .filter((url) => url.protocol === "file:")
27
+ .map((url) => fileURLToPath(url)),
28
+ };
29
+ }
30
+ catch (error) {
31
+ console.error("SCSS compilation error:", error);
32
+ throw error;
33
+ }
34
+ }
@@ -0,0 +1,16 @@
1
+ import { Command } from "commander";
2
+ import { build } from "../commands/build.js";
3
+ import { init } from "../commands/init.js";
4
+ import { watch } from "../commands/watch.js";
5
+ const program = new Command();
6
+ program.name("yummacss").description("Yumma CSS CLI");
7
+ program.command("init").description("Create config file.").action(init);
8
+ program
9
+ .command("build")
10
+ .description("Build styles.")
11
+ .action(() => build().catch(() => process.exit(1)));
12
+ program
13
+ .command("watch")
14
+ .description("Build styles automatically.")
15
+ .action(() => watch().catch(() => process.exit(1)));
16
+ program.parse(process.argv);
@@ -0,0 +1,13 @@
1
+ import ora from "ora";
2
+ export const spinner = ora({
3
+ spinner: "sand",
4
+ });
5
+ export const cli = {
6
+ success: (msg) => console.log(`✔ ${msg}`),
7
+ info: (msg) => console.log(`ℹ ${msg}`),
8
+ error: (msg) => console.log(`✗ ${msg}`),
9
+ startSpinner: (text) => {
10
+ const spinner = ora({ spinner: "sand", color: "white" }).start(text);
11
+ return spinner;
12
+ },
13
+ };
@@ -0,0 +1,15 @@
1
+ import ora from "ora";
2
+ import chalk from "chalk";
3
+ export const spinner = ora();
4
+ const { green, yellow, cyan, red } = chalk;
5
+ export const ui = {
6
+ success: (msg) => console.log(green(`✓ ${msg}`)),
7
+ warn: (msg) => console.log(yellow(`⚠ ${msg}`)),
8
+ info: (msg) => console.log(cyan(`ℹ ${msg}`)),
9
+ error: (msg) => console.log(red(`✗ ${msg}`)),
10
+ startSpinner: (text) => {
11
+ spinner.text = text;
12
+ spinner.start();
13
+ return spinner;
14
+ },
15
+ };
package/package.json CHANGED
@@ -1,24 +1,65 @@
1
- {
2
- "author": "Renildo Pereira",
3
- "description": "Quickly build applications with less code in your markup.",
4
- "license": "MIT",
5
- "name": "yummacss",
6
- "version": "2.1.0",
7
- "devDependencies": {
8
- "gulp-clean-css": "^4.3.0",
9
- "gulp-copy": "^4.0.1",
10
- "gulp-purgecss": "^6.0.0",
11
- "gulp-rename": "^2.0.0",
12
- "gulp-sass": "^5.1.0",
13
- "gulp": "^4.0.2",
14
- "npm-run-all": "^4.1.5",
15
- "sass": "^1.62.1"
16
- },
17
- "scripts": {
18
- "build": "npm-run-all --sequential std min core mincore",
19
- "core": "gulp coreFile",
20
- "min": "gulp minifiedFile",
21
- "mincore": "gulp minifiedCoreFile",
22
- "std": "gulp standardFile"
23
- }
24
- }
1
+ {
2
+ "name": "yummacss",
3
+ "version": "3.0.1",
4
+ "description": "A CSS framework for the web with abbreviated styles.",
5
+ "keywords": [
6
+ "css-framework",
7
+ "css",
8
+ "design-system",
9
+ "framework",
10
+ "gulp",
11
+ "lightningcss",
12
+ "responsive-design",
13
+ "responsive",
14
+ "scss",
15
+ "yummacss"
16
+ ],
17
+ "homepage": "https://yummacss.com",
18
+ "license": "MIT",
19
+ "author": "Renildo Pereira",
20
+ "files": [
21
+ "dist/cli",
22
+ "src"
23
+ ],
24
+ "main": "./dist/cli/index.js",
25
+ "type": "module",
26
+ "exports": {
27
+ ".": "./dist/cli/src/cli.js"
28
+ },
29
+ "bin": {
30
+ "yummacss": "./dist/cli/src/cli.js",
31
+ "yumma": "./dist/cli/src/cli.js"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/yumma-lib/yumma-css"
36
+ },
37
+ "scripts": {
38
+ "build:cli": "tsc -p tsconfig.cli.json",
39
+ "build:css": "gulp build",
40
+ "build": "pnpm build:cli",
41
+ "dev": "tsc -p tsconfig.cli.json --watch",
42
+ "format:cli": "pnpx prettier --write cli",
43
+ "prepublishOnly": "pnpm build:cli"
44
+ },
45
+ "dependencies": {
46
+ "chokidar": "^4.0.3",
47
+ "commander": "^13.1.0",
48
+ "globby": "^14.1.0",
49
+ "lightningcss": "^1.29.3",
50
+ "ora": "^8.2.0",
51
+ "purgecss": "^7.0.2",
52
+ "sass-embedded": "^1.85.1"
53
+ },
54
+ "devDependencies": {
55
+ "@ianvs/prettier-plugin-sort-imports": "^4.5.1",
56
+ "@types/node": "^22.13.10",
57
+ "gulp-clean-css": "^4.3.0",
58
+ "gulp-debug": "^5.0.1",
59
+ "gulp-rename": "^2.0.0",
60
+ "gulp-sass": "^6.0.0",
61
+ "gulp": "^5.0.0",
62
+ "sass": "^1.85.1",
63
+ "typescript": "^5.8.2"
64
+ }
65
+ }
package/src/_fonts.scss CHANGED
@@ -1,14 +1,16 @@
1
+ @use "abstracts/variables" as vars;
2
+
1
3
  .ff-c {
2
- font-family: $yma-font-charter;
3
- font-weight: $yma-font-weight;
4
+ font-family: vars.$yma-font-charter;
5
+ font-weight: vars.$yma-font-weight;
4
6
  }
5
7
 
6
8
  .ff-m {
7
- font-family: $yma-font-mono;
8
- font-weight: $yma-font-weight;
9
+ font-family: vars.$yma-font-mono;
10
+ font-weight: vars.$yma-font-weight;
9
11
  }
10
12
 
11
13
  .ff-s {
12
- font-family: $yma-font-system;
13
- font-weight: $yma-font-weight;
14
+ font-family: vars.$yma-font-system;
15
+ font-weight: vars.$yma-font-weight;
14
16
  }