create-bestax 2.0.1 → 2.1.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EAG/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AACpD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,kBAAkB,QAAsB,CAAC;AAEtD,eAAO,MAAM,QAAQ;;;;;wCAMQ,MAAM;uCAEP,MAAM;sCACP,MAAM;4CAEA,MAAM;;;;CAI7B,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;CAKV,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,cAAc,EAAE,WAAW,EAyCvC,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,WAAW,EAuCtC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,EAAE,QAAQ,EAG/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AACpD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,kBAAkB,QAAsB,CAAC;AAEtD,eAAO,MAAM,QAAQ;;;;;wCAMQ,MAAM;uCAEP,MAAM;sCACP,MAAM;4CAEA,MAAM;;;;CAI7B,CAAC;AAEX,eAAO,MAAM,OAAO;;;;;CAKV,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,cAAc,EAAE,WAAW,EAyCvC,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,WAAW,EA0CtC,CAAC"}
package/dist/constants.js CHANGED
@@ -73,14 +73,14 @@ export const BULMA_FLAVORS = [
73
73
  display: 'Complete (Recommended)',
74
74
  description: 'Full Bulma CSS with all components and helpers',
75
75
  color: chalk.green,
76
- importStatement: "import 'bulma/css/bulma.min.css';",
76
+ importStatement: "import '@allxsmith/bestax-bulma/bestax.css';",
77
77
  },
78
78
  {
79
79
  name: 'prefixed',
80
80
  display: 'Prefixed',
81
81
  description: 'All classes prefixed with "bulma-" to avoid conflicts',
82
82
  color: chalk.blue,
83
- importStatement: "import 'bulma/css/versions/bulma-prefixed.min.css';",
83
+ importStatement: "import 'bulma/css/versions/bulma-prefixed.min.css';\nimport '@allxsmith/bestax-bulma/extras.css';",
84
84
  needsPrefix: true,
85
85
  },
