yummacss 3.0.3 → 3.2.0
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 +66 -66
- package/dist/index.js +1 -0
- package/package.json +21 -26
- package/src/{reset/_stylecent.scss → _base.scss} +231 -231
- package/src/_fonts.scss +16 -16
- package/src/abstracts/_breakpoints.scss +45 -45
- package/src/abstracts/_index.scss +5 -5
- package/src/abstracts/_theme.scss +22 -21
- package/src/abstracts/_variables.scss +84 -82
- package/src/abstracts/functions/_create-values.scss +16 -16
- package/src/abstracts/functions/_ignore-neutral.scss +8 -9
- package/src/abstracts/functions/_index.scss +2 -2
- package/src/abstracts/mixins/_create-colors.scss +87 -41
- package/src/abstracts/mixins/_create-utilities.scss +53 -39
- package/src/abstracts/mixins/_index.scss +2 -2
- package/src/{yummacss-core.scss → core.scss} +3 -3
- package/src/{yummacss.scss → index.scss} +4 -4
- package/src/utilities/_background.scss +95 -95
- package/src/utilities/_border.scss +314 -313
- package/src/utilities/_box-model.scss +290 -290
- package/src/utilities/_color.scss +85 -72
- package/src/utilities/_effect.scss +98 -98
- package/src/utilities/_flexbox.scss +213 -175
- package/src/utilities/_grid.scss +322 -322
- package/src/utilities/_index.scss +14 -14
- package/src/utilities/_interactivity.scss +304 -304
- package/src/utilities/_outline.scss +53 -53
- package/src/utilities/_positioning.scss +436 -436
- package/src/utilities/_svg.scss +27 -27
- package/src/utilities/_table.scss +35 -35
- package/src/utilities/_transform.scss +164 -164
- package/src/utilities/_typography.scss +278 -278
- package/src/utilities/maps/_index.scss +12 -12
- package/src/utilities/maps/box-model/_dimension.scss +26 -16
- package/src/utilities/maps/box-model/_height.scss +26 -16
- package/src/utilities/maps/box-model/_margin.scss +11 -10
- package/src/utilities/maps/box-model/_padding.scss +11 -10
- package/src/utilities/maps/box-model/_width.scss +26 -16
- package/src/utilities/maps/flexbox/_flex-basis.scss +12 -12
- package/src/utilities/maps/grid/_gap.scss +5 -5
- package/dist/cli/commands/build.js +0 -43
- package/dist/cli/commands/init.js +0 -19
- package/dist/cli/commands/watch.js +0 -48
- package/dist/cli/config/defaultConfig.js +0 -9
- package/dist/cli/config/templates.js +0 -33
- package/dist/cli/lib/cli-lang.js +0 -23
- package/dist/cli/lib/cli-ui.js +0 -14
- package/dist/cli/services/configLoader.js +0 -42
- package/dist/cli/services/minifyService.js +0 -16
- package/dist/cli/services/purgeService.js +0 -12
- package/dist/cli/services/scssCompiler.js +0 -34
- package/dist/cli/src/cli.js +0 -16
package/README.md
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
# [@yummacss](https://www.npmjs.com/package/yummacss)
|
|
2
|
-
|
|
3
|
-
A CSS framework for the web with abbreviated styles.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/yummacss)
|
|
6
|
-
[](https://www.npmjs.com/package/yummacss)
|
|
7
|
-
|
|
8
|
-
## Getting started
|
|
9
|
-
|
|
10
|
-
Yumma CSS is a CSS framework packed with a set of abbreviated utility classes for building faster and more maintainable UIs.
|
|
11
|
-
|
|
12
|
-
### Installing
|
|
13
|
-
|
|
14
|
-
A step by step series of examples that tell you how to get a development
|
|
15
|
-
environment running
|
|
16
|
-
|
|
17
|
-
Install Yumma CSS
|
|
18
|
-
|
|
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
|
-
- [
|
|
61
|
-
- [
|
|
62
|
-
- [typescript](https://www.npmjs.com/package/typescript)
|
|
63
|
-
|
|
64
|
-
## License
|
|
65
|
-
|
|
66
|
-
This project is licensed under the [MIT License](LICENSE)
|
|
1
|
+
# [@yummacss](https://www.npmjs.com/package/yummacss)
|
|
2
|
+
|
|
3
|
+
A CSS framework for the web with abbreviated styles.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/yummacss)
|
|
6
|
+
[](https://www.npmjs.com/package/yummacss)
|
|
7
|
+
|
|
8
|
+
## Getting started
|
|
9
|
+
|
|
10
|
+
Yumma CSS is a CSS framework packed with a set of abbreviated utility classes for building faster and more maintainable UIs.
|
|
11
|
+
|
|
12
|
+
### Installing
|
|
13
|
+
|
|
14
|
+
A step by step series of examples that tell you how to get a development
|
|
15
|
+
environment running
|
|
16
|
+
|
|
17
|
+
Install Yumma CSS
|
|
18
|
+
|
|
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
|
+
- [sass-embedded](https://www.npmjs.com/package/sass-embedded)
|
|
61
|
+
- [lightningcss](https://www.npmjs.com/package/lightningcss)
|
|
62
|
+
- [typescript](https://www.npmjs.com/package/typescript)
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
This project is licensed under the [MIT License](LICENSE)
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Command as rt}from"commander";import{writeFileSync as V}from"fs";var x={};function k(){return x}function F(t){x=t}function B(t){let o=JSON.stringify(t);return x.configHash!==o}import{existsSync as E}from"fs";import{dirname as S,join as p}from"path";import*as v from"sass-embedded";import{fileURLToPath as N}from"url";function H(){let t=N(import.meta.url),o=S(t);for(;o!==S(o);){let i=p(o,"package.json");if(E(i))return o;o=S(o)}return o}var b=H();async function O(t){let o=t.buildOptions.reset?"index.scss":"core.scss",i=await v.compileAsync(p(b,"src",o),{style:"expanded",loadPaths:[p(b,"src")],importers:[{findFileUrl(e){return new URL(e,`file://${p(b,"src/")}`)}}]});return{css:i.css,dependencies:i.loadedUrls.filter(e=>e.protocol==="file:").map(e=>N(e))}}import{existsSync as _}from"fs";import{join as A}from"path";import{pathToFileURL as Z}from"url";import{z as q}from"zod";import{z as c}from"zod";var a="yumma.config.js",u=c.object({source:c.array(c.string()).default([""]),output:c.string().default(""),buildOptions:c.object({reset:c.boolean().default(!0),minify:c.boolean().default(!1)}).default({reset:!0,minify:!1})});var r={build:{start:"Building...",success:(t,o)=>`Build done in ${t}ms. (${o})`,fail:"Build failed."},init:{fail:"Config failed.",invalid:"Invalid config.",notFound:"Config not found.",success:"Config created."},watch:{start:"Watching...",fail:"Watch failed."},common:{unknownError:"Something went wrong, and we don't know what."}};import f from"ora";var R=t=>f({spinner:"sand",color:"white"}).start(t),D=t=>f().fail(t),L=t=>f().info(t),M=t=>f().succeed(t),W=t=>f().warn(t),s={error:D,info:L,progress:R,success:M,warn:W};async function g(){let t=A(process.cwd(),a),o=Z(t).href;try{let{default:i}=await import(o);return u.parse(i)}catch(i){throw _(a)?i instanceof q.ZodError&&(s.progress(r.init.invalid).fail(r.init.invalid),process.exit(1)):(s.progress(r.init.notFound).warn(r.init.notFound),process.exit(1)),i}}import{transform as G}from"lightningcss";function T(t,o){return G({filename:"style.css",code:Buffer.from(t),minify:o.buildOptions.minify,sourceMap:!1}).code.toString()}import{globby as K}from"globby";import{PurgeCSS as Q}from"purgecss";async function z(t,o){return(await new Q().purge({content:await K(o.source),css:[{raw:t}],defaultExtractor:e=>e.match(/[\w-/\\:]+/g)||[]}))[0].css}async function m(t,o=!1){let i=s.progress(r.build.start),e=Date.now();try{let n=t||await g(),y=k(),I=B(n),w;if(o||I||!y.css){let C=await O(n);w=C.css,F({configHash:JSON.stringify(n),css:C.css,dependencies:C.dependencies})}else w=y.css;let U=await z(w,n),$=T(U,n);V(n.output,$),i.succeed(r.build.success(Date.now()-e,n.output))}catch{i.fail(r.build.fail),process.exit(1)}}import{existsSync as X,readFileSync as Y,writeFileSync as tt}from"fs";function ot(){try{if(X("package.json"))return JSON.parse(Y("package.json","utf-8")).type==="module"?"esm":"cjs"}catch{s.error(r.common.unknownError)}return"cjs"}function it(){let t=u.parse({});return ot()==="esm"?{filename:a,content:`export default ${JSON.stringify(t,null,2)};`}:{filename:a,content:`module.exports = ${JSON.stringify(t,null,2)};`}}function J(){let t=s.progress("Initializing config...");try{let{filename:o,content:i}=it();tt(o,i),t.succeed(r.init.success)}catch{t.fail(r.init.fail),process.exit(1)}}import et from"chokidar";import{globby as nt}from"globby";var d,h=null,j=new Set;async function P(){try{let e=function(n,y){j.add(n),h&&clearTimeout(h),h=setTimeout(async()=>{j.size>0&&(await m(d,!0),j.clear()),h=null},500)};var t=e;d=await g(),await m(d,!0),s.info(r.watch.start);let o=await nt(d.source);et.watch(o,{awaitWriteFinish:{pollInterval:50,stabilityThreshold:200},ignored:/(^|[/\\])\../,ignoreInitial:!0,persistent:!0}).on("add",n=>e(n,"added")).on("change",n=>e(n,"changed")).on("unlink",n=>e(n,"removed"))}catch{s.error(r.watch.fail),process.exit(1)}}var l=new rt;l.name("yummacss").description("Main command");l.command("init").description("Initialize config").action(J);l.command("build").action(()=>m().catch(()=>process.exit(1))).alias("b").description("Build styles once");l.command("watch").action(()=>P().catch(()=>process.exit(1))).alias("w").description("Build styles continuously");l.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -1,65 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yummacss",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "A CSS framework for the web with abbreviated styles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css-framework",
|
|
7
7
|
"css",
|
|
8
8
|
"design-system",
|
|
9
9
|
"framework",
|
|
10
|
-
"gulp",
|
|
11
10
|
"lightningcss",
|
|
12
11
|
"responsive-design",
|
|
13
12
|
"responsive",
|
|
14
13
|
"scss",
|
|
14
|
+
"typescript",
|
|
15
15
|
"yummacss"
|
|
16
16
|
],
|
|
17
17
|
"homepage": "https://yummacss.com",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "Renildo Pereira",
|
|
20
20
|
"files": [
|
|
21
|
-
"dist
|
|
21
|
+
"dist",
|
|
22
22
|
"src"
|
|
23
23
|
],
|
|
24
|
-
"main": "./dist/cli/index.js",
|
|
25
24
|
"type": "module",
|
|
26
25
|
"exports": {
|
|
27
|
-
".": "./dist/
|
|
26
|
+
".": "./dist/index.js"
|
|
28
27
|
},
|
|
29
28
|
"bin": {
|
|
30
|
-
"yummacss": "./dist/
|
|
31
|
-
"yumma": "./dist/cli/src/cli.js"
|
|
29
|
+
"yummacss": "./dist/index.js"
|
|
32
30
|
},
|
|
33
31
|
"repository": {
|
|
34
32
|
"type": "git",
|
|
35
33
|
"url": "git+https://github.com/yumma-lib/yumma-css.git"
|
|
36
34
|
},
|
|
37
35
|
"scripts": {
|
|
38
|
-
"build
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"prepublishOnly": "pnpm build:cli"
|
|
36
|
+
"build": "tsup",
|
|
37
|
+
"dev": "tsup --watch",
|
|
38
|
+
"format:cli": "prettier --write cli",
|
|
39
|
+
"format": "prettier --write .",
|
|
40
|
+
"prepublishOnly": "pnpm build"
|
|
44
41
|
},
|
|
42
|
+
"packageManager": "pnpm@10.14.0",
|
|
45
43
|
"dependencies": {
|
|
46
44
|
"chokidar": "^4.0.3",
|
|
47
|
-
"commander": "^
|
|
45
|
+
"commander": "^14.0.0",
|
|
48
46
|
"globby": "^14.1.0",
|
|
49
|
-
"lightningcss": "^1.
|
|
47
|
+
"lightningcss": "^1.30.1",
|
|
50
48
|
"ora": "^8.2.0",
|
|
51
49
|
"purgecss": "^7.0.2",
|
|
52
|
-
"sass-embedded": "^1.
|
|
50
|
+
"sass-embedded": "^1.90.0",
|
|
51
|
+
"zod": "^4.0.17"
|
|
53
52
|
},
|
|
54
53
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"gulp-sass": "^6.0.0",
|
|
61
|
-
"gulp": "^5.0.0",
|
|
62
|
-
"sass": "^1.85.1",
|
|
63
|
-
"typescript": "^5.8.2"
|
|
54
|
+
"@types/node": "^24.2.0",
|
|
55
|
+
"prettier": "^3.6.2",
|
|
56
|
+
"prettier-plugin-organize-imports": "^4.2.0",
|
|
57
|
+
"tsup": "^8.5.0",
|
|
58
|
+
"typescript": "^5.9.2"
|
|
64
59
|
}
|
|
65
|
-
}
|
|
60
|
+
}
|