@nlabs/lex 1.48.7 → 1.49.0

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.
Files changed (105) hide show
  1. package/.storybook/main.ts +9 -2
  2. package/.vscode/settings.json +1 -6
  3. package/README.md +249 -0
  4. package/eslint.config.mjs +24 -0
  5. package/examples/lex.config.js +18 -8
  6. package/examples/serverless-example/README.md +109 -0
  7. package/examples/serverless-example/dist/handlers/echo.js +15 -0
  8. package/examples/serverless-example/dist/handlers/graphql.js +137 -0
  9. package/examples/serverless-example/dist/handlers/hello.js +15 -0
  10. package/examples/serverless-example/dist/handlers/test.js +17 -0
  11. package/examples/serverless-example/dist/handlers/websocket.js +14 -0
  12. package/examples/serverless-example/lex.config.mjs +74 -0
  13. package/jest.config.mjs +13 -12
  14. package/{dist → lib}/LexConfig.d.ts +7 -6
  15. package/lib/LexConfig.js +268 -0
  16. package/lib/commands/ai/ai.js +303 -0
  17. package/{dist → lib}/commands/build/build.d.ts +3 -0
  18. package/lib/commands/build/build.js +494 -0
  19. package/{dist → lib}/commands/clean/clean.js +1 -1
  20. package/lib/commands/compile/compile.js +241 -0
  21. package/lib/commands/copy/copy.js +38 -0
  22. package/{dist → lib}/commands/create/create.js +1 -1
  23. package/{dist → lib}/commands/dev/dev.d.ts +2 -0
  24. package/lib/commands/dev/dev.js +286 -0
  25. package/{dist → lib}/commands/init/init.js +1 -1
  26. package/lib/commands/lint/lint.js +993 -0
  27. package/{dist → lib}/commands/migrate/migrate.js +1 -1
  28. package/lib/commands/publish/publish.js +104 -0
  29. package/lib/commands/serverless/serverless.d.ts +17 -0
  30. package/lib/commands/serverless/serverless.js +662 -0
  31. package/lib/commands/storybook/storybook.js +249 -0
  32. package/lib/commands/test/test.js +428 -0
  33. package/lib/commands/update/update.js +128 -0
  34. package/{dist → lib}/create/changelog.js +1 -1
  35. package/{dist → lib}/index.d.ts +1 -0
  36. package/{dist → lib}/index.js +2 -1
  37. package/lib/lex.js +73 -0
  38. package/lib/utils/aiService.d.ts +9 -0
  39. package/lib/utils/aiService.js +299 -0
  40. package/{dist → lib}/utils/app.d.ts +3 -0
  41. package/lib/utils/app.js +296 -0
  42. package/{dist → lib}/utils/file.d.ts +7 -3
  43. package/lib/utils/file.js +229 -0
  44. package/lib/utils/translations.d.ts +1 -0
  45. package/lib/utils/translations.js +74 -0
  46. package/package.json +59 -53
  47. package/postcss.config.js +5 -3
  48. package/tsconfig.build.json +2 -2
  49. package/webpack.config.js +229 -39
  50. package/dist/LexConfig.js +0 -287
  51. package/dist/commands/ai/ai.js +0 -303
  52. package/dist/commands/build/build.js +0 -404
  53. package/dist/commands/compile/compile.js +0 -234
  54. package/dist/commands/copy/copy.js +0 -38
  55. package/dist/commands/dev/dev.js +0 -74
  56. package/dist/commands/lint/lint.js +0 -993
  57. package/dist/commands/publish/publish.js +0 -104
  58. package/dist/commands/storybook/storybook.js +0 -249
  59. package/dist/commands/test/test.js +0 -429
  60. package/dist/commands/update/update.js +0 -132
  61. package/dist/lex.js +0 -70
  62. package/dist/utils/aiService.d.ts +0 -9
  63. package/dist/utils/aiService.js +0 -299
  64. package/dist/utils/app.js +0 -267
  65. package/dist/utils/file.js +0 -185
  66. package/emptyModule.js +0 -0
  67. package/eslint.config.js +0 -3
  68. /package/{dist → lib}/Button.stories.d.ts +0 -0
  69. /package/{dist → lib}/commands/ai/ai.d.ts +0 -0
  70. /package/{dist → lib}/commands/ai/index.d.ts +0 -0
  71. /package/{dist → lib}/commands/ai/index.js +0 -0
  72. /package/{dist → lib}/commands/clean/clean.d.ts +0 -0
  73. /package/{dist → lib}/commands/compile/compile.d.ts +0 -0
  74. /package/{dist → lib}/commands/config/config.d.ts +0 -0
  75. /package/{dist → lib}/commands/config/config.js +0 -0
  76. /package/{dist → lib}/commands/copy/copy.d.ts +0 -0
  77. /package/{dist → lib}/commands/create/create.d.ts +0 -0
  78. /package/{dist → lib}/commands/init/init.d.ts +0 -0
  79. /package/{dist → lib}/commands/link/link.d.ts +0 -0
  80. /package/{dist → lib}/commands/link/link.js +0 -0
  81. /package/{dist → lib}/commands/lint/autofix.d.ts +0 -0
  82. /package/{dist → lib}/commands/lint/lint.d.ts +0 -0
  83. /package/{dist → lib}/commands/migrate/migrate.d.ts +0 -0
  84. /package/{dist → lib}/commands/publish/publish.d.ts +0 -0
  85. /package/{dist → lib}/commands/storybook/storybook.d.ts +0 -0
  86. /package/{dist → lib}/commands/test/test.d.ts +0 -0
  87. /package/{dist → lib}/commands/update/update.d.ts +0 -0
  88. /package/{dist → lib}/commands/upgrade/upgrade.d.ts +0 -0
  89. /package/{dist → lib}/commands/upgrade/upgrade.js +0 -0
  90. /package/{dist → lib}/commands/versions/versions.d.ts +0 -0
  91. /package/{dist → lib}/commands/versions/versions.js +0 -0
  92. /package/{dist → lib}/create/changelog.d.ts +0 -0
  93. /package/{dist → lib}/lex.d.ts +0 -0
  94. /package/{dist → lib}/storybook/index.d.ts +0 -0
  95. /package/{dist → lib}/storybook/index.js +0 -0
  96. /package/{dist → lib}/test-react/index.d.ts +0 -0
  97. /package/{dist → lib}/test-react/index.js +0 -0
  98. /package/{dist → lib}/types.d.ts +0 -0
  99. /package/{dist → lib}/types.js +0 -0
  100. /package/{dist → lib}/utils/deepMerge.d.ts +0 -0
  101. /package/{dist → lib}/utils/deepMerge.js +0 -0
  102. /package/{dist → lib}/utils/log.d.ts +0 -0
  103. /package/{dist → lib}/utils/log.js +0 -0
  104. /package/{dist → lib}/utils/reactShim.d.ts +0 -0
  105. /package/{dist → lib}/utils/reactShim.js +0 -0