86
86
  {
@@ -88,14 +88,14 @@ export const BULMA_FLAVORS = [
88
88
  display: 'No Helpers',
89
89
  description: 'Core components only, no utility classes',
90
90
  color: chalk.yellow,
91
- importStatement: "import 'bulma/css/versions/bulma-no-helpers.min.css';",
91
+ importStatement: "import 'bulma/css/versions/bulma-no-helpers.min.css';\nimport '@allxsmith/bestax-bulma/extras.css';",
92
92
  },
93
93
  {
94
94
  name: 'no-helpers-prefixed',
95
95
  display: 'No Helpers, Prefixed',
96
96
  description: 'Core components only with "bulma-" prefix',
97
97
  color: chalk.magenta,
98
- importStatement: "import 'bulma/css/versions/bulma-no-helpers-prefixed.min.css';",
98
+ importStatement: "import 'bulma/css/versions/bulma-no-helpers-prefixed.min.css';\nimport '@allxsmith/bestax-bulma/extras.css';",
99
99
  needsPrefix: true,
100
100
  },
101
101
  {
@@ -103,6 +103,6 @@ export const BULMA_FLAVORS = [
103
103
  display: 'No Dark Mode',
104
104
  description: 'Light mode only, smaller bundle size',
105
105
  color: chalk.cyan,
106
- importStatement: "import 'bulma/css/versions/bulma-no-dark-mode.min.css';",
106
+ importStatement: "import 'bulma/css/versions/bulma-no-dark-mode.min.css';\nimport '@allxsmith/bestax-bulma/extras.css';",
107
107
  },
108
108
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"project-creator.d.ts","source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O,CAAC,IAAI,CAAC;IA2IV,mBAAmB,CACvB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAwEV,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAwHvE"}
@@ -56,13 +56,17 @@ export class ProjectCreator {
56
56
  const mainFilePath = path.join(targetPath, 'src', mainFileName);
57
57
  if (fs.existsSync(mainFilePath)) {
58
58
  let content = await fs.readFile(mainFilePath, 'utf8');
59
- // Replace the default Bulma import with the selected flavor
60
- const bulmaImportRegex = /import\s+['"]bulma\/css\/bulma\.min\.css['"]\s*;?/;
61
- if (bulmaImportRegex.test(content)) {
62
- content = content.replace(bulmaImportRegex, flavor.importStatement);
59
+ // Replace the default bestax CSS import with the selected flavor
60
+ const bestaxImportRegex = /\/\/.*\n\s*import\s+['"]@allxsmith\/bestax-bulma\/bestax\.css['"]\s*;?/;
61
+ const bestaxImportSimpleRegex = /import\s+['"]@allxsmith\/bestax-bulma\/bestax\.css['"]\s*;?/;
62
+ if (bestaxImportRegex.test(content)) {
63
+ content = content.replace(bestaxImportRegex, '// Import CSS\n' + flavor.importStatement);
64
+ }
65
+ else if (bestaxImportSimpleRegex.test(content)) {
66
+ content = content.replace(bestaxImportSimpleRegex, flavor.importStatement);
63
67
  }
64
68
  else {
65
- // If no Bulma import found, add it after React import
69
+ // If no bestax import found, add it after React import
66
70
  const reactImportMatch = content.match(/import\s+.*\s+from\s+['"]react['"]/);
67
71
  if (reactImportMatch) {
68
72
  const insertPosition = reactImportMatch.index + reactImportMatch[0].length;
@@ -155,14 +159,14 @@ export class ProjectCreator {
155
159
  const mainFilePath = path.join(targetPath, 'src', mainFileName);
156
160
  if (fs.existsSync(mainFilePath)) {
157
161
  let content = await fs.readFile(mainFilePath, 'utf8');
158
- // Add the icon library import before the Bulma CSS import
159
- const bulmaImportMatch = content.match(/import\s+['"]bulma\/css\/.*?['"]/);
160
- if (bulmaImportMatch) {
161
- const insertPosition = bulmaImportMatch.index;
162
+ // Add the icon library import after the CSS imports
163
+ const cssImportMatch = content.match(/import\s+['"](?:@allxsmith\/bestax-bulma\/(?:bestax|extras)\.css|bulma\/css\/.*?)['"]\s*;?/);
164
+ if (cssImportMatch) {
165
+ const insertPosition = cssImportMatch.index + cssImportMatch[0].length;
162
166
  content =
163
167
  content.slice(0, insertPosition) +
164
- library.importStatement +
165
168
  '\n' +
169
+ library.importStatement +
166
170
  content.slice(insertPosition);
167
171
  await fs.writeFile(mainFilePath, content);
168
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bestax",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "Create a new bestax-bulma project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "test:e2e:headed": "playwright test --config=e2e/playwright.config.ts --headed",
22
22
  "test:e2e:update": "playwright test --config=e2e/playwright.config.ts --update-snapshots",
23
23
  "test:e2e:report": "playwright show-report e2e/playwright-report",
24
- "lint": "eslint src e2e/tests e2e/utils --ext .ts,.tsx",
24
+ "lint": "eslint src e2e/tests e2e/utils",
25
25
  "typecheck": "tsc --noEmit",
26
26
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
27
27
  "format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
@@ -51,24 +51,23 @@
51
51
  "url": "https://github.com/allxsmith/bestax/issues"
52
52
  },
53
53
  "dependencies": {
54
- "@allxsmith/bestax-bulma": "^2.6.1",
55
54
  "chalk": "^5.6.2",
56
- "commander": "^14.0.2",
57
- "figures": "^3.2.0",
55
+ "commander": "^15.0.0",
56
+ "figures": "^6.1.0",
58
57
  "fs-extra": "^11.2.0",
59
58
  "prompts": "^2.4.2"
60
59
  },
61
60
  "devDependencies": {
62
61
  "@playwright/test": "^1.57.0",
63
62
  "@types/fs-extra": "^11.0.4",
64
- "@types/jest": "^29.5.12",
65
- "@types/node": "^20.11.20",
63
+ "@types/jest": "^30.0.0",
64
+ "@types/node": "^25.9.3",
66
65
  "@types/prompts": "^2.4.9",
67
66
  "@types/wait-on": "^5.3.4",
68
67
  "jest": "^30.2.0",
69
68
  "ts-jest": "^29.4.6",
70
- "typescript": "^5.9.3",
71
- "wait-on": "^8.0.1"
69
+ "typescript": "^6.0.3",
70
+ "wait-on": "^9.0.10"
72
71
  },
73
72
  "publishConfig": {
74
73
  "access": "public"
@@ -10,8 +10,7 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@allxsmith/bestax-bulma": "^2.6.2",
14
- "bulma": "^1.0.4",
13
+ "@allxsmith/bestax-bulma": "^4.0.0",
15
14
  "react": "^19.2.3",
16
15
  "react-dom": "^19.2.3"
17
16
  },
@@ -2,8 +2,8 @@ import { StrictMode } from 'react';
2
2
  import { createRoot } from 'react-dom/client';
3
3
  import App from './App.jsx';
4
4
 
5
- // Import Bulma CSS
6
- import 'bulma/css/bulma.min.css';
5
+ // Import Bestax CSS (Bulma + extras)
6
+ import '@allxsmith/bestax-bulma/bestax.css';
7
7
  import './index.css';
8
8
 
9
9
  createRoot(document.getElementById('root')).render(
@@ -10,8 +10,7 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@allxsmith/bestax-bulma": "^2.6.2",
14
- "bulma": "^1.0.4",
13
+ "@allxsmith/bestax-bulma": "^4.0.0",
15
14
  "react": "^19.2.3",
16
15
  "react-dom": "^19.2.3"
17
16
  },
@@ -2,8 +2,8 @@ import { StrictMode } from 'react';
2
2
  import { createRoot } from 'react-dom/client';
3
3
  import App from './App.tsx';
4
4
 
5
- // Import Bulma CSS
6
- import 'bulma/css/bulma.min.css';
5
+ // Import Bestax CSS (Bulma + extras)
6
+ import '@allxsmith/bestax-bulma/bestax.css';
7
7
  import './index.css';
8
8
 
9
9
  createRoot(document.getElementById('root')!).render(