@advantacode/brander 0.1.4 → 0.1.5
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/generate-tokens.js +4 -0
- package/dist/setup.js +3 -3
- package/package.json +2 -2
package/dist/generate-tokens.js
CHANGED
|
@@ -77,6 +77,10 @@ async function loadBrandConfig() {
|
|
|
77
77
|
return {};
|
|
78
78
|
}
|
|
79
79
|
try {
|
|
80
|
+
// enable TS config loading if needed
|
|
81
|
+
if (configPath.endsWith(".ts") || configPath.endsWith(".mts") || configPath.endsWith(".cts")) {
|
|
82
|
+
await import("tsx/esm");
|
|
83
|
+
}
|
|
80
84
|
const importedConfig = await import(pathToFileURL(configPath).href);
|
|
81
85
|
return parseBrandConfig(importedConfig.default ?? importedConfig, configPath);
|
|
82
86
|
}
|
package/dist/setup.js
CHANGED
|
@@ -43,12 +43,12 @@ export async function setupProject(options) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function ensureBrandConfig() {
|
|
46
|
-
const configPath = path.resolve(process.cwd(), "brand.config.
|
|
46
|
+
const configPath = path.resolve(process.cwd(), "brand.config.js");
|
|
47
47
|
if (fs.existsSync(configPath)) {
|
|
48
|
-
return { message: "Kept existing brand.config.
|
|
48
|
+
return { message: "Kept existing brand.config.js." };
|
|
49
49
|
}
|
|
50
50
|
fs.writeFileSync(configPath, getDefaultBrandConfigTemplate());
|
|
51
|
-
return { message: "Created brand.config.
|
|
51
|
+
return { message: "Created brand.config.js." };
|
|
52
52
|
}
|
|
53
53
|
function ensurePackageScript(scriptName, command) {
|
|
54
54
|
const packageJsonPath = path.resolve(process.cwd(), "package.json");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@advantacode/brander",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "AdvantaCode Design System Brand Generator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"culori": "^4.0.2",
|
|
57
57
|
"dotenv": "^17.3.1",
|
|
58
|
-
"tsx": "^4.
|
|
58
|
+
"tsx": "^4.21.0"
|
|
59
59
|
}
|
|
60
60
|
}
|