@tailwindcss/cli 0.0.0-insiders.ff8fd8c → 0.0.0-insiders.ffb1d72

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 CHANGED
@@ -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 any other conversation that would benefit from being searchable:
30
+ For help, discussion about best practices, or feature ideas:
31
31
 
32
32
  [Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions)
33
33
 
34
- For chatting with others using the framework:
35
-
36
- [Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe)
37
-
38
34
  ## Contributing
39
35
 
40
36
  If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**.
package/dist/index.mjs CHANGED
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
- var it=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),rt=t=>{throw TypeError(t)};var V=(t,e,n)=>{if(e!=null){typeof e!="object"&&typeof e!="function"&&rt("Object expected");var i,r;n&&(i=e[it("asyncDispose")]),i===void 0&&(i=e[it("dispose")],n&&(r=i)),typeof i!="function"&&rt("Object not disposable"),r&&(i=function(){try{r.call(this)}catch(o){return Promise.reject(o)}}),t.push([n,i,e])}else n&&t.push([n]);return e},q=(t,e,n)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(a,s,l,u){return u=Error(l),u.name="SuppressedError",u.error=a,u.suppressed=s,u},r=a=>e=n?new i(a,e,"An error was suppressed during disposal"):(n=!0,a),o=a=>{for(;a=t.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,l=>(r(l),o()))}catch(l){r(l)}if(n)throw e};return o()};import vt from"mri";function st(t,e=process.argv.slice(2)){for(let[r,o]of e.entries())o==="-"&&(e[r]="__IO_DEFAULT_VALUE__");let n=vt(e);for(let r in n)n[r]==="__IO_DEFAULT_VALUE__"&&(n[r]="-");let i={_:n._};for(let[r,{type:o,alias:a,default:s=o==="boolean"?!1:null}]of Object.entries(t)){if(i[r]=s,a){let l=a.slice(1);n[l]!==void 0&&(i[r]=ot(n[l],o))}{let l=r.slice(2);n[l]!==void 0&&(i[r]=ot(n[l],o))}}return i}function ot(t,e){switch(e){case"string":return B(t);case"boolean":return R(t);case"number":return O(t);case"boolean | string":return R(t)??B(t);case"number | string":return O(t)??B(t);case"boolean | number":return R(t)??O(t);case"boolean | number | string":return R(t)??O(t)??B(t);default:throw new Error(`Unhandled type: ${e}`)}}function R(t){if(t===!0||t===!1)return t;if(t==="true")return!0;if(t==="false")return!1}function O(t){if(typeof t=="number")return t;{let e=Number(t);if(!Number.isNaN(e))return e}}function B(t){return`${t}`}import Nt from"@parcel/watcher";import{compile as zt,env as Lt,Instrumentation as dt}from"@tailwindcss/node";import{clearRequireCache as Ut}from"@tailwindcss/node/require-cache";import{Scanner as Wt}from"@tailwindcss/oxide";import{Features as L,transform as It}from"lightningcss";import{existsSync as Et}from"node:fs";import Q from"node:fs/promises";import C from"node:path";var v=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 Rt from"node:fs";import pt from"node:path";import{stripVTControlCharacters as Ot}from"node:util";import g from"picocolors";import lt from"enhanced-resolve";import At from"node:fs";import{createRequire as Ft}from"node:module";var kt=Ft(import.meta.url).resolve;function at(t){if(typeof globalThis.__tw_resolve=="function"){let e=globalThis.__tw_resolve(t);if(e)return e}return kt(t)}var Yt=lt.ResolverFactory.createResolver({fileSystem:new lt.CachedInputFileSystem(At,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function ut(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 D={indent:2};function A(){return`${g.italic(g.bold(g.blue("\u2248")))} tailwindcss ${g.blue(`v${Bt()}`)}`}function N(t){return`${g.dim(g.blue("`"))}${g.blue(t)}${g.dim(g.blue("`"))}`}function ct(t,e=process.cwd(),{preferAbsoluteIfShorter:n=!0}={}){let i=pt.relative(e,t);return i.startsWith("..")||(i=`.${pt.sep}${i}`),n&&i.length>t.length?t:i}function K(t,e){let n=t.split(" "),i=[],r="",o=0;for(let a of n){let s=Ot(a).length;o+s+1>e&&(i.push(r),r="",o=0),r+=(o?" ":"")+a,o+=s+(o?1:0)}return o&&i.push(r),i}function z(t){let e=ut(t);return t<=50*1e6?g.green(e):t<=300*1e6?g.blue(e):t<=1e3*1e6?g.yellow(e):g.red(e)}function F(t,e=0){return`${" ".repeat(e+D.indent)}${t}`}function w(t=""){process.stderr.write(`${t}
3
- `)}function d(t=""){process.stdout.write(`${t}
4
- `)}function Bt(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:t}=JSON.parse(Rt.readFileSync(at("tailwindcss/package.json"),"utf-8"));return t}import G from"node:fs/promises";import Dt from"node:path";function J(){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 ft(t,e){try{if(await G.readFile(t,"utf8")===e)return}catch{}await G.mkdir(Dt.dirname(t),{recursive:!0}),await G.writeFile(t,e,"utf8")}var mt=String.raw,p=Lt.DEBUG;function U(){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",alias:"-w"},"--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:"."}}}async function ht(t){try{return await t()}catch(e){e instanceof Error&&w(e.toString()),process.exit(1)}}async function bt(t){var Z=[];try{let e=V(Z,new dt);p&&e.start("[@tailwindcss/cli] (initial build)");let n=C.resolve(t["--cwd"]);t["--output"]&&t["--output"]!=="-"&&(t["--output"]=C.resolve(n,t["--output"]));t["--input"]&&t["--input"]!=="-"&&(t["--input"]=C.resolve(n,t["--input"]),Et(t["--input"])||(w(A()),w(),w(`Specified input file ${N(ct(t["--input"]))} does not exist.`),process.exit(1)));let i=process.hrtime.bigint();let r=t["--input"]?t["--input"]==="-"?await J():await Q.readFile(t["--input"],"utf-8"):mt`
2
+ var se=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),le=e=>{throw TypeError(e)};var q=(e,t,n)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&le("Object expected");var i,o;n&&(i=t[se("asyncDispose")]),i===void 0&&(i=t[se("dispose")],n&&(o=i)),typeof i!="function"&&le("Object not disposable"),o&&(i=function(){try{o.call(this)}catch(r){return Promise.reject(r)}}),e.push([n,i,t])}else n&&e.push([n]);return t},K=(e,t,n)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(u,s,l,p){return p=Error(l),p.name="SuppressedError",p.error=u,p.suppressed=s,p},o=u=>t=n?new i(u,t,"An error was suppressed during disposal"):(n=!0,u),r=u=>{for(;u=e.pop();)try{var s=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(s).then(r,l=>(o(l),r()))}catch(l){o(l)}if(n)throw t};return r()};import Ae from"mri";function ue(e,t=process.argv.slice(2)){for(let[o,r]of t.entries())r==="-"&&(t[o]="__IO_DEFAULT_VALUE__");let n=Ae(t);for(let o in n)n[o]==="__IO_DEFAULT_VALUE__"&&(n[o]="-");let i={_:n._};for(let[o,{type:r,alias:u,default:s=r==="boolean"?!1:null}]of Object.entries(e)){if(i[o]=s,u){let l=u.slice(1);n[l]!==void 0&&(i[o]=ae(n[l],r))}{let l=o.slice(2);n[l]!==void 0&&(i[o]=ae(n[l],r))}}return i}function ae(e,t){switch(t){case"string":return W(e);case"boolean":return O(e);case"number":return R(e);case"boolean | string":return O(e)??W(e);case"number | string":return R(e)??W(e);case"boolean | number":return O(e)??R(e);case"boolean | number | string":return O(e)??R(e)??W(e);default:throw new Error(`Unhandled type: ${t}`)}}function O(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function R(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function W(e){return`${e}`}import De from"@parcel/watcher";import{compile as Ne,env as Ee,Instrumentation as me,optimize as Ue,toSourceMap as he}from"@tailwindcss/node";import{clearRequireCache as Le}from"@tailwindcss/node/require-cache";import{Scanner as je}from"@tailwindcss/oxide";import{existsSync as Ie}from"fs";import X from"fs/promises";import C from"path";var A=class{#e=new Set([]);queueMacrotask(t){let n=setTimeout(t,0);return this.add(()=>{clearTimeout(n)})}add(t){return this.#e.add(t),()=>{this.#e.delete(t),t()}}async dispose(){for(let t of this.#e)await t();this.#e.clear()}};import Oe from"fs";import de from"path";import{stripVTControlCharacters as Re}from"util";import w from"picocolors";import pe from"enhanced-resolve";import Fe from"fs";import{createRequire as Me}from"module";var Be=Me(import.meta.url).resolve;function ce(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return Be(e)}var He=pe.ResolverFactory.createResolver({fileSystem:new pe.CachedInputFileSystem(Fe,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function fe(e){let t=typeof e=="number"?BigInt(e):e;return t<1000n?`${t}ns`:(t/=1000n,t<1000n?`${t}\xB5s`:(t/=1000n,t<1000n?`${t}ms`:(t/=1000n,t<60n?`${t}s`:(t/=60n,t<60n?`${t}m`:(t/=60n,t<24n?`${t}h`:(t/=24n,`${t}d`))))))}var z={indent:2};function D(){return`${w.italic(w.bold(w.blue("\u2248")))} tailwindcss ${w.blue(`v${We()}`)}`}function k(e){return`${w.dim(w.blue("`"))}${w.blue(e)}${w.dim(w.blue("`"))}`}function N(e,t=process.cwd(),{preferAbsoluteIfShorter:n=!0}={}){let i=de.relative(t,e);return i.startsWith("..")||(i=`.${de.sep}${i}`),n&&i.length>e.length?e:i}function G(e,t){let n=e.split(" "),i=[],o="",r=0;for(let u of n){let s=Re(u).length;r+s+1>t&&(i.push(o),o="",r=0),o+=(r?" ":"")+u,r+=s+(r?1:0)}return r&&i.push(o),i}function E(e){let t=fe(e);return e<=50*1e6?w.green(t):e<=300*1e6?w.blue(t):e<=1e3*1e6?w.yellow(t):w.red(t)}function F(e,t=0){return`${" ".repeat(t+z.indent)}${e}`}function g(e=""){process.stderr.write(`${e}
3
+ `)}function h(e=""){process.stdout.write(`${e}
4
+ `)}function We(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(Oe.readFileSync(ce("tailwindcss/package.json"),"utf-8"));return e}import J from"fs/promises";import ze from"path";function Q(){return new Promise((e,t)=>{let n="";process.stdin.on("data",i=>{n+=i}),process.stdin.on("end",()=>e(n)),process.stdin.on("error",i=>t(i))})}async function Y(e,t){try{if(await J.readFile(e,"utf8")===t)return}catch{}await J.mkdir(ze.dirname(e),{recursive:!0}),await J.writeFile(e,t,"utf8")}var ye=String.raw,a=Ee.DEBUG;function U(){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}}}async function H(e){try{return await e()}catch(t){t instanceof Error&&g(t.toString()),process.exit(1)}}async function ge(e){var ne=[];try{g(D());g();let t=q(ne,new me);a&&t.start("[@tailwindcss/cli] (initial build)");let n=C.resolve(e["--cwd"]);e["--output"]&&e["--output"]!=="-"&&(e["--output"]=C.resolve(n,e["--output"]));e["--input"]&&e["--input"]!=="-"&&(e["--input"]=C.resolve(n,e["--input"]),Ie(e["--input"])||(g(`Specified input file ${k(N(e["--input"]))} does not exist.`),process.exit(1)));e["--input"]===e["--output"]&&e["--input"]!=="-"&&(g(`Specified input file ${k(N(e["--input"]))} and output file ${k(N(e["--output"]))} are identical.`),process.exit(1));e["--map"]==="-"&&(g("Use --map without a value to inline the source map"),process.exit(1));e["--map"]&&e["--map"]!==!0&&(e["--map"]=C.resolve(n,e["--map"]));let i=process.hrtime.bigint();let o=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye`
5
5
  @import 'tailwindcss';
6
- `;let o={css:"",optimizedCss:""};async function a(S,b,m){let x=S;if(b["--minify"]||b["--optimize"])if(S!==o.css){p&&m.start("Optimize CSS");let $=Pt(S,{file:b["--input"]??"input.css",minify:b["--minify"]??!1});p&&m.end("Optimize CSS"),o.css=S,o.optimizedCss=$,x=$}else x=o.optimizedCss;p&&m.start("Write output"),b["--output"]&&b["--output"]!=="-"?await ft(b["--output"],x):d(x),p&&m.end("Write output")}let s=t["--input"]&&t["--input"]!=="-"?C.resolve(t["--input"]):null;let l=s?C.dirname(s):process.cwd();let u=s?[s]:[];async function f(S,b){p&&b.start("Setup compiler");let m=await zt(S,{base:l,onDependency(E){u.push(E)}}),x=(m.root==="none"?[]:m.root===null?[{base:n,pattern:"**/*"}]:[m.root]).concat(m.globs),$=new Wt({sources:x});return p&&b.end("Setup compiler"),[m,$]}let[y,h]=await ht(()=>f(r,e));if(t["--watch"]){let S=await yt(gt(h),async function b(m){try{var x=[];try{if(m.length===1&&m[0]===t["--output"])return;let c=V(x,new dt);p&&c.start("[@tailwindcss/cli] (watcher)");let tt=process.hrtime.bigint();let et=[];let P="incremental";let nt=u;for(let T of m){if(nt.includes(T)){P="full";break}et.push({file:T,extension:C.extname(T).slice(1)})}let j="";if(P==="full"){let T=t["--input"]?t["--input"]==="-"?await J():await Q.readFile(t["--input"],"utf-8"):mt`
6
+ `;let r={css:"",optimizedCss:""};async function u(S,x,f,b){let $=S;if(f["--minify"]||f["--optimize"])if(S!==r.css){a&&b.start("Optimize CSS");let T=Ue(S,{file:f["--input"]??"input.css",minify:f["--minify"]??!1,map:x?.raw??void 0});a&&b.end("Optimize CSS"),r.css=S,r.optimizedCss=T.code,T.map&&(x=he(T.map)),$=T.code}else $=r.optimizedCss;x&&(f["--map"]===!0?($+=`
7
+ `,$+=x.inline):typeof f["--map"]=="string"&&(a&&b.start("Write source map"),await Y(f["--map"],x.raw),a&&b.end("Write source map"))),a&&b.start("Write output"),f["--output"]&&f["--output"]!=="-"?await Y(f["--output"],$):h($),a&&b.end("Write output")}let s=e["--input"]&&e["--input"]!=="-"?C.resolve(e["--input"]):null;let l=s?C.dirname(s):process.cwd();let p=s?[s]:[];async function m(S,x){a&&x.start("Setup compiler");let f=await Ne(S,{from:e["--output"]?s??"stdin.css":void 0,base:l,onDependency(T){p.push(T)}}),b=(f.root==="none"?[]:f.root===null?[{base:n,pattern:"**/*",negated:!1}]:[{...f.root,negated:!1}]).concat(f.sources),$=new je({sources:b});return a&&x.end("Setup compiler"),[f,$]}let[d,y]=await H(()=>m(o,t));if(e["--watch"]){let S=await we(be(y),async function x(f){try{var b=[];try{if(f.length===1&&f[0]===e["--output"])return;let c=q(b,new me);a&&c.start("[@tailwindcss/cli] (watcher)");let ie=process.hrtime.bigint();let re=[];let j="incremental";let oe=p;for(let _ of f){if(oe.includes(_)){j="full";break}re.push({file:_,extension:C.extname(_).slice(1)})}let I="";let P=null;if(j==="full"){let _=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye`
7
8
  @import 'tailwindcss';
8
- `;Ut(nt),u=s?[s]:[],[y,h]=await f(T,c),p&&c.start("Scan for candidates");let M=h.scan();p&&c.end("Scan for candidates"),p&&c.start("Setup new watchers");let Ct=await yt(gt(h),b);p&&c.end("Setup new watchers"),p&&c.start("Cleanup old watchers"),await S(),p&&c.end("Cleanup old watchers"),S=Ct,p&&c.start("Build CSS"),j=y.build(M),p&&c.end("Build CSS")}else if(P==="incremental"){p&&c.start("Scan for candidates");let T=h.scanFiles(et);if(p&&c.end("Scan for candidates"),T.length<=0){let M=process.hrtime.bigint();w(`Done in ${z(M-tt)}`);return}p&&c.start("Build CSS"),j=y.build(T),p&&c.end("Build CSS")}await a(j,t,c);let $t=process.hrtime.bigint();w(`Done in ${z($t-tt)}`)}catch($){var E=$,_t=!0}finally{q(x,E,_t)}}catch(c){c instanceof Error&&w(c.toString())}});t["--watch"]!=="always"&&process.stdin.on("end",()=>{S().then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}p&&e.start("Scan for candidates");let W=h.scan();p&&e.end("Scan for candidates");p&&e.start("Build CSS");let k=await ht(()=>y.build(W));p&&e.end("Build CSS");await a(k,t,e);let I=process.hrtime.bigint();w(A());w();w(`Done in ${z(I-i)}`)}catch(St){var xt=St,Tt=!0}finally{q(Z,xt,Tt)}}function gt(t){return t.globs.flatMap(e=>e.pattern[0]==="!"?[]:e.pattern===""?[]:e.base)}async function yt(t,e){t=t.sort((s,l)=>s.length-l.length);let n=[];for(let s=0;s<t.length;++s)for(let l=0;l<s;++l)t[s].startsWith(`${t[l]}/`)&&n.push(t[s]);t=t.filter(s=>!n.includes(s));let i=new v,r=new Set,o=new v;async function a(){await o.dispose(),o.queueMacrotask(()=>{e(Array.from(r)),r.clear()})}for(let s of t){let{unsubscribe:l}=await Nt.subscribe(s,async(u,f)=>{if(u){console.error(u);return}await Promise.all(f.map(async y=>{if(y.type==="delete")return;let h=null;try{h=await Q.lstat(y.path)}catch{}!h?.isFile()&&!h?.isSymbolicLink()||r.add(y.path)})),await a()});i.add(l)}return async()=>{await i.dispose(),await o.dispose()}}function Pt(t,{file:e="input.css",minify:n=!1}={}){function i(r){return It({filename:e,code:r,minify:n,sourceMap:!1,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:L.Nesting,exclude:L.LogicalProperties|L.DirSelector|L.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0}).code}return i(i(Buffer.from(t))).toString()}import _ from"picocolors";function Y({invalid:t,usage:e,options:n}){let i=process.stdout.columns;if(d(A()),t&&(d(),d(`${_.dim("Invalid command:")} ${t}`)),e&&e.length>0){d(),d(_.dim("Usage:"));for(let[r,o]of e.entries()){let a=o.slice(0,o.indexOf("[")),s=o.slice(o.indexOf("["));s=s.replace(/\[.*?\]/g,f=>_.dim(f));let u=K(s,i-D.indent-a.length-1);u.length>1&&r!==0&&d(),d(F(`${a}${u.shift()}`));for(let f of u)d(F(f,a.length))}}if(n){let r=0;for(let{alias:l}of Object.values(n))l&&(r=Math.max(r,l.length));let o=[],a=0;for(let[l,{alias:u}]of Object.entries(n)){let f=[u&&`${u.padStart(r)}`,u?l:" ".repeat(r+2)+l].filter(Boolean).join(", ");o.push(f),a=Math.max(a,f.length)}d(),d(_.dim("Options:"));let s=8;for(let{description:l,default:u=null}of Object.values(n)){let f=o.shift(),y=s+(a-f.length),h=2,W=i-f.length-y-h-D.indent,k=K(u!==null?`${l} ${_.dim(`[default:\u202F${N(`${u}`)}]`)}`:l,W);d(F(`${_.blue(f)} ${_.dim(_.gray("\xB7")).repeat(y)} ${k.shift()}`));for(let I of k)d(F(`${" ".repeat(f.length+y+h)}${I}`))}}}var H={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},X=st({...U(),...H}),wt=X._[0];wt&&(Y({invalid:wt,usage:["tailwindcss [options]"],options:{...U(),...H}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||X["--help"])&&(Y({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...U(),...H}}),process.exit(0));bt(X);
9
+ `;Le(oe),p=s?[s]:[],[d,y]=await m(_,c),a&&c.start("Scan for candidates");let V=y.scan();a&&c.end("Scan for candidates"),a&&c.start("Setup new watchers");let ke=await we(be(y),x);a&&c.end("Setup new watchers"),a&&c.start("Cleanup old watchers"),await S(),a&&c.end("Cleanup old watchers"),S=ke,a&&c.start("Build CSS"),I=d.build(V),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),P=d.buildSourceMap(),a&&c.end("Build Source Map"))}else if(j==="incremental"){a&&c.start("Scan for candidates");let _=y.scanFiles(re);if(a&&c.end("Scan for candidates"),_.length<=0){let V=process.hrtime.bigint();g(`Done in ${E(V-ie)}`);return}a&&c.start("Build CSS"),I=d.build(_),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),P=d.buildSourceMap(),a&&c.end("Build Source Map"))}await u(I,P,e,c);let Ce=process.hrtime.bigint();g(`Done in ${E(Ce-ie)}`)}catch($){var T=$,ve=!0}finally{K(b,T,ve)}}catch(c){c instanceof Error&&g(c.toString())}});e["--watch"]!=="always"&&process.stdin.on("end",()=>{S().then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}a&&t.start("Scan for candidates");let L=y.scan();a&&t.end("Scan for candidates");a&&t.start("Build CSS");let M=await H(()=>d.build(L));a&&t.end("Build CSS");let B=null;e["--map"]&&(a&&t.start("Build Source Map"),B=await H(()=>he(d.buildSourceMap())),a&&t.end("Build Source Map"));await u(M,B,e,t);let xe=process.hrtime.bigint();g(`Done in ${E(xe-i)}`)}catch($e){var Te=$e,_e=!0}finally{K(ne,Te,_e)}}async function we(e,t){e=e.sort((s,l)=>s.length-l.length);let n=[];for(let s=0;s<e.length;++s)for(let l=0;l<s;++l)e[s].startsWith(`${e[l]}/`)&&n.push(e[s]);e=e.filter(s=>!n.includes(s));let i=new A,o=new Set,r=new A;async function u(){await r.dispose(),r.queueMacrotask(()=>{t(Array.from(o)),o.clear()})}for(let s of e){let{unsubscribe:l}=await De.subscribe(s,async(p,m)=>{if(p){console.error(p);return}await Promise.all(m.map(async d=>{if(d.type==="delete")return;let y=null;try{y=await X.lstat(d.path)}catch{}!y?.isFile()&&!y?.isSymbolicLink()||o.add(d.path)})),await u()});i.add(l)}return async()=>{await i.dispose(),await r.dispose()}}function be(e){return[...new Set(e.normalizedSources.flatMap(t=>t.base))]}import v from"picocolors";function Z({invalid:e,usage:t,options:n}){let i=process.stdout.columns;if(h(D()),e&&(h(),h(`${v.dim("Invalid command:")} ${e}`)),t&&t.length>0){h(),h(v.dim("Usage:"));for(let[o,r]of t.entries()){let u=r.slice(0,r.indexOf("[")),s=r.slice(r.indexOf("["));s=s.replace(/\[.*?\]/g,m=>v.dim(m));let p=G(s,i-z.indent-u.length-1);p.length>1&&o!==0&&h(),h(F(`${u}${p.shift()}`));for(let m of p)h(F(m,u.length))}}if(n){let o=0;for(let{alias:l}of Object.values(n))l&&(o=Math.max(o,l.length));let r=[],u=0;for(let[l,{alias:p,values:m}]of Object.entries(n)){m?.length&&(l+=`[=${m.join(", ")}]`);let d=[p&&`${p.padStart(o)}`,p?l:" ".repeat(o+2)+l].filter(Boolean).join(", ");r.push(d),u=Math.max(u,d.length)}h(),h(v.dim("Options:"));let s=8;for(let{description:l,default:p=null}of Object.values(n)){let m=r.shift(),d=s+(u-m.length),y=2,L=i-m.length-d-y-z.indent,M=G(p!==null?`${l} ${v.dim(`[default:\u202F${k(`${p}`)}]`)}`:l,L);h(F(`${v.blue(m)} ${v.dim(v.gray("\xB7")).repeat(d)} ${M.shift()}`));for(let B of M)h(F(`${" ".repeat(m.length+d+y)}${B}`))}}}var ee={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},te=ue({...U(),...ee}),Se=te._[0];Se&&(Z({invalid:Se,usage:["tailwindcss [options]"],options:{...U(),...ee}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||te["--help"])&&(Z({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...U(),...ee}}),process.exit(0));ge(te);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailwindcss/cli",
3
- "version": "0.0.0-insiders.ff8fd8c",
3
+ "version": "0.0.0-insiders.ffb1d72",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,13 +25,12 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@parcel/watcher": "^2.5.1",
28
- "enhanced-resolve": "^5.18.1",
29
- "lightningcss": "^1.29.1",
28
+ "enhanced-resolve": "^5.18.2",
30
29
  "mri": "^1.2.0",
31
30
  "picocolors": "^1.1.1",
32
- "@tailwindcss/node": "0.0.0-insiders.ff8fd8c",
33
- "@tailwindcss/oxide": "0.0.0-insiders.ff8fd8c",
34
- "tailwindcss": "0.0.0-insiders.ff8fd8c"
31
+ "@tailwindcss/oxide": "0.0.0-insiders.ffb1d72",
32
+ "@tailwindcss/node": "0.0.0-insiders.ffb1d72",
33
+ "tailwindcss": "0.0.0-insiders.ffb1d72"
35
34
  },
36
35
  "scripts": {
37
36
  "lint": "tsc --noEmit",