@@ -0,0 +1,74 @@
1
+ import { existsSync, readFileSync, writeFileSync } from "fs";
2
+ import { sync as globSync } from "glob";
3
+ import { resolve as pathResolve } from "path";
4
+ import { log } from "./log.js";
5
+ const flattenTranslations = (obj, prefix = "") => {
6
+ let flattened = {};
7
+ for (const key in obj) {
8
+ const value = obj[key];
9
+ const newKey = prefix ? `${prefix}.${key}` : key;
10
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
11
+ flattened = { ...flattened, ...flattenTranslations(value, newKey) };
12
+ } else {
13
+ flattened[newKey] = String(value);
14
+ }
15
+ }
16
+ return flattened;
17
+ };
18
+ const findTranslationFiles = (sourcePath) => {
19
+ const patterns = [
20
+ "**/translations/*.json",
21
+ "**/i18n/*.json",
22
+ "**/locales/*.json",
23
+ "**/lang/*.json"
24
+ ];
25
+ const files = [];
26
+ patterns.forEach((pattern) => {
27
+ try {
28
+ const matches = globSync(pattern, {
29
+ absolute: true,
30
+ cwd: sourcePath,
31
+ nodir: true
32
+ });
33
+ files.push(...matches);
34
+ } catch (error) {
35
+ }
36
+ });
37
+ return files;
38
+ };
39
+ const processTranslations = async (sourcePath, outputPath, quiet = false) => {
40
+ if (!existsSync(sourcePath)) {
41
+ log(`Source path does not exist: ${sourcePath}`, "error", quiet);
42
+ return;
43
+ }
44
+ log("Finding translation files...", "info", quiet);
45
+ const translationFiles = findTranslationFiles(sourcePath);
46
+ if (translationFiles.length === 0) {
47
+ log("No translation files found", "warn", quiet);
48
+ return;
49
+ }
50
+ log(`Found ${translationFiles.length} translation files`, "info", quiet);
51
+ let allTranslations = {};
52
+ for (const filePath of translationFiles) {
53
+ try {
54
+ const content = readFileSync(filePath, "utf8");
55
+ const data = JSON.parse(content);
56
+ allTranslations = { ...allTranslations, ...data };
57
+ log(`Processed: ${filePath}`, "info", quiet);
58
+ } catch (error) {
59
+ log(`Error processing ${filePath}: ${error.message}`, "error", quiet);
60
+ }
61
+ }
62
+ const flattenedTranslations = flattenTranslations(allTranslations);
63
+ const outputFile = pathResolve(outputPath, "translations.json");
64
+ try {
65
+ writeFileSync(outputFile, JSON.stringify(flattenedTranslations, null, 2), "utf8");
66
+ log(`Translations written to: ${outputFile}`, "info", quiet);
67
+ } catch (error) {
68
+ log(`Error writing translations file: ${error.message}`, "error", quiet);
69
+ }
70
+ };
71
+ export {
72
+ processTranslations
73
+ };
74
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJz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FhLFVBQVUsTUFBTTtBQUM3QyxZQUFNLE9BQU8sS0FBSyxNQUFNLE9BQU87QUFFL0Isd0JBQWtCLEVBQUMsR0FBRyxpQkFBaUIsR0FBRyxLQUFJO0FBRTlDLFVBQUksY0FBYyxRQUFRLElBQUksUUFBUSxLQUFLO0FBQUEsSUFDN0MsU0FBUyxPQUFPO0FBQ2QsVUFBSSxvQkFBb0IsUUFBUSxLQUFLLE1BQU0sT0FBTyxJQUFJLFNBQVMsS0FBSztBQUFBLElBQ3RFO0FBQUEsRUFDRjtBQUVBLFFBQU0sd0JBQXdCLG9CQUFvQixlQUFlO0FBQ2pFLFFBQU0sYUFBYSxZQUFZLFlBQVksbUJBQW1CO0FBRTlELE1BQUk7QUFDRixrQkFBYyxZQUFZLEtBQUssVUFBVSx1QkFBdUIsTUFBTSxDQUFDLEdBQUcsTUFBTTtBQUNoRixRQUFJLDRCQUE0QixVQUFVLElBQUksUUFBUSxLQUFLO0FBQUEsRUFDN0QsU0FBUyxPQUFPO0FBQ2QsUUFBSSxvQ0FBb0MsTUFBTSxPQUFPLElBQUksU0FBUyxLQUFLO0FBQUEsRUFDekU7QUFDRjsiLAogICJuYW1lcyI6IFtdCn0K
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "@nlabs/lex",
3
- "version": "1.48.7",
3
+ "version": "1.49.0",
4
4
  "description": "Lex",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "bin": "./dist/lex.js",
