@tailwindcss/cli 0.0.0-insiders.4455048 → 0.0.0-insiders.44818a6
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 +6 -10
- package/dist/index.mjs +25 -5
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=
|
|
16
|
+
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=main" alt="Build Status"></a>
|
|
17
17
|
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
|
18
|
-
<a href="https://github.com/
|
|
19
|
-
<a href="https://github.com/
|
|
18
|
+
<a href="https://github.com/tailwindlabs/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
|
|
19
|
+
<a href="https://github.com/tailwindlabs/tailwindcss/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
---
|
|
@@ -27,14 +27,10 @@ For full documentation, visit [tailwindcss.com](https://tailwindcss.com).
|
|
|
27
27
|
|
|
28
28
|
## Community
|
|
29
29
|
|
|
30
|
-
For help, discussion about best practices, or
|
|
30
|
+
For help, discussion about best practices, or feature ideas:
|
|
31
31
|
|
|
32
|
-
[Discuss Tailwind CSS on GitHub](https://github.com/
|
|
33
|
-
|
|
34
|
-
For chatting with others using the framework:
|
|
35
|
-
|
|
36
|
-
[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe)
|
|
32
|
+
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions)
|
|
37
33
|
|
|
38
34
|
## Contributing
|
|
39
35
|
|
|
40
|
-
If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/
|
|
36
|
+
If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindlabs/tailwindcss/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
3
|
-
`)}function
|
|
4
|
-
`)}function
|
|
2
|
+
var gt=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),wt=t=>{throw TypeError(t)};var rt=(t,e,n)=>{if(e!=null){typeof e!="object"&&typeof e!="function"&&wt("Object expected");var i,s;n&&(i=e[gt("asyncDispose")]),i===void 0&&(i=e[gt("dispose")],n&&(s=i)),typeof i!="function"&&wt("Object not disposable"),s&&(i=function(){try{s.call(this)}catch(r){return Promise.reject(r)}}),t.push([n,i,e])}else n&&t.push([n]);return e},st=(t,e,n)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(l,o,a,u){return u=Error(a),u.name="SuppressedError",u.error=l,u.suppressed=o,u},s=l=>e=n?new i(l,e,"An error was suppressed during disposal"):(n=!0,l),r=l=>{for(;l=t.pop();)try{var o=l[1]&&l[1].call(l[2]);if(l[0])return Promise.resolve(o).then(r,a=>(s(a),r()))}catch(a){s(a)}if(n)throw e};return r()};import Kt from"mri";function R(t,e=process.argv.slice(2)){for(let[s,r]of e.entries())r==="-"&&(e[s]="__IO_DEFAULT_VALUE__");let n=Kt(e);for(let s in n){let r=n[s];s!=="_"&&Array.isArray(r)&&(r=r[r.length-1]),r==="__IO_DEFAULT_VALUE__"&&(r="-"),n[s]=r}let i={_:n._};for(let[s,{type:r,alias:l,default:o=r==="boolean"?!1:null}]of Object.entries(t)){if(i[s]=o,l){let a=l.slice(1);n[a]!==void 0&&(i[s]=bt(n[a],r))}{let a=s.slice(2);n[a]!==void 0&&(i[s]=bt(n[a],r))}}return i}function bt(t,e){switch(e){case"string":return K(t);case"boolean":return W(t);case"number":return G(t);case"boolean | string":return W(t)??K(t);case"number | string":return G(t)??K(t);case"boolean | number":return W(t)??G(t);case"boolean | number | string":return W(t)??G(t)??K(t);default:throw new Error(`Unhandled type: ${e}`)}}function W(t){if(t===!0||t===!1)return t;if(t==="true")return!0;if(t==="false")return!1}function G(t){if(typeof t=="number")return t;{let e=Number(t);if(!Number.isNaN(e))return e}}function K(t){return`${t}`}import Xt from"@parcel/watcher";import{compile as te,env as ee,Instrumentation as _t,optimize as ne,toSourceMap as H}from"@tailwindcss/node";import{clearRequireCache as ie}from"@tailwindcss/node/require-cache";import{Scanner as re}from"@tailwindcss/oxide";import{existsSync as se}from"fs";import ct from"fs/promises";import T from"path";var L=class{#t=new Set([]);queueMacrotask(e){let n=setTimeout(e,0);return this.add(()=>{clearTimeout(n)})}add(e){return this.#t.add(e),()=>{this.#t.delete(e),e()}}async dispose(){for(let e of this.#t)await e();this.#t.clear()}};import Jt from"fs";import xt from"path";import{stripVTControlCharacters as Qt}from"util";import b from"picocolors";import yt from"enhanced-resolve";import Yt from"fs";import{createRequire as Vt}from"module";var qt=Vt(import.meta.url).resolve;function St(t){if(typeof globalThis.__tw_resolve=="function"){let e=globalThis.__tw_resolve(t);if(e)return e}return qt(t)}var Be=yt.ResolverFactory.createResolver({fileSystem:new yt.CachedInputFileSystem(Yt,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function Ct(t){let e=typeof t=="number"?BigInt(t):t;return e<1000n?`${e}ns`:(e/=1000n,e<1000n?`${e}\xB5s`:(e/=1000n,e<1000n?`${e}ms`:(e/=1000n,e<60n?`${e}s`:(e/=60n,e<60n?`${e}m`:(e/=60n,e<24n?`${e}h`:(e/=24n,`${e}d`))))))}var Y={indent:2};function V(){return`${b.italic(b.bold(b.blue("\u2248")))} tailwindcss ${b.blue(`v${Ht()}`)}`}function v(t){return`${b.dim(b.blue("`"))}${b.blue(t)}${b.dim(b.blue("`"))}`}function q(t,e=process.cwd(),{preferAbsoluteIfShorter:n=!0}={}){let i=xt.relative(e,t);return i.startsWith("..")||(i=`.${xt.sep}${i}`),n&&i.length>t.length?t:i}function ot(t,e){let n=t.split(" "),i=[],s="",r=0;for(let l of n){let o=Qt(l).length;r+o+1>e&&(i.push(s),s="",r=0),s+=(r?" ":"")+l,r+=o+(r?1:0)}return r&&i.push(s),i}function B(t){let e=Ct(t);return t<=50*1e6?b.green(e):t<=300*1e6?b.blue(e):t<=1e3*1e6?b.yellow(e):b.red(e)}function k(t,e=0){return`${" ".repeat(e+Y.indent)}${t}`}function S(t=""){process.stderr.write(`${t}
|
|
3
|
+
`)}function J(t=""){process.stdout.write(`${t}
|
|
4
|
+
`)}function Ht(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:t}=JSON.parse(Jt.readFileSync(St("tailwindcss/package.json"),"utf-8"));return t}import Q from"fs/promises";import Zt from"path";function lt(){return new Promise((t,e)=>{let n="";process.stdin.on("data",i=>{n+=i}),process.stdin.on("end",()=>t(n)),process.stdin.on("error",i=>e(i))})}async function at(t,e){if(!await Q.stat(t).then(i=>i.isCharacterDevice()||i.isFIFO()).catch(()=>!1))try{if(await Q.readFile(t,"utf8")===e)return}catch{}await Q.mkdir(Zt.dirname(t),{recursive:!0}),await Q.writeFile(t,e,"utf8")}var Tt=String.raw,c=ee.DEBUG;function N(){return{"--input":{type:"string",description:"Input file",alias:"-i"},"--output":{type:"string",description:"Output file",alias:"-o",default:"-"},"--watch":{type:"boolean | string",description:"Watch for changes and rebuild as needed, and use `always` to keep watching when stdin is closed",alias:"-w",values:["always"]},"--minify":{type:"boolean",description:"Optimize and minify the output",alias:"-m"},"--optimize":{type:"boolean",description:"Optimize the output without minifying"},"--cwd":{type:"string",description:"The current working directory",default:"."},"--map":{type:"boolean | string",description:"Generate a source map",default:!1},"--silent":{type:"boolean",description:"Suppress non-error output"}}}async function ut(t){try{return await t()}catch(e){S([Ot("Error:"),A("\u250C")].concat(`${e}`.split(`
|
|
5
|
+
`).map(n=>`${A("\u2502")} ${n}`)).concat(A("\u2514")).join(`
|
|
6
|
+
`)),process.exit(1)}}async function pt(t){var I=[];try{t["--silent"]||S(V());t["--silent"]||S();let e=rt(I,new _t);c&&e.start("[@tailwindcss/cli] (initial build)");let n=T.resolve(t["--cwd"]);t["--output"]&&t["--output"]!=="-"&&(t["--output"]=T.resolve(n,t["--output"]));t["--input"]&&t["--input"]!=="-"&&(t["--input"]=T.resolve(n,t["--input"]),se(t["--input"])||(S(`Specified input file ${v(q(t["--input"]))} does not exist.`),process.exit(1)));t["--input"]===t["--output"]&&t["--input"]!=="-"&&(S(`Specified input file ${v(q(t["--input"]))} and output file ${v(q(t["--output"]))} are identical.`),process.exit(1));t["--map"]==="-"&&(S("Use --map without a value to inline the source map"),process.exit(1));t["--map"]&&t["--map"]!==!0&&(t["--map"]=T.resolve(n,t["--map"]));let i=process.hrtime.bigint();let s=t["--input"]?t["--input"]==="-"?await lt():await ct.readFile(t["--input"],"utf-8"):Tt`
|
|
5
7
|
@import 'tailwindcss';
|
|
6
|
-
`;let
|
|
8
|
+
`;let r={css:"",optimizedCss:""};async function l(x,w,d,_){let y=x;if(d["--minify"]||d["--optimize"])if(x!==r.css){c&&_.start("Optimize CSS");let E=ne(x,{file:d["--input"]??"input.css",minify:d["--minify"]??!1,map:w?.raw??void 0});c&&_.end("Optimize CSS"),r.css=x,r.optimizedCss=E.code,E.map&&(w=H(E.map)),y=E.code}else y=r.optimizedCss;if(w){if(d["--map"]===!0)y+=`
|
|
9
|
+
`,y+=w.inline;else if(typeof d["--map"]=="string"){let E=d["--output"]&&d["--output"]!=="-"?T.dirname(T.resolve(d["--output"])):process.cwd(),X=T.resolve(d["--map"]),f=T.relative(E,X);y+=`
|
|
10
|
+
`,y+=w.comment(f),c&&_.start("Write source map"),await at(d["--map"],w.raw),c&&_.end("Write source map")}}c&&_.start("Write output"),d["--output"]&&d["--output"]!=="-"?await at(d["--output"],y):J(y),c&&_.end("Write output")}let o=t["--input"]&&t["--input"]!=="-"?T.resolve(t["--input"]):null;let a=o?T.dirname(o):process.cwd();let u=o?[o]:[];let g=u;async function m(x,w){c&&w.start("Setup compiler");let d=await te(x,{from:t["--output"]?o??"stdin.css":void 0,base:a,onDependency(E){u.push(E)}}),_=(d.root==="none"?[]:d.root===null?[{base:n,pattern:"**/*",negated:!1}]:[{...d.root,negated:!1}]).concat(d.sources),y=new re({sources:_});return c&&w.end("Setup compiler"),[d,y]}let[p,h]=await ut(()=>m(s,e));if(t["--watch"]){let x=[];x.push(await Et($t(h),async function w(d){try{var _=[];try{if(d.length===1&&d[0]===t["--output"])return;let f=rt(_,new _t);c&&f.start("[@tailwindcss/cli] (watcher)");let D=process.hrtime.bigint();let M=[];let tt="incremental";let ht=u;for(let $ of d){if(ht.includes($)){tt="full";break}M.push({file:$,extension:T.extname($).slice(1)})}let et="";let nt=null;if(tt==="full"){let $=t["--input"]?t["--input"]==="-"?await lt():await ct.readFile(t["--input"],"utf-8"):Tt`
|
|
7
11
|
@import 'tailwindcss';
|
|
8
|
-
`;
|
|
12
|
+
`;ie(ht),g=u.slice(),u=o?[o]:[],[p,h]=await m($,f),g=u.slice(),c&&f.start("Scan for candidates");let it=h.scan();c&&f.end("Scan for candidates"),c&&f.start("Setup new watchers");let Wt=await Et($t(h),w);c&&f.end("Setup new watchers"),c&&f.start("Cleanup old watchers"),await Promise.all(x.splice(0).map(Gt=>Gt())),c&&f.end("Cleanup old watchers"),x.push(Wt),c&&f.start("Build CSS"),et=p.build(it),c&&f.end("Build CSS"),t["--map"]&&(c&&f.start("Build Source Map"),nt=H(p.buildSourceMap()),c&&f.end("Build Source Map"))}else if(tt==="incremental"){c&&f.start("Scan for candidates");let $=h.scanFiles(M);if(c&&f.end("Scan for candidates"),$.length<=0){let it=process.hrtime.bigint();t["--silent"]||S(`Done in ${B(it-D)}`);return}c&&f.start("Build CSS"),et=p.build($),c&&f.end("Build CSS"),t["--map"]&&(c&&f.start("Build Source Map"),nt=H(p.buildSourceMap()),c&&f.end("Build Source Map"))}await l(et,nt,t,f);let Mt=process.hrtime.bigint();t["--silent"]||S(`Done in ${B(Mt-D)}`)}catch(y){var E=y,X=!0}finally{st(_,E,X)}}catch(f){u=g,S([Ot("Error:"),A("\u250C")].concat(`${f}`.split(`
|
|
13
|
+
`).map(M=>`${A("\u2502")} ${M}`)).concat(A("\u2514")).join(`
|
|
14
|
+
`));let D=process.hrtime.bigint();t["--silent"]||S(`Done in ${B(D-i)}`)}})),t["--watch"]!=="always"&&process.stdin.on("end",()=>{Promise.all(x.map(w=>w())).then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}c&&e.start("Scan for candidates");let C=h.scan();c&&e.end("Scan for candidates");c&&e.start("Build CSS");let j=await ut(()=>p.build(C));c&&e.end("Build CSS");let U=null;t["--map"]&&(c&&e.start("Build Source Map"),U=await ut(()=>H(p.buildSourceMap())),c&&e.end("Build Source Map"));await l(j,U,t,e);let z=process.hrtime.bigint();t["--silent"]||S(`Done in ${B(z-i)}`)}catch(zt){var It=zt,Dt=!0}finally{st(I,It,Dt)}}async function Et(t,e){t=t.sort((o,a)=>o.length-a.length);let n=[];for(let o=0;o<t.length;++o)for(let a=0;a<o;++a)t[o].startsWith(`${t[a]}/`)&&n.push(t[o]);t=t.filter(o=>!n.includes(o));let i=new L,s=new Set,r=new L;async function l(){await r.dispose(),r.queueMacrotask(()=>{e(Array.from(s)),s.clear()})}for(let o of t){let{unsubscribe:a}=await Xt.subscribe(o,async(u,g)=>{if(u){console.error(u);return}await Promise.all(g.map(async m=>{if(m.type==="delete"){s.add(m.path);return}let p=null;try{p=await ct.lstat(m.path)}catch{}!p?.isFile()&&!p?.isSymbolicLink()||s.add(m.path)})),await l()});i.add(a)}return async()=>{await i.dispose(),await r.dispose()}}function $t(t){return[...new Set(t.normalizedSources.flatMap(e=>e.base))]}function A(t){return`\x1B[2m${t}\x1B[22m`}function Ot(t){return`\x1B[31m${t}\x1B[39m`}import{__unstable__loadDesignSystem as vt}from"@tailwindcss/node";import le from"fs/promises";import At from"path";import{createInterface as ae}from"readline";function dt(t,e){let n=t.length,i=e.length,s=n<i?n:i;for(let r=0;r<s;r++){let l=t.charCodeAt(r),o=e.charCodeAt(r);if(l>=48&&l<=57&&o>=48&&o<=57){let a=r,u=r+1,g=r,m=r+1;for(l=t.charCodeAt(u);l>=48&&l<=57;)l=t.charCodeAt(++u);for(o=e.charCodeAt(m);o>=48&&o<=57;)o=e.charCodeAt(++m);let p=t.slice(a,u),h=e.slice(g,m),C=Number(p)-Number(h);if(C)return C;if(p<h)return-1;if(p>h)return 1;continue}if(l!==o)return l-o}return t.length-e.length}var Z=new Uint8Array(256);function Rt(t,e){let n=0,i=[],s=0,r=t.length,l=e.charCodeAt(0);for(let o=0;o<r;o++){let a=t.charCodeAt(o);if(n===0&&a===l){i.push(t.slice(s,o)),s=o+1;continue}switch(a){case 92:o+=1;break;case 39:case 34:for(;++o<r;){let u=t.charCodeAt(o);if(u===92){o+=1;continue}if(u===a)break}break;case 40:Z[n]=41,n++;break;case 91:Z[n]=93,n++;break;case 123:Z[n]=125,n++;break;case 93:case 125:case 41:n>0&&a===Z[n-1]&&n--;break}}return i.push(t.slice(s)),i}import O from"picocolors";function P({render:t=!0,invalid:e,usage:n,options:i}){let s=process.stdout.columns??80,r=[],l=t?J:(o="")=>{r.push(o)};if(l(V()),e&&(l(),l(`${O.dim("Invalid command:")} ${e}`)),n&&n.length>0){l(),l(O.dim("Usage:"));for(let[o,a]of n.entries()){let u=a.slice(0,a.indexOf("[")),g=a.slice(a.indexOf("["));g=g.replace(/\[.*?\]/g,h=>O.dim(h));let p=ot(g,s-Y.indent-u.length-1);p.length>1&&o!==0&&l(),l(k(`${u}${p.shift()}`));for(let h of p)l(k(h,u.length))}}if(i){let o=0;for(let{alias:m}of Object.values(i))m&&(o=Math.max(o,m.length));let a=[],u=0;for(let[m,{alias:p,values:h}]of Object.entries(i)){h?.length&&(m+=`[=${h.join(", ")}]`);let C=[p&&`${p.padStart(o)}`,p?m:" ".repeat(o+2)+m].filter(Boolean).join(", ");a.push(C),u=Math.max(u,C.length)}l(),l(O.dim("Options:"));let g=8;for(let{description:m,default:p=null}of Object.values(i)){let h=a.shift(),C=g+(u-h.length),j=2,U=s-h.length-C-j-Y.indent,z=ot(p!==null?`${m} ${O.dim(`[default:\u202F${v(`${p}`)}]`)}`:m,U);l(k(`${O.blue(h)} ${O.dim(O.gray("\xB7")).repeat(C)} ${z.shift()}`));for(let I of z)l(k(`${" ".repeat(h.length+C+j)}${I}`))}}if(!t)return r.join(`
|
|
15
|
+
`)}var ue=String.raw;function ft(){return"tailwindcss canonicalize [classes...]"}function ce(){return"tailwindcss canonicalize --css input.css [classes...]"}function pe(){return"tailwindcss canonicalize --stream [--css input.css]"}function Lt(){return{"--css":{type:"string",description:'CSS entry file used to load the Tailwind design system (defaults to `@import "tailwindcss";`)'},"--format":{type:"string",description:"Output format",default:"text",values:["text","json","jsonl"]},"--stream":{type:"boolean",description:"Read candidate groups from stdin line by line and write results to stdout",default:!1}}}var Bt={"--help":{type:"boolean",description:"Display usage information",alias:"-h",default:!1}};async function kt({argv:t=process.argv.slice(2),cwd:e=process.cwd(),stdin:n=null,stdinIsTTY:i=process.stdin.isTTY,stdoutIsTTY:s=process.stdout.isTTY}={}){try{let r=R({...Lt(),...Bt},t),l=we(r["--format"]??"text");if(s&&t.length===0||r["--help"])return{exitCode:0,stdout:Pt()??"",stderr:""};if(r["--stream"])return await de({css:r["--css"],cwd:e,format:l,input:process.stdin,output:process.stdout}),{exitCode:0,stdout:"",stderr:""};let o=r._.length>0?r._:await fe({stdin:n,stdinIsTTY:i});if(o.length===0)return be("No candidate groups provided");let a=await he({css:r["--css"],cwd:e,inputs:o});return{exitCode:0,stdout:ge(a,l),stderr:""}}catch(r){return{exitCode:1,stdout:"",stderr:r instanceof Error?r.message:String(r)}}}async function de({css:t,cwd:e,format:n,input:i,output:s}){let r=await Ft(t,e),l=ae({input:i}),o=!0;n==="json"&&s.write("[");for await(let a of l){let u=jt(r,a);switch(n){case"text":{s.write(u.output+`
|
|
16
|
+
`);break}case"jsonl":{s.write(JSON.stringify(u)+`
|
|
17
|
+
`);break}case"json":{o?s.write(`
|
|
18
|
+
`):s.write(`,
|
|
19
|
+
`),s.write(Ce(JSON.stringify(u,null,2),2)),o=!1;break}}}n==="json"&&s.write(o?"]":`
|
|
20
|
+
]`)}function fe({stdin:t,stdinIsTTY:e}){return t!==null?Promise.resolve(Nt(t)):e?Promise.resolve([]):me().then(Nt)}async function me(){return new Promise((t,e)=>{let n="";process.stdin.on("data",i=>{n+=i}),process.stdin.on("end",()=>t(n)),process.stdin.on("error",i=>e(i))})}async function he({css:t,cwd:e=process.cwd(),inputs:n}){let i=await Ft(t,e);return n.map(s=>jt(i,s))}function ge(t,e){switch(e){case"json":return JSON.stringify(t,null,2);case"jsonl":return t.map(n=>JSON.stringify(n)).join(`
|
|
21
|
+
`);case"text":return t.map(n=>n.output).join(`
|
|
22
|
+
`)}}function Pt(){return P({render:!1,usage:[ft(),ce(),pe()],options:{...Lt(),...Bt}})}async function Ft(t,e){if(t===null)return vt(ue`
|
|
23
|
+
@import 'tailwindcss';
|
|
24
|
+
`,{base:e});let n=At.resolve(e,t),i=await le.readFile(n,"utf8");return vt(i,{base:At.dirname(n)})}function Nt(t){return t.split(/\r?\n/g).map(e=>e.trim()).filter(e=>e.length>0)}function we(t){if(t==="text"||t==="json"||t==="jsonl")return t;throw new Error(`Invalid value for --format: ${t}`)}function be(t){return{exitCode:1,stdout:Pt()??"",stderr:t}}function ye(t){let e=t.trim();return e.length===0?[]:Rt(e," ").map(n=>n.trim()).filter(n=>n.length>0)}function Se(t,e){let n=ye(e);return n=t.canonicalizeCandidates(n,{collapse:!0,logicalToPhysical:!0}),xe(t.getClassOrder(n)).join(" ")}function jt(t,e){let n=Se(t,e);return{input:e,output:n,changed:n!==e}}function Ce(t,e){let n=" ".repeat(e);return t.split(`
|
|
25
|
+
`).map(i=>n+i).join(`
|
|
26
|
+
`)}function xe(t){return t.slice().sort(([e,n],[i,s])=>n===s?dt(e,i):n===null?-1:s===null?1:_e(n-s)||dt(e,i)).map(([e])=>e)}function _e(t){return t>0n?1:t===0n?0:-1}var F={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}};function mt(t="tailwindcss"){return`${t} [--input input.css] [--output output.css] [--watch] [options\u2026]`}function Ut({invalid:t}={}){P({invalid:t,usage:[mt("tailwindcss"),mt("tailwindcss build"),ft()],commands:{build:"Build your CSS",canonicalize:"Canonicalize candidate lists"},options:{...N(),...F}})}async function Ee(){let t=process.argv.slice(2),e=t[0],n=R({...N(),...F},t);if(e==="build"){let s=R({...N(),...F},t.slice(1));(process.stdout.isTTY&&t.length===1||s["--help"])&&(P({usage:[mt("tailwindcss build")],options:{...N(),...F}}),process.exit(0)),await pt(s);return}if(e==="canonicalize"){let s=await kt({argv:t.slice(1)});s.stdout.length>0&&process.stdout.write(`${s.stdout}
|
|
27
|
+
`),s.stderr.length>0&&process.stderr.write(`${s.stderr}
|
|
28
|
+
`),process.exitCode=s.exitCode;return}(process.stdout.isTTY&&e===void 0||n["--help"])&&(Ut(),process.exit(0)),e&&!e.startsWith("-")&&(Ut({invalid:e}),process.exit(1));let i=R({...N(),...F});await pt(i)}await Ee();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/cli",
|
|
3
|
-
"version": "0.0.0-insiders.
|
|
3
|
+
"version": "0.0.0-insiders.44818a6",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,14 +24,13 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@parcel/watcher": "
|
|
28
|
-
"enhanced-resolve": "
|
|
29
|
-
"lightningcss": "1.29.2",
|
|
27
|
+
"@parcel/watcher": "2.5.1",
|
|
28
|
+
"enhanced-resolve": "5.21.6",
|
|
30
29
|
"mri": "^1.2.0",
|
|
31
30
|
"picocolors": "^1.1.1",
|
|
32
|
-
"@tailwindcss/node": "0.0.0-insiders.
|
|
33
|
-
"tailwindcss": "0.0.0-insiders.
|
|
34
|
-
"
|
|
31
|
+
"@tailwindcss/node": "0.0.0-insiders.44818a6",
|
|
32
|
+
"@tailwindcss/oxide": "0.0.0-insiders.44818a6",
|
|
33
|
+
"tailwindcss": "0.0.0-insiders.44818a6"
|
|
35
34
|
},
|
|
36
35
|
"scripts": {
|
|
37
36
|
"lint": "tsc --noEmit",
|