yummacss 3.5.0 → 3.6.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 +11 -22
- package/dist/index.mjs +2 -0
- package/package.json +10 -11
- package/dist/index.js +0 -2
package/README.md
CHANGED
|
@@ -1,40 +1,29 @@
|
|
|
1
|
-
# [@yummacss](
|
|
1
|
+
# [@yummacss](www.yummacss.com)
|
|
2
2
|
|
|
3
|
-
A CSS framework for the web with abbreviated styles.
|
|
3
|
+
A CLI-first CSS framework for the web with abbreviated styles.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/yummacss)
|
|
6
6
|
[](https://www.npmjs.com/package/yummacss)
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Installing
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Install `yummacss` as a dev dependency and initialize configuration
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
npm i yummacss -D
|
|
12
|
+
```bash
|
|
13
|
+
npm install yummacss -D
|
|
14
|
+
npx yummacss init
|
|
18
15
|
```
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
Build styles
|
|
21
18
|
|
|
22
|
-
```
|
|
23
|
-
npx yummacss
|
|
19
|
+
```bash
|
|
20
|
+
npx yummacss build
|
|
24
21
|
```
|
|
25
22
|
|
|
26
23
|
## Documentation
|
|
27
24
|
|
|
28
25
|
Learn more at [yummacss.com](https://yummacss.com)
|
|
29
26
|
|
|
30
|
-
## Built with
|
|
31
|
-
|
|
32
|
-
- [@yummacss/nitro](https://www.npmjs.com/package/@yummacss/nitro)
|
|
33
|
-
- [biome](https://www.npmjs.com/package/@biomejs/biome)
|
|
34
|
-
- [lightningcss](https://www.npmjs.com/package/lightningcss)
|
|
35
|
-
- [tsdown](https://www.npmjs.com/package/tsdown)
|
|
36
|
-
- [typescript](https://www.npmjs.com/package/typescript)
|
|
37
|
-
|
|
38
27
|
## License
|
|
39
28
|
|
|
40
|
-
This project is licensed under the [MIT License](LICENSE)
|
|
29
|
+
This project is licensed under the [MIT License](LICENSE).
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{Command as e}from"commander";import{existsSync as t,writeFileSync as n}from"node:fs";import{ConfigSchema as r,configName as i,extractor as a,generator as o}from"@yummacss/nitro";import{join as s}from"node:path";import{pathToFileURL as c}from"node:url";import l from"ora";import{transform as u}from"lightningcss";import d from"stringify-object";import f from"chokidar";import{globby as p}from"globby";var m=`3.6.0`;let h={};function g(){return h}function _(e){h=e}function v(e){let t=JSON.stringify(e);return h.configHash!==t}async function y(e){return{css:o(await a(e.source),e),dependencies:e.source}}const b={build:{start:`Building...`,success:(e,t)=>`Build done in ${e}ms. (${t})`,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.`}},x={fail:e=>l().fail(e),info:e=>l().info(e),progress:e=>l({spinner:`sand`,color:`white`}).start(e),success:e=>l().succeed(e),warn:e=>l().warn(e)};async function S(){let e=c(s(process.cwd(),i)).href;try{let{default:t}=await import(e);return r.parse(t)}catch{t(i)||(x.progress(b.init.notFound).warn(b.init.notFound),process.exit(1)),x.progress(b.init.invalid).fail(b.init.invalid),process.exit(1)}}function C(e,t){return u({code:Buffer.from(e),filename:`style.css`,minify:t.buildOptions.minify,sourceMap:!1}).code.toString()}async function w(e,t=!1){let r=x.progress(b.build.start),i=Date.now();try{let a=e||await S(),o=g(),s=v(a),c;if(t||s||!o.css){let e=await y(a);c=e.css,_({configHash:JSON.stringify(a),css:e.css,dependencies:e.dependencies})}else c=o.css;let l=C(c,a);n(a.output,l),r.succeed(b.build.success(Date.now()-i,a.output))}catch(e){r.fail(`${b.build.fail} ${e instanceof Error?e.message:String(e)}`),process.exit(1)}}function T(){return{filename:i,content:`export default ${d(r.parse({}),{indent:` `,singleQuotes:!1})};`}}function E(){let e=x.progress(`Initializing config...`);try{let{filename:t,content:r}=T();n(t,r),e.succeed(b.init.success)}catch{e.fail(b.init.fail),process.exit(1)}}let D,O=null;const k=new Set;function A(e,t){k.add(e),O&&clearTimeout(O),O=setTimeout(async()=>{k.size>0&&(await w(D,!0),k.clear()),O=null},500)}async function j(){try{D=await S(),await w(D,!0),x.info(b.watch.start);let e=await p(D.source);f.watch(e,{awaitWriteFinish:{pollInterval:50,stabilityThreshold:200},ignored:/(^|[/\\])\../,ignoreInitial:!0,persistent:!0}).on(`add`,e=>A(e,`added`)).on(`change`,e=>A(e,`changed`)).on(`unlink`,e=>A(e,`removed`))}catch{x.fail(b.watch.fail),process.exit(1)}}const M=new e;M.name(`yummacss`).description(`Yumma CSS main command`).version(m),M.command(`init`).action(E).alias(`i`).description(`Initialize config`),M.command(`build`).action(()=>w().catch(()=>process.exit(1))).alias(`b`).description(`Build styles once`),M.command(`watch`).action(()=>j().catch(()=>process.exit(1))).alias(`w`).description(`Build styles continuously`),M.parse(process.argv);export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yummacss",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "A CLI-first CSS framework for the web with abbreviated styles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css-framework",
|
|
@@ -25,21 +25,20 @@
|
|
|
25
25
|
"url": "git+https://github.com/yumma-lib/yumma-css.git"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@yummacss/nitro": "^0.
|
|
29
|
-
"chokidar": "^
|
|
30
|
-
"commander": "^14.0.
|
|
31
|
-
"globby": "^
|
|
28
|
+
"@yummacss/nitro": "^0.3.0",
|
|
29
|
+
"chokidar": "^5.0.0",
|
|
30
|
+
"commander": "^14.0.2",
|
|
31
|
+
"globby": "^16.1.0",
|
|
32
32
|
"lightningcss": "^1.30.2",
|
|
33
|
-
"ora": "^
|
|
33
|
+
"ora": "^9.0.0",
|
|
34
34
|
"stringify-object": "^6.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@biomejs/biome": "2.
|
|
38
|
-
"@types/node": "^
|
|
37
|
+
"@biomejs/biome": "2.3.10",
|
|
38
|
+
"@types/node": "^25.0.3",
|
|
39
39
|
"@types/stringify-object": "^4.0.5",
|
|
40
|
-
"tsdown": "^0.
|
|
41
|
-
"typescript": "^5.9.
|
|
42
|
-
"zod": "^4.1.12"
|
|
40
|
+
"tsdown": "^0.18.3",
|
|
41
|
+
"typescript": "^5.9.3"
|
|
43
42
|
},
|
|
44
43
|
"publishConfig": {
|
|
45
44
|
"access": "public",
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{Command as e}from"commander";import{ConfigSchema as t,configName as n,extractor as r,generator as i}from"@yummacss/nitro";import a from"ora";import{existsSync as o,writeFileSync as s}from"fs";import{join as c}from"path";import{pathToFileURL as l}from"url";import{transform as u}from"lightningcss";import d from"stringify-object";import f from"chokidar";import{globby as p}from"globby";let m={};function h(){return m}function g(e){m=e}function _(e){let t=JSON.stringify(e);return m.configHash!==t}async function v(e){return{css:i(await r(e.source),e),dependencies:e.source}}const y={build:{start:`Building...`,success:(e,t)=>`Build done in ${e}ms. (${t})`,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.`}},b={fail:e=>a().fail(e),info:e=>a().info(e),progress:e=>a({spinner:`sand`,color:`white`}).start(e),success:e=>a().succeed(e),warn:e=>a().warn(e)};Object.freeze({status:`aborted`});function x(e,t,n){function r(n,r){var i;for(let a in Object.defineProperty(n,`_zod`,{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r),o.prototype)a in n||Object.defineProperty(n,a,{value:o.prototype[a].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}function S(e,t){return typeof t==`bigint`?t.toString():t}`captureStackTrace`in Error&&Error.captureStackTrace,-Number.MAX_VALUE,Number.MAX_VALUE;const C=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,S,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},w=x(`$ZodError`,C);x(`$ZodError`,C,{Parent:Error});function T(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function E(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}const D=(e,t)=>{w.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>E(e,t)},flatten:{value:t=>T(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,S,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,S,2)}},isEmpty:{get(){return e.issues.length===0}}})},O=x(`ZodError`,D);x(`ZodError`,D,{Parent:Error});async function k(){let e=l(c(process.cwd(),n)).href;try{let{default:n}=await import(e);return t.parse(n)}catch(e){throw o(n)?e instanceof O&&(b.progress(y.init.invalid).fail(y.init.invalid),process.exit(1)):(b.progress(y.init.notFound).warn(y.init.notFound),process.exit(1)),e}}function A(e,t){return u({code:Buffer.from(e),filename:`style.css`,minify:t.buildOptions.minify,sourceMap:!1}).code.toString()}async function j(e,t=!1){let n=b.progress(y.build.start),r=Date.now();try{let i=e||await k(),a=h(),o=_(i),c;if(t||o||!a.css){let e=await v(i);c=e.css,g({configHash:JSON.stringify(i),css:e.css,dependencies:e.dependencies})}else c=a.css;let l=A(c,i);s(i.output,l),n.succeed(y.build.success(Date.now()-r,i.output))}catch(e){n.fail(`${y.build.fail} ${e instanceof Error?e.message:String(e)}`),process.exit(1)}}function M(){return{filename:n,content:`export default ${d(t.parse({}),{indent:` `,singleQuotes:!1})};`}}function N(){let e=b.progress(`Initializing config...`);try{let{filename:t,content:n}=M();s(t,n),e.succeed(y.init.success)}catch{e.fail(y.init.fail),process.exit(1)}}let P,F=null;const I=new Set;function L(e,t){I.add(e),F&&clearTimeout(F),F=setTimeout(async()=>{I.size>0&&(await j(P,!0),I.clear()),F=null},500)}async function R(){try{P=await k(),await j(P,!0),b.info(y.watch.start);let e=await p(P.source);f.watch(e,{awaitWriteFinish:{pollInterval:50,stabilityThreshold:200},ignored:/(^|[/\\])\../,ignoreInitial:!0,persistent:!0}).on(`add`,e=>L(e,`added`)).on(`change`,e=>L(e,`changed`)).on(`unlink`,e=>L(e,`removed`))}catch{b.fail(y.watch.fail),process.exit(1)}}var z=`3.5.0`;const B=new e;B.name(`yummacss`).description(`Yumma CSS main command`).version(z),B.command(`init`).action(N).alias(`i`).description(`Initialize config`),B.command(`build`).action(()=>j().catch(()=>process.exit(1))).alias(`b`).description(`Build styles once`),B.command(`watch`).action(()=>R().catch(()=>process.exit(1))).alias(`w`).description(`Build styles continuously`),B.parse(process.argv);export{};
|