vk-typescript-cli 1.0.0 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vk-typescript-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI for creating Syncfusion starter projects",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -95,10 +95,9 @@ export async function createNewCommand(framework, appName, options = {}) {
95
95
  logger.info(`Supported build tools: ${validBuildTools.join(', ')}`);
96
96
  process.exit(1);
97
97
  }
98
- } else if (normalizedFramework === 'typescript') {
99
- // TypeScript platform has no separate build-tool option (Vite is hard-wired).
100
- buildTool = null;
101
98
  }
99
+ // For the TypeScript platform, buildTool is forced to null below via
100
+ // `mergedOptions.buildTool` — do not reassign the `const buildTool` here.
102
101
 
103
102
  // Validate styling
104
103
  if (!['css', 'scss'].includes(styling)) {
@@ -1,7 +1,7 @@
1
- import { Spreadsheet, ColumnModel, RowModel, CellModel } from '@syncfusion/ej2-spreadsheet';
1
+ import { Spreadsheet } from '@syncfusion/ej2-spreadsheet';
2
2
 
3
3
  // Defines the data to be displayed in the Spreadsheet.
4
- const data: object[] = [
4
+ const data: { Item: string; Qty: number; Price: number; Total: number }[] = [
5
5
  { Item: 'Apple', Qty: 10, Price: 1.50, Total: 15.00 },
6
6
  { Item: 'Banana', Qty: 20, Price: 0.75, Total: 15.00 },
7
7
  { Item: 'Orange', Qty: 15, Price: 2.00, Total: 30.00 },
@@ -9,26 +9,27 @@ const data: object[] = [
9
9
  { Item: 'Mango', Qty: 5, Price: 4.50, Total: 22.50 }
10
10
  ];
11
11
 
12
+ const headerRow = [
13
+ { cells: [{ value: 'Item' }, { value: 'Qty' }, { value: 'Price' }, { value: 'Total' }] }
14
+ ];
15
+
16
+ const dataRows = data.map((row, index) => {
17
+ const rowIndex = index + 2; // 1-based, header is row 1.
18
+ return {
19
+ cells: [
20
+ { value: row.Item },
21
+ { value: row.Qty },
22
+ { value: row.Price, format: '$#,##0.00' },
23
+ { formula: `=B${rowIndex}*C${rowIndex}`, format: '$#,##0.00' }
24
+ ]
25
+ };
26
+ });
27
+
12
28
  let spreadsheet: Spreadsheet = new Spreadsheet({
13
29
  sheets: [
14
30
  {
15
31
  name: 'Inventory',
16
- rows: [
17
- {
18
- index: 1,
19
- cells: [
20
- { value: 'Item' }, { value: 'Qty' }, { value: 'Price' }, { value: 'Total' }
21
- ]
22
- },
23
- ...data.map((row: any) => ({
24
- cells: [
25
- { value: row.Item },
26
- { value: row.Qty },
27
- { value: row.Price, format: '$#,##0.00' },
28
- { formula: `=B${data.indexOf(row) + 2}*C${data.indexOf(row) + 2}`, format: '$#,##0.00' }
29
- ]
30
- }))
31
- ],
32
+ rows: [...headerRow, ...dataRows],
32
33
  columns: [
33
34
  { width: 120 }, { width: 80 }, { width: 100 }, { width: 100 }
34
35
  ]
package/smoke-test.mjs DELETED
@@ -1,38 +0,0 @@
1
- // Smoke test - verify the typescript framework integration is wired up correctly.
2
- import { TEMPLATES, TEMPLATE_PACKAGES } from './src/constants.js';
3
-
4
- const components = [
5
- 'grid', 'chart', 'scheduler', 'gantt', 'file-manager',
6
- 'diagram', 'rich-text-editor', 'pdf-viewer',
7
- 'docx-editor', 'spreadsheet-editor'
8
- ];
9
-
10
- let pass = 0, fail = 0;
11
- const errors = [];
12
-
13
- for (const c of components) {
14
- const ts = TEMPLATE_PACKAGES[c]?.typescript;
15
- if (!ts || !Array.isArray(ts) || ts.length === 0) {
16
- fail++;
17
- errors.push(`✗ ${c}: no typescript package mapping`);
18
- } else {
19
- pass++;
20
- console.log(`✓ ${c}: ${ts.join(', ')}`);
21
- }
22
- }
23
-
24
- // Verify empty template
25
- const empty = TEMPLATE_PACKAGES.empty?.typescript;
26
- if (empty) {
27
- console.log(`✓ empty: ${empty.join(', ')}`);
28
- pass++;
29
- } else {
30
- fail++;
31
- errors.push('✗ empty: no typescript package mapping');
32
- }
33
-
34
- console.log(`\nResults: ${pass} pass, ${fail} fail`);
35
- if (fail) {
36
- console.error(errors.join('\n'));
37
- process.exit(1);
38
- }