8
- "main": "./dist/index.js",
7
+ "bin": "./lib/lex.js",
8
+ "main": "./lib/index.js",
9
9
  "exports": {
10
10
  ".": {
11
- "import": "./dist/index.js",
11
+ "import": "./lib/index.js",
12
12
  "require": "./index.cjs"
13
13
  },
14
14
  "./test-react": {
15
- "types": "./dist/test-react/index.d.ts",
16
- "import": "./dist/test-react/index.js",
17
- "require": "./dist/test-react/index.js"
15
+ "types": "./lib/test-react/index.d.ts",
16
+ "import": "./lib/test-react/index.js",
17
+ "require": "./lib/test-react/index.js"
18
18
  },
19
19
  "./storybook": {
20
- "types": "./dist/storybook/index.d.ts",
21
- "import": "./dist/storybook/index.js",
22
- "require": "./dist/storybook/index.js"
20
+ "types": "./lib/storybook/index.d.ts",
21
+ "import": "./lib/storybook/index.js",
22
+ "require": "./lib/storybook/index.js"
23
23
  },
24
24
  "./eslint.config.js": "./eslint.config.js"
25
25
  },
26
- "types": "./dist/index.d.ts",
26
+ "types": "./lib/index.d.ts",
27
27
  "keywords": [
28
28
  "arkhamjs",
29
29
  "lex",
@@ -47,22 +47,22 @@
47
47
  "node": ">=22"
48
48
  },
