Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@glideapps/prettier-plugin-glide-tailwind

Package Overview
Dependencies
Maintainers
8
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glideapps/prettier-plugin-glide-tailwind - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

3

.vscode/settings.json

@@ -50,3 +50,4 @@ {

"editor.renderControlCharacters": true,
"editor.suggest.showStatusBar": true
"editor.suggest.showStatusBar": true,
"editor.wordWrapColumn": 120
}

@@ -12,5 +12,5 @@ "use strict";

// Use this path for running tests.jsx locally during development
// nodeModulesPath: path.join(__dirname, "../node_modules"),
nodeModulesPath: path_1.default.join(__dirname, "../node_modules"),
// Use this path for production builds to get it working in app/
nodeModulesPath: path_1.default.join(__dirname, "../../../../node_modules"),
// nodeModulesPath: path.join(__dirname, "../../../../node_modules"),
config: path_1.default.join(__dirname, "../tailwind.config.js"),

@@ -17,0 +17,0 @@ });

@@ -56,5 +56,4 @@ "use strict";

const restructuredGroups = groups.map(({ names, content }) => `${names}:(${content})`);
const newValue = `${restructuredClasses}${indentedNewLine}${restructuredGroups.join(`${indentedNewLine}`)}`.trim();
// loop through newvalue array and conditionally join a new \n and indent if media type
// console.log(normalClasses);
const indentedGroups = restructuredGroups.join(`${indentedNewLine}`);
const newValue = ` ${restructuredClasses} ${indentedNewLine}${indentedGroups}`.trim();
node.value.value = newValue;

@@ -61,0 +60,0 @@ node.value.extra = Object.assign(Object.assign({}, (node.value.extra || {})), { rawValue: newValue, raw: `"${newValue}"` });

@@ -42,8 +42,7 @@ "use strict";

// the additional +1 is to indent it below the child
const indentString = support_1.default(node.loc.start.column - 8);
const indentString = support_1.default(node.loc.start.column - 7);
const indentedNewLine = `\n${indentString}`;
// This will sort through tw definitions with this type of format:
// css={[ tw`block mx-auto`]},
const normalClasses = twClassesSorter
.sortClasslist(rawValue.replace(support_1.TW_MARCO_EXP, str => {
const normalClasses = twClassesSorter.sortClasslist(rawValue.replace(support_1.TW_MARCO_EXP, str => {
const groupNames = str

@@ -61,11 +60,8 @@ .match(support_1.TW_MARCO_GROUP_NAMES_EXP)

return "";
}))
.join(" ");
// Sort groups
groups.sort(group_names_sorter_1.default(val => val.names[0]));
}));
const restructuredClasses = normalClasses.join(" ");
// groups.sort(groupNamesSorter<{ names: string[] }>(val => val.names[0]));
const restructuredGroups = groups.map(({ names, content }) => `${names}:(${content})`);
// const finalStr = `\n${normalClasses} ${groups
// .map(({ names, content }) => `${names.join(":")}:(${content})`)
// .join(` \n${indentString}`)}`.trim();
const finalStr = `${normalClasses}${indentedNewLine}${restructuredGroups.join(`${indentedNewLine}`)}`.trim();
const indentedGroups = restructuredGroups.join(`${indentedNewLine}`);
const finalStr = `${restructuredClasses.length > 20 ? indentedNewLine : ""}${restructuredClasses}${indentedNewLine}${indentedGroups}`.trim();
q.value.raw = finalStr;

@@ -72,0 +68,0 @@ if (q.value.cooked) {

@@ -7,4 +7,3 @@ import type TWClassesSorter from "tailwind-classes-sorter";

typescript: any;
vue: any;
};
export default _default;

@@ -10,3 +10,2 @@ "use strict";

const typescript_1 = __importDefault(require("./typescript"));
const vue_1 = __importDefault(require("./vue"));
exports.default = (twClassesSorter) => ({

@@ -17,3 +16,2 @@ html: html_1.default(twClassesSorter),

typescript: typescript_1.default(twClassesSorter),
vue: vue_1.default(twClassesSorter),
});
{
"name": "@glideapps/prettier-plugin-glide-tailwind",
"version": "3.0.0",
"version": "3.0.1",
"description": "Formatting and sorting for glide tailwind classes",

@@ -5,0 +5,0 @@ "author": "Original author - Ari Seyhun | Modified by Bry Nguyen",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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