@ingcrea/aumic-tailwind-killer 3.1.4

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/dist/worker.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = processFile;
4
+ const parser_1 = require("./ast/parser");
5
+ const astEngine = new parser_1.AstInterceptor();
6
+ async function processFile(data) {
7
+ if (data.mode === 'scan') {
8
+ const extracted = new Map();
9
+ astEngine.processFrameworkFile(data.content, data.filePath, (twClass) => {
10
+ extracted.set(twClass, (extracted.get(twClass) || 0) + 1);
11
+ return twClass;
12
+ });
13
+ // Retornamos las entradas serializadas para que Piscina las cruce entre hilos
14
+ return Array.from(extracted.entries());
15
+ }
16
+ else if (data.mode === 'mutate') {
17
+ const { newCode } = astEngine.processFrameworkFile(data.content, data.filePath, (twClass) => {
18
+ if (data.map && data.map[twClass]) {
19
+ return data.map[twClass].aumicClass;
20
+ }
21
+ return twClass;
22
+ });
23
+ return newCode;
24
+ }
25
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@ingcrea/aumic-tailwind-killer",
3
+ "version": "3.1.4",
4
+ "description": "Transpilador de Tailwind a CSS3 puro bajo estándar AUM-IC",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "aumic-tailwind-killer": "bin/aumic-killer.js"
8
+ },
9
+ "scripts": {
10
+ "bump": "node scripts/bump.js",
11
+ "build": "tsc",
12
+ "start": "node dist/index.js",
13
+ "publish-public": "npm publish --access public"
14
+ },
15
+ "dependencies": {
16
+ "@babel/generator": "^8.0.6",
17
+ "@babel/parser": "^8.0.6",
18
+ "@babel/traverse": "^8.0.6",
19
+ "@tailwindcss/postcss": "^4.0.0",
20
+ "dotenv": "^16.6.1",
21
+ "fs-extra": "^11.2.0",
22
+ "inquirer": "^9.3.8",
23
+ "tailwindcss": "^3.4.1",
24
+ "picocolors": "^1.0.0",
25
+ "ora": "^5.4.1",
26
+ "commander": "^11.0.0",
27
+ "glob": "^10.3.10",
28
+ "piscina": "^4.4.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/fs-extra": "^11.0.4",
32
+ "@types/node": "^20.11.20",
33
+ "typescript": "^5.3.3"
34
+ },
35
+ "author": "Ingeniería Creativa <soporte@ingcrea.com> (https://ingcrea.com)",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/ingcrea/aumic-tailwind-killer.git"
39
+ },
40
+ "keywords": [
41
+ "tailwind",
42
+ "css",
43
+ "aum-ic",
44
+ "transpiler",
45
+ "ast",
46
+ "cli"
47
+ ]
48
+ }