49
49
  "scripts": {
50
- "build": "NODE_ENV=production && rm -rf dist && esbuild $(find src -name '*.ts' -not -name '*.test.ts' -not -name '*.spec.ts') --platform=node --outdir=./dist --sourcemap=inline --target=node22 --format=esm --packages=external && npm run declarations",
50
+ "build": "NODE_ENV=production && rm -rf lib && esbuild $(find src -name '*.ts' -not -name '*.test.ts' -not -name '*.spec.ts') --platform=node --outdir=./lib --sourcemap=inline --target=node22 --format=esm --packages=external && npm run declarations",
51
51
  "build:all": "npm run build && npm run build:ai",
52
- "build:ai": "NODE_ENV=production && esbuild src/commands/ai/*.ts --platform=node --outdir=./dist/commands/ai --sourcemap=inline --target=node22 --format=esm --packages=external",
52
+ "build:ai": "NODE_ENV=production && esbuild src/commands/ai/*.ts --platform=node --outdir=./lib/commands/ai --sourcemap=inline --target=node22 --format=esm --packages=external",
53
53
  "declarations": "tsc -p tsconfig.build.json",
54
- "clean": "rm -rf dist node_modules package-lock.json *.log coverage",
54
+ "clean": "rm -rf lib node_modules package-lock.json *.log coverage",
55
55
  "compile": "tsc -p tsconfig.build.json",
56
56
  "env": "LEX_CONFIG='{\"useTypescript\":true}'",
57
57
  "lint": "eslint ./src --fix --no-warn-ignored",
58
- "lint:ai": "node ./dist/lex.js lint --fix",
58
+ "lint:ai": "node ./lib/lex.js lint --fix",
59
59
  "lint:rebuild": "npm run build && npm run lint:ai",
60
60
  "prepublishOnly": "npm run build",
61
61
  "publish:major": "npm version major && npm publish",
62
62
  "publish:minor": "npm version minor && npm publish",
63
63
  "publish:patch": "npm version patch && npm publish",
64
- "test": "NODE_ENV=test && npm run lint && npm run test:unit",
65
- "test:unit": "NODE_ENV=test npm run env && npx jest",
64
+ "test": "NODE_ENV=test && (npm run lint || true) && npm run test:unit",
65
+ "test:unit": "NODE_ENV=test && npm run env && npx jest",
66
66
  "test:integration": "NODE_ENV=test && npx jest --testPathPattern=integration",
67
67
  "test:cli": "NODE_ENV=test && npx jest --testPathPattern=cli",
68
68
  "test:commands": "NODE_ENV=test && npm run test:cli && npm run test:integration",
@@ -77,7 +77,7 @@
77
77
  "ci:build": "npm run build && npm run package",
78
78
  "ci:deploy": "npm run prepublishOnly",
79
79
  "update": "npm-check-updates -i",
80
- "watch": "NODE_ENV=development rm -rf dist && npm run compile -w"
80
+ "watch": "NODE_ENV=development rm -rf lib && npm run compile -w"
81
81
  },
82
82
  "dependencies": {
83
83
  "@babel/core": "^7.28.0",
@@ -93,21 +93,22 @@
93
93
  "@storybook/addon-actions": "^9.0.8",
94
94
  "@storybook/addon-backgrounds": "^9.0.8",
95
95
  "@storybook/addon-controls": "^9.0.8",
96
- "@storybook/addon-docs": "^9.0.17",
97
- "@storybook/addon-links": "^9.0.17",
96
+ "@storybook/addon-docs": "^9.0.18",
97
+ "@storybook/addon-links": "^9.0.18",
98
98
  "@storybook/addon-postcss": "^2.0.0",
99
99
  "@storybook/addon-styling-webpack": "^2.0.0",
100
- "@storybook/addon-themes": "^9.0.17",
100
+ "@storybook/addon-themes": "^9.0.18",
101
101
  "@storybook/addon-viewport": "^9.0.8",
102
102
  "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
103
- "@storybook/cli": "^9.0.17",
104
- "@storybook/react": "^9.0.17",
105
- "@storybook/react-webpack5": "^9.0.17",
103
+ "@storybook/cli": "^9.0.18",
104
+ "@storybook/react": "^9.0.18",
105
+ "@storybook/react-webpack5": "^9.0.18",
106
+ "@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
106
107
  "@tailwindcss/postcss": "4.1.11",
107
- "@testing-library/jest-dom": "^6.6.3",
108
+ "@testing-library/jest-dom": "^6.6.4",
108
109
  "@testing-library/react": "^16.3.0",
109
- "@typescript-eslint/eslint-plugin": "^8.37.0",
110
- "@typescript-eslint/parser": "^8.37.0",
110
+ "@typescript-eslint/eslint-plugin": "^8.38.0",
111
+ "@typescript-eslint/parser": "^8.38.0",
111
112
  "acorn": "^8.15.0",
112
113
  "ajv": "^8.17.1",
113
114
  "assert": "^2.1.0",
@@ -118,7 +119,7 @@
118
119
  "babel-plugin-transform-import-meta": "^2.3.3",
119
120
  "boxen": "8.0.1",
120
121
  "buffer": "^6.0.3",
121
- "caniuse-lite": "1.0.30001727",
122
+ "caniuse-lite": "1.0.30001731",
122
123
  "chalk": "^5.4.1",
123
124
  "commander": "^14.0.0",
124
125
  "compare-versions": "^6.1.1",
@@ -126,27 +127,31 @@
126
127
  "config-webpack-plugin": "^1.1.0",
127
128
  "copy-webpack-plugin": "^13.0.0",
128
129
  "core-js": "^3.44.0",
129
- "crypto-browserify": "^3.12.1",
130
+ "crypto-js": "^4.2.0",
130
131
  "css-loader": "^7.1.2",
131
132
  "cssnano": "^7.1.0",
132
133
  "dotenv-webpack": "^8.1.1",
133
- "download-npm-package": "^3.1.5",
134
- "esbuild": "0.25.6",
134
+ "download-npm-package": "^3.1.12",
135
+ "esbuild": "0.25.8",
135
136
  "esbuild-loader": "4.3.0",
136
- "eslint": "^9.31.0",
137
- "eslint-config-styleguidejs": "^4.0.22",
137
+ "eslint": "^9.32.0",
138
+ "eslint-config-styleguidejs": "^4.1.2",
138
139
  "execa": "9.6.0",
139
- "expect": "^29.7.0",
140
+ "expect": "^30.0.5",
141
+ "express": "^5.1.0",
142
+ "graphql-http": "^1.22.4",
140
143
  "exports-loader": "^5.0.0",
141
144
  "favicons-webpack-plugin": "^6.0.1",
142
145
  "file-loader": "^6.2.0",
143
146
  "find-file-up": "^2.0.1",
144
147
  "glob": "^11.0.3",
148
+ "global": "^4.4.0",
145
149
  "graphql": "^16.11.0",
146
150
  "graphql-tag": "^2.12.6",
147
151
  "html-loader": "^5.1.0",
148
152
  "html-webpack-plugin": "^5.6.3",
149
153
  "https-browserify": "^1.0.0",
154
+ "image-webpack-loader": "^8.1.0",
150
155
  "imports-loader": "^5.0.0",
151
156
  "jest": "^29.7.0",
152
157
  "jest-circus": "^29.7.0",
@@ -159,8 +164,8 @@
159
164
  "lodash": "^4.17.21",
160
165
  "luxon": "^3.7.1",
161
166
  "net": "^1.0.2",
162
- "npm-check-updates": "^18.0.1",
163
- "openai": "^5.10.1",
167
+ "npm-check-updates": "^18.0.2",
168
+ "openai": "^5.11.0",
164
169
  "ora": "8.2.0",
165
170
  "os-browserify": "^0.3.0",
166
171
  "path-browserify": "^1.0.1",
@@ -179,51 +184,52 @@
179
184
  "postcss-svgo": "7.1.0",
180
185
  "postcss-url": "10.1.3",
181
186
  "process": "^0.11.10",
182
- "react": "^19.1.0",
183
- "react-dom": "^19.1.0",
187
+ "randombytes": "^2.1.0",
188
+ "react": "^19.1.1",
189
+ "react-dom": "^19.1.1",
184
190
  "regenerator-runtime": "^0.14.1",
185
191
  "resolve": "^1.22.10",
186
192
  "rimraf": "^6.0.1",
187
193
  "semver": "^7.7.2",
194
+ "source-map-loader": "^5.0.0",
188
195
  "speed-measure-webpack-plugin": "^1.5.0",
189
- "static-site-generator-webpack-plugin": "^3.3.0",
190
- "storybook": "^9.0.17",
196
+ "static-site-generator-webpack-plugin": "^3.4.2",
197
+ "storybook": "^9.0.18",
191
198
  "stream-browserify": "^3.0.0",
192
199
  "stream-http": "^3.2.0",
193
200
  "style-loader": "^4.0.0",
194
- "svg-spritemap-webpack-plugin": "^4.7.0",
201
+ "svg-spritemap-webpack-plugin": "^5.0.0",
195
202
  "svgo": "4.0.0",
203
+ "tailwindcss": "^4.1.11",
196
204
  "tls": "^0.0.1",
197
205
  "ts-node": "^10.9.2",
198
206
  "tsconfig-paths-webpack-plugin": "^4.2.0",
199
207
  "typescript": "5.8.3",
208
+ "uncrypto": "^0.1.3",
200
209
  "unicorn-magic": "^0.3.0",
201
210
  "url-loader": "^4.1.1",
202
211
  "util": "^0.12.5",
203
212
  "vm-browserify": "^1.1.2",
204
- "webpack": "5.100.2",
213
+ "webpack": "5.101.0",
205
214
  "webpack-bundle-analyzer": "^4.10.2",
206
215
  "webpack-cli": "^6.0.1",
207
216
  "webpack-merge": "^6.0.1",
208
217
  "webpack-nano": "^1.1.1",
209
- "webpack-plugin-serve": "^1.6.0"
218
+ "webpack-plugin-serve": "^1.6.0",
219
+ "ws": "^8.18.3"
210
220
  },
211
221
  "devDependencies": {
212
222
  "@babel/plugin-transform-react-jsx": "^7.27.1",
213
- "@babel/runtime": "^7.27.6",
214
- "@babel/runtime-corejs3": "^7.28.0",
223
+ "@babel/runtime": "^7.28.2",
224
+ "@babel/runtime-corejs3": "^7.28.2",
225
+ "@types/express": "^5.0.3",
215
226
  "@types/jest": "^29.5.14",
216
- "@types/luxon": "^3.6.2",
217
- "@types/node": "^24.0.14",
227
+ "@types/luxon": "^3.7.1",
228
+ "@types/node": "^24.1.0",
218
229
  "@types/ora": "^3.2.0",
219
- "@types/react": "^19.1.8",
230
+ "@types/react": "^19.1.9",
220
231
  "@types/webpack": "^5.28.5"
221
232
  },
222
- "peerDependencies": {
223
- "@storybook/react": "^9.0.17",
224
- "@storybook/react-webpack5": "^9.0.17",
225
- "storybook": "^9.0.17"
226
- },
227
233
  "resolutions": {
228
234
  "css-loader": "7.1.2"
229
235
  },
package/postcss.config.js CHANGED
@@ -2,7 +2,6 @@
2
2
  * Copyright (c) 2018-Present, Nitrogen Labs, Inc.
3
3
  * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
4
4
  */
5
- import tailwindcss from '@tailwindcss/postcss';
6
5
  import autoprefixer from 'autoprefixer';
7
6
  import cssnano from 'cssnano';
8
7
  import postcssBrowserReporter from 'postcss-browser-reporter';
@@ -12,6 +11,8 @@ import postcssFor from 'postcss-for';
12
11
  import postcssHash from 'postcss-hash';
13
12
  import postcssImport from 'postcss-import';
14
13
  import postcssNesting from 'postcss-nesting';
14
+ import tailwindcss from '@tailwindcss/postcss';
15
+ import tailwindNesting from '@tailwindcss/nesting';
15
16
  import postcssPercentage from 'postcss-percentage';
16
17
  import postcssPresetEnv from 'postcss-preset-env';
17
18
  import postcssSimpleVars from 'postcss-simple-vars';
@@ -21,7 +22,6 @@ import {default as webpack} from 'webpack';
21
22
 
22
23
  const config = {
23
24
  plugins: [
24
- tailwindcss(),
25
25
  postcssImport({addDependencyTo: webpack}),
26
26
  postcssUrl(),
27
27
  postcssFor(),
@@ -35,8 +35,10 @@ const config = {
35
35
  strict: false,
36
36
  warnings: false
37
37
  }),
38
- autoprefixer(),
38
+ tailwindNesting(),
39
39
  postcssNesting(),
40
+ tailwindcss(),
41
+ autoprefixer(),
40
42
  postcssFlexbugsFixes(),
41
43
  postcssPresetEnv({
42
44
  browsers: ['last 5 versions'],
@@ -21,7 +21,7 @@
21
21
  "noUnusedLocals": false,
22
22
  "pretty": true,
23
23
  "resolveJsonModule": true,
24
- "outDir": "./dist",
24
+ "outDir": "./lib",
25
25
  "rootDir": "./src",
26
26
  "skipLibCheck": true,
27
27
  "target": "ESNext",
@@ -39,7 +39,7 @@
39
39
  "**/*.integration.*",
40
40
  "**/__tests__/**",
41
41
  "**/__mocks__/**",
42
- "dist",
42
+ "lib",
43
43
  "node_modules",
44
44
  "jest.config.mjs"
45
45
  ]