yummacss 3.6.0 → 3.6.2
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 +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A CLI-first CSS framework for the web with abbreviated styles.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/yummacss)
|
|
6
|
+
[](https://www.npmjs.com/package/yummacss)
|
|
7
7
|
|
|
8
8
|
## Installing
|
|
9
9
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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.
|
|
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.2`;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`}},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.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"description": "A CLI-first CSS framework for the web with abbreviated styles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css-framework",
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
],
|
|
16
16
|
"type": "module",
|
|
17
17
|
"exports": {
|
|
18
|
-
".": "./dist/index.
|
|
18
|
+
".": "./dist/index.mjs"
|
|
19
19
|
},
|
|
20
20
|
"bin": {
|
|
21
|
-
"yummacss": "./dist/index.
|
|
21
|
+
"yummacss": "./dist/index.mjs"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
25
|
"url": "git+https://github.com/yumma-lib/yumma-css.git"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@yummacss/nitro": "^0.
|
|
28
|
+
"@yummacss/nitro": "^0.4.0",
|
|
29
29
|
"chokidar": "^5.0.0",
|
|
30
30
|
"commander": "^14.0.2",
|
|
31
31
|
"globby": "^16.1.0",
|