New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tailwindcss/postcss

Package Overview
Dependencies
Maintainers
4
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tailwindcss/postcss - npm Package Compare versions

Comparing version 0.0.0-development.1 to 0.0.0-development.2

5

dist/index.d.ts
import { PluginCreator } from 'postcss';
interface PluginOptions {
/**
* The directory to scan for Tailwind CSS files.
* Defaults to the current working directory.
*/
base?: string;
}

@@ -5,0 +10,0 @@ declare const _default: PluginCreator<PluginOptions>;

35

dist/index.js

@@ -1,18 +0,22 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/index.ts
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/index.ts
var _oxide = require('@tailwindcss/oxide');
require('postcss');
var _tailwindcss = require('tailwindcss');
var _oxide = require('@tailwindcss/oxide');
function tailwindcss(opts) {
function tailwindcss(opts = {}) {
let base = _nullishCoalesce(opts.base, () => ( process.cwd()));
return {
postcssPlugin: "tailwindcss-v4",
AtRule: {
import: async (atRule, { AtRule }) => {
let isTailwind = atRule.params === "'tailwindcss'" || atRule.params === '"tailwindcss"';
if (!isTailwind)
return;
atRule.replaceWith(new AtRule({ name: "tailwind" }));
},
// We must handle `@tailwind` because not all tools preserve `@import`
// at-rules and replace them with their content before we see them.
tailwind: async (atRule, { result, postcss }) => {
console.time("Tailwind CSS");
console.time("Resolve project");
let project = _oxide.resolveProject.call(void 0, { base: process.cwd() });
console.timeEnd("Resolve project");
console.time("Compile CSS");
let css = _tailwindcss.preflight + _tailwindcss.compile.call(void 0, project.candidates);
console.timeEnd("Compile CSS");
for (let file of project.files) {
let scanResult = _oxide.scanDir.call(void 0, { base, globs: true });
let css = _tailwindcss.optimizeCss.call(void 0, _tailwindcss.preflight + _tailwindcss.compile.call(void 0, scanResult.candidates));
for (let file of scanResult.files) {
result.messages.push({

@@ -25,7 +29,7 @@ type: "dependency",

}
for (let { base, glob } of project.globs) {
for (let { base: base2, glob } of scanResult.globs) {
result.messages.push({
type: "dir-dependency",
plugin: "tailwindcss-v4",
dir: base,
dir: base2,
glob,

@@ -36,6 +40,5 @@ parent: result.opts.from

console.time("Parsing CSS");
let result2 = postcss.parse(css);
let nodes = postcss.parse(css);
console.timeEnd("Parsing CSS");
atRule.replaceWith(result2);
console.timeEnd("Tailwind CSS");
atRule.replaceWith(nodes);
}

@@ -42,0 +45,0 @@ }

{
"name": "@tailwindcss/postcss",
"version": "0.0.0-development.1",
"version": "0.0.0-development.2",
"scripts": {

@@ -18,5 +18,5 @@ "build": "tsup-node ./src/index.ts --format cjs --dts --cjsInterop --splitting",

"dependencies": {
"tailwindcss": "0.0.0-development.1",
"@tailwindcss/oxide": "0.0.0-development.1"
"tailwindcss": "0.0.0-development.2",
"@tailwindcss/oxide": "0.0.0-development.2"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc