@citolab/tspci 2.5.30-beta.9 → 2.6.2
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/CHANGELOG.md +51 -0
- package/package.json +2 -2
- package/src/cli.js +19 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,57 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.6.2](/compare/v2.6.1...v2.6.2) (2025-02-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @citolab/tspci
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.6.1](/compare/v2.6.0...v2.6.1) (2025-02-04)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @citolab/tspci
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [2.6.0](/compare/v2.5.30-beta.11...v2.6.0) (2025-02-04)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @citolab/tspci
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [2.6.0](/compare/v2.5.30-beta.11...v2.6.0) (2025-02-04)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @citolab/tspci
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [2.5.30-beta.11](/compare/v2.5.30-beta.10...v2.5.30-beta.11) (2025-02-04)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* add tailwindcss to devDependencies and set version based on @tailwindcss/postcss 907b541
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [2.5.30-beta.10](/compare/v2.5.30-beta.9...v2.5.30-beta.10) (2025-02-04)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package @citolab/tspci
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
6
57
|
## [2.5.30-beta.9](/compare/v2.5.30-beta.8...v2.5.30-beta.9) (2025-02-04)
|
|
7
58
|
|
|
8
59
|
**Note:** Version bump only for package @citolab/tspci
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/tspci",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "an opiniated typescript ims-pci builder with tao integration",
|
|
5
5
|
"author": "patrick <patrick.deklein@cito.nl>",
|
|
6
6
|
"repository": "@citolab/tspci",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"resolutions": {
|
|
52
52
|
"chokidar": "^4.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "750b04d92da7e806cbfafeb84dcb5bedb719536d"
|
|
55
55
|
}
|
package/src/cli.js
CHANGED
|
@@ -289,22 +289,38 @@ const run = async () => {
|
|
|
289
289
|
|
|
290
290
|
// read postcss.config.js
|
|
291
291
|
const postcssConfig = path.resolve(cliPath, "./../preset/tailwind/postcss.config.js");
|
|
292
|
+
// get all plugin names
|
|
292
293
|
const postcssConfigContent = fs.readFileSync(postcssConfig, "utf8");
|
|
293
294
|
// get all plugin names
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
// Match require statements that use either single or double quotes
|
|
296
|
+
const pluginMatches = postcssConfigContent.match(/require\(["']([^"']+)["']\)/g);
|
|
297
|
+
let pluginNames = [];
|
|
298
|
+
if (pluginMatches) {
|
|
299
|
+
pluginNames = pluginMatches.map((plugin) => plugin.replace(/require\(["']([^"']+)["']\)/, "$1"));
|
|
300
|
+
} else {
|
|
301
|
+
console.log("No PostCSS plugins found.");
|
|
302
|
+
}
|
|
297
303
|
const packageJsonCli = path.resolve(cliPath, "./../package.json");
|
|
298
304
|
const packageJsonCliContent = fs.readFileSync(packageJsonCli, "utf8");
|
|
299
305
|
const packageJsonCliContentJson = JSON.parse(packageJsonCliContent);
|
|
300
306
|
// add all plugins to package.json and map the version to the version in tspci package.json
|
|
307
|
+
let version = "latest";
|
|
301
308
|
for (const pluginName of pluginNames) {
|
|
302
309
|
const pluginVersion = packageJsonCliContentJson.dependencies[pluginName];
|
|
310
|
+
if (pluginName === "@tailwindcss/postcss") {
|
|
311
|
+
version = pluginVersion.toString();
|
|
312
|
+
}
|
|
303
313
|
packageJsonContentJson.devDependencies = {
|
|
304
314
|
...packageJsonContentJson.devDependencies,
|
|
305
315
|
[pluginName]: pluginVersion,
|
|
306
316
|
};
|
|
307
317
|
}
|
|
318
|
+
|
|
319
|
+
// add tailwindcss itself to the devDependencies
|
|
320
|
+
packageJsonContentJson.devDependencies = {
|
|
321
|
+
...packageJsonContentJson.devDependencies,
|
|
322
|
+
tailwindcss: version,
|
|
323
|
+
};
|
|
308
324
|
const newPackageJsonContent = JSON.stringify(packageJsonContentJson, null, 2);
|
|
309
325
|
fs.writeFileSync(packageJson, newPackageJsonContent);
|
|
310
326
|
// copy tailwind config file
|