vk-typescript-cli 1.0.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 (119) hide show
  1. package/Jenkinsfile +48 -0
  2. package/README.md +300 -0
  3. package/bin/sf.js +438 -0
  4. package/eslint.config.js +90 -0
  5. package/gulpfile.js +157 -0
  6. package/lib/commander.js +3370 -0
  7. package/lib/inquirer-prompts.js +2038 -0
  8. package/license +13 -0
  9. package/package.json +43 -0
  10. package/smoke-test.mjs +38 -0
  11. package/src/commands/add.js +276 -0
  12. package/src/commands/info.js +82 -0
  13. package/src/commands/interactive.js +493 -0
  14. package/src/commands/mcp.js +135 -0
  15. package/src/commands/new.js +264 -0
  16. package/src/commands/skills.js +42 -0
  17. package/src/commands/theme.js +200 -0
  18. package/src/commands/upgrade.js +219 -0
  19. package/src/constants.js +161 -0
  20. package/src/generators/angular.js +878 -0
  21. package/src/generators/nextjs.js +817 -0
  22. package/src/generators/react.js +769 -0
  23. package/src/generators/typescript.js +258 -0
  24. package/src/generators/vue.js +800 -0
  25. package/src/templates/angular/chart.component.html +23 -0
  26. package/src/templates/angular/chart.component.ts +172 -0
  27. package/src/templates/angular/diagram.component.html +13 -0
  28. package/src/templates/angular/diagram.component.ts +224 -0
  29. package/src/templates/angular/docx-editor.component.html +18 -0
  30. package/src/templates/angular/docx-editor.component.ts +37 -0
  31. package/src/templates/angular/filemanager.component.html +4 -0
  32. package/src/templates/angular/filemanager.component.ts +47 -0
  33. package/src/templates/angular/gantt.component.html +32 -0
  34. package/src/templates/angular/gantt.component.ts +95 -0
  35. package/src/templates/angular/grid.component.html +12 -0
  36. package/src/templates/angular/grid.component.ts +58 -0
  37. package/src/templates/angular/pdf-viewer.component.html +9 -0
  38. package/src/templates/angular/pdf-viewer.component.ts +48 -0
  39. package/src/templates/angular/rte.component.html +7 -0
  40. package/src/templates/angular/rte.component.ts +13 -0
  41. package/src/templates/angular/scheduler.component.html +17 -0
  42. package/src/templates/angular/scheduler.component.ts +75 -0
  43. package/src/templates/angular/spreadsheet-editor.component.html +42 -0
  44. package/src/templates/angular/spreadsheet-editor.component.ts +61 -0
  45. package/src/templates/chart-template.js +20 -0
  46. package/src/templates/diagram-template.js +26 -0
  47. package/src/templates/docx-template.js +20 -0
  48. package/src/templates/filemanager-template.js +20 -0
  49. package/src/templates/gantt-template.js +20 -0
  50. package/src/templates/grid-template.js +20 -0
  51. package/src/templates/pdfviewer-template.js +20 -0
  52. package/src/templates/react/Chart.jsx +81 -0
  53. package/src/templates/react/Chart.tsx +81 -0
  54. package/src/templates/react/DOCXEditor.jsx +37 -0
  55. package/src/templates/react/DOCXEditor.tsx +37 -0
  56. package/src/templates/react/Diagram.jsx +192 -0
  57. package/src/templates/react/Diagram.tsx +195 -0
  58. package/src/templates/react/FileManager.jsx +13 -0
  59. package/src/templates/react/FileManager.tsx +13 -0
  60. package/src/templates/react/Gantt.jsx +89 -0
  61. package/src/templates/react/Gantt.tsx +89 -0
  62. package/src/templates/react/Grid.jsx +45 -0
  63. package/src/templates/react/Grid.tsx +45 -0
  64. package/src/templates/react/PDFViewer.jsx +16 -0
  65. package/src/templates/react/PDFViewer.tsx +16 -0
  66. package/src/templates/react/RTE.jsx +14 -0
  67. package/src/templates/react/RTE.tsx +14 -0
  68. package/src/templates/react/Scheduler.jsx +55 -0
  69. package/src/templates/react/Scheduler.tsx +55 -0
  70. package/src/templates/react/SpreadsheetEditor.jsx +96 -0
  71. package/src/templates/react/SpreadsheetEditor.tsx +98 -0
  72. package/src/templates/rte-template.js +26 -0
  73. package/src/templates/scheduler-template.js +20 -0
  74. package/src/templates/spreadheet-template.js +20 -0
  75. package/src/templates/typescript/RTE.ts +33 -0
  76. package/src/templates/typescript/SpreadsheetEditor.ts +39 -0
  77. package/src/templates/typescript/chart.ts +37 -0
  78. package/src/templates/typescript/diagram.ts +30 -0
  79. package/src/templates/typescript/docxeditor.ts +30 -0
  80. package/src/templates/typescript/filemanager.ts +41 -0
  81. package/src/templates/typescript/gantt.ts +88 -0
  82. package/src/templates/typescript/grid.ts +30 -0
  83. package/src/templates/typescript/pdfviewer.ts +8 -0
  84. package/src/templates/typescript/scheduler.ts +39 -0
  85. package/src/templates/vue/Chart.vue +257 -0
  86. package/src/templates/vue/ChartView.vue +7 -0
  87. package/src/templates/vue/DOCXEditor.vue +61 -0
  88. package/src/templates/vue/DOCXEditorView.vue +7 -0
  89. package/src/templates/vue/Diagram.vue +245 -0
  90. package/src/templates/vue/DiagramView.vue +7 -0
  91. package/src/templates/vue/FileManager.vue +58 -0
  92. package/src/templates/vue/FileManagerView.vue +7 -0
  93. package/src/templates/vue/Gantt.vue +129 -0
  94. package/src/templates/vue/GanttView.vue +7 -0
  95. package/src/templates/vue/Grid.vue +141 -0
  96. package/src/templates/vue/GridView.vue +7 -0
  97. package/src/templates/vue/PDFViewer.vue +58 -0
  98. package/src/templates/vue/PDFViewerView.vue +7 -0
  99. package/src/templates/vue/RTE.vue +27 -0
  100. package/src/templates/vue/RTEView.vue +7 -0
  101. package/src/templates/vue/Scheduler.vue +94 -0
  102. package/src/templates/vue/SchedulerView.vue +7 -0
  103. package/src/templates/vue/SpreadsheetEditor.vue +115 -0
  104. package/src/templates/vue/SpreadsheetEditorView.vue +7 -0
  105. package/src/utils/ansi-colors.js +38 -0
  106. package/src/utils/banner.js +179 -0
  107. package/src/utils/common.js +64 -0
  108. package/src/utils/config-generator.js +73 -0
  109. package/src/utils/folder-structure.js +26 -0
  110. package/src/utils/logger.js +19 -0
  111. package/src/utils/mcp-generator.js +122 -0
  112. package/src/utils/package-manager.js +128 -0
  113. package/src/utils/project-bootstrap.js +98 -0
  114. package/src/utils/project-detector.js +195 -0
  115. package/src/utils/prompt-utils.js +29 -0
  116. package/src/utils/run-command.js +110 -0
  117. package/src/utils/skills-installer.js +69 -0
  118. package/src/utils/template-file.js +35 -0
  119. package/src/utils/theme-loader.js +47 -0
package/Jenkinsfile ADDED
@@ -0,0 +1,48 @@
1
+ #!groovy
2
+
3
+ node('EJ2Node20') {
4
+ timeout(time:60){
5
+ try {
6
+ deleteDir()
7
+
8
+ stage('Import') {
9
+ git url: 'https://gitea.syncfusion.com/essential-studio/ej2-groovy-scripts.git', branch: 'master', credentialsId: env.GiteaCredentialID;
10
+ shared = load 'src/shared.groovy'
11
+ }
12
+
13
+ stage('Checkout') {
14
+ checkout scm
15
+ }
16
+
17
+ stage('Validation') {
18
+ shared.getProjectDetails()
19
+ shared.gitlabCommitStatus('running')
20
+ }
21
+
22
+ if (shared.checkCommitMessage()) {
23
+ stage('Install') {
24
+ sh 'node --version'
25
+ sh 'npm --version'
26
+ sh 'npm install'
27
+ }
28
+
29
+ stage('Test') {
30
+ sh 'npm run test'
31
+ }
32
+
33
+ stage('Publish') {
34
+ sh 'npm run ci-report'
35
+ if (shared.isProtectedBranch()){
36
+ sh 'npm run publish'
37
+ }
38
+ }
39
+ }
40
+
41
+ shared.gitlabCommitStatus('success')
42
+ deleteDir()
43
+ }
44
+ catch(Exception e) {
45
+ shared.throwError(e)
46
+ }
47
+ }
48
+ }
package/README.md ADDED
@@ -0,0 +1,300 @@
1
+ # Syncfusion<sup>®</sup> CLI
2
+
3
+ The Syncfusion<sup>®</sup> CLI is a command-line tool for creating and managing React, Angular, and Vue applications with Syncfusion<sup>®</sup> components.
4
+
5
+ It helps developers quickly scaffold applications with Syncfusion<sup>®</sup> components, add components to existing projects, switch themes, configure MCP, install Syncfusion<sup>®</sup> components skills and view project information.
6
+
7
+ ## Key Features
8
+
9
+ - Create React, Angular, and Vue applications with Syncfusion<sup>®</sup> components.
10
+ - Supports JavaScript and TypeScript project creation.
11
+ - Provides ready-to-use templates such as Empty, Grid, Chart, Scheduler, Gantt, Diagram, and Rich Text Editor.
12
+ - Supports built-in themes such as Material 3, Fluent 2, Bootstrap 5.3, and Tailwind 3.
13
+ - Supports CSS and SCSS styling options.
14
+ - Add Syncfusion<sup>®</sup> components to an existing project.
15
+ - Configure Syncfusion<sup>®</sup> MCP server for supported editors.
16
+ - Install Syncfusion<sup>®</sup> component skills.
17
+ - View project and environment information.
18
+
19
+ ## Installation
20
+
21
+ Install the Syncfusion<sup>®</sup> CLI globally using npm:
22
+
23
+ ```bash
24
+ npm install -g @syncfusion/syncfusion-cli
25
+ ```
26
+
27
+ After installation, verify the installed CLI version:
28
+
29
+ ```bash
30
+ sf --version
31
+ ```
32
+
33
+ To view all available CLI commands:
34
+
35
+ ```bash
36
+ sf --help
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ The basic command format is:
42
+
43
+ ```bash
44
+ sf <command> [arguments] [options]
45
+ ```
46
+
47
+ Example:
48
+
49
+ ```bash
50
+ sf new my-app --framework react
51
+ ```
52
+
53
+ This command creates a new Syncfusion<sup>®</sup> application using the default configuration.
54
+
55
+ ## Interactive Mode
56
+
57
+ Interactive mode allows users to create and configure a Syncfusion<sup>®</sup> application by answering prompts in the terminal.
58
+
59
+ Run the CLI without arguments to start interactive mode:
60
+
61
+ ```bash
62
+ sf
63
+ ```
64
+
65
+ Interactive mode guides the user through project creation step by step. It is useful for first-time users because they do not need to remember all command options.
66
+
67
+ ### Interactive Mode Options
68
+
69
+ Interactive mode provides a guided menu to perform common Syncfusion<sup>®</sup> CLI actions without typing full commands.
70
+
71
+ - **Create a new project** - Creates a React, Angular, or Vue application with Syncfusion<sup>®</sup> components.
72
+ - **Add component** - Adds a Syncfusion<sup>®</sup> component to an existing project.
73
+ - **Switch theme** - Applies or changes the Syncfusion<sup>®</sup> theme in the current project.
74
+ - **Show project info** - Displays environment and project details.
75
+ - **Setup MCP** - Configures Syncfusion<sup>®</sup> MCP for a supported editor.
76
+ - **Install skills** - Installs Syncfusion<sup>®</sup> component skills for AI-assisted development.
77
+ - **View help** - Shows CLI commands, options, and usage information.
78
+ - **Exit** - Closes the interactive CLI prompt.
79
+
80
+ Example:
81
+
82
+ ```bash
83
+ ──────────────────────────────────────────────────────────────
84
+ Syncfusion CLI v1.0.1
85
+ ──────────────────────────────────────────────────────────────
86
+
87
+ ? What would you like to do? (Use arrow keys)
88
+
89
+ 📦 PROJECT MANAGEMENT
90
+ > Create a new project sf new
91
+ Add component to an existing project sf add
92
+ Add theme to an existing project sf theme switch
93
+ Show environment & project information sf info
94
+
95
+ 🤖 AI & SKILLS
96
+ Setup Model Context Protocol (MCP) sf mcp init
97
+ Add component skills to AI Agent sf skills install
98
+
99
+ ℹ️ HELP & EXIT
100
+ View help sf --help
101
+ Exit Ctrl + C
102
+ ```
103
+
104
+ ## Non-Interactive Mode
105
+
106
+ Non-interactive mode allows users to create and configure projects directly using command-line options.
107
+
108
+ This mode is useful for experienced users, automation scripts, and CI/CD workflows.
109
+
110
+ The Syncfusion<sup>®</sup> CLI supports flag-based non-interactive usage. In flag mode, values are passed using named options, which makes the command easier to read and avoids mistakes caused by argument order.
111
+
112
+ ### Syntax
113
+
114
+ ```bash
115
+ sf new <project-name> --framework <framework> --build-tool <buildTool> --type <type> --template <template> --theme <theme> --styling <styling> --mcp <editor> --skills
116
+ ```
117
+
118
+ ### React Example
119
+
120
+ ```bash
121
+ sf new my-react-app --framework react --type ts --template grid --theme fluent2
122
+ ```
123
+
124
+ ### React with Next.js Example
125
+
126
+ ```bash
127
+ sf new my-next-app --framework react --build-tool nextjs --type ts --template chart --theme fluent2
128
+ ```
129
+
130
+ ### Angular Example
131
+
132
+ ```bash
133
+ sf new my-angular-app --framework angular --type ts --template rich-text-editor --theme fluent2
134
+ ```
135
+
136
+ ### Vue Example
137
+
138
+ ```bash
139
+ sf new my-vue-app --framework vue --type ts --template file-manager --theme tailwind3 --styling scss
140
+ ```
141
+
142
+ > Note: The `--build-tool` option is supported only for React projects. Do not use `--build-tool` with Angular or Vue.
143
+
144
+ ## Commands
145
+
146
+ ### Create a New Project
147
+
148
+ Creates a new application with Syncfusion<sup>®</sup> components.
149
+
150
+ ```bash
151
+ sf new <appName>
152
+ ```
153
+
154
+ Example:
155
+
156
+ ```bash
157
+ sf new my-app --framework react --type ts --template grid --theme material3 --styling css
158
+ ```
159
+
160
+ ### Add a Component
161
+
162
+ Adds a Syncfusion<sup>®</sup> component to an existing project.
163
+
164
+ ```bash
165
+ sf add <component>
166
+ ```
167
+
168
+ Examples:
169
+
170
+ ```bash
171
+ sf add grid
172
+ sf add chart
173
+ sf add scheduler
174
+ sf add gantt
175
+ sf add diagram
176
+ sf add rich-text-editor
177
+ sf add file-manager
178
+ sf add pdf-viewer
179
+ sf add docx-editor
180
+ sf add spreadsheet-editor
181
+ ```
182
+
183
+ ### Configure Syncfusion MCP
184
+
185
+ Configures the Syncfusion<sup>®</sup> MCP server in an existing project.
186
+
187
+ ```bash
188
+ sf mcp init <editor>
189
+ ```
190
+
191
+ Example:
192
+
193
+ ```bash
194
+ sf mcp init vs-code
195
+ ```
196
+
197
+ ### Install Syncfusion<sup>®</sup> Skills
198
+
199
+ Installs Syncfusion<sup>®</sup> skills in an existing project.
200
+
201
+ ```bash
202
+ sf skills install
203
+ ```
204
+
205
+ ### Switch Theme
206
+
207
+ Switches the theme in an existing Syncfusion<sup>®</sup> project.
208
+
209
+ ```bash
210
+ sf theme switch <themeName>
211
+ ```
212
+
213
+ Example:
214
+
215
+ ```bash
216
+ sf theme switch tailwind3
217
+ ```
218
+
219
+ ### Show Project Information
220
+
221
+ Displays project and environment information.
222
+
223
+ ```bash
224
+ sf info
225
+ ```
226
+
227
+ ## Available Options
228
+
229
+ | Option | Description | Supported Values | Example |
230
+ | --- | --- | --- | --- |
231
+ | `<appName>` | Specifies the application name. | Any valid application name | `sf new my-app` |
232
+ | `--framework <framework>` | Specifies the framework for the application. | `react`, `angular`, `vue` | `sf new my-app --framework react` |
233
+ | `--build-tool <buildTool>` | Specifies the build tool for React applications. This option is supported only for React projects. | `vite`, `nextjs` | `sf new my-app --framework react --build-tool nextjs` |
234
+ | `--type <type>` | Specifies the language type for the project. | `js`, `ts` | `sf new my-app --type ts` |
235
+ | `--template <template>` | Specifies the project template. | `empty`, `grid`, `chart`, `scheduler`, `gantt`, `diagram`, `rich-text-editor`, `pdf-viewer`. `docx-editor`, `spreadsheet-editor` | `sf new my-app --template grid` |
236
+ | `--theme <theme>` | Specifies the Syncfusion<sup>®</sup> theme. | `material3`, `fluent2`, `bootstrap5.3`, `tailwind3` | `sf new my-app --theme fluent2` |
237
+ | `--styling <styling>` | Specifies the stylesheet format. | `css`, `scss` | `sf new my-app --styling scss` |
238
+ | `--mcp <editor>` | Configures Syncfusion<sup>®</sup> MCP for the selected editor. | `all`, `vs-code`, `code-studio`, `cursor`, `jetbrains` | `sf new my-app --mcp vs-code` |
239
+ | `--skills` | Installs Syncfusion<sup>®</sup> skills during project creation. | No value required | `sf new my-app --skills` |
240
+
241
+ ## Default Configuration
242
+
243
+ If options are not provided, the CLI uses the following default values:
244
+
245
+ | Setting | Default Value |
246
+ | --- | --- |
247
+ | Framework | `react` |
248
+ | React build tool | `vite` |
249
+ | Language type | `ts` |
250
+ | Template | `empty` |
251
+ | Theme | `material3` |
252
+ | Styling | `css` |
253
+ | MCP | `no` |
254
+ | Skills | `no` |
255
+
256
+ ## Examples
257
+
258
+ ### Create a React Grid Application
259
+
260
+ ```bash
261
+ sf new my-react-app --framework react --build-tool vite --type ts --template grid --theme material3 --styling css
262
+ ```
263
+
264
+ ### Create a React Next.js Chart Application
265
+
266
+ ```bash
267
+ sf new my-next-app --framework react --build-tool nextjs --type ts --template chart --theme fluent2 --styling scss
268
+ ```
269
+
270
+ ### Create an Angular Scheduler Application
271
+
272
+ ```bash
273
+ sf new my-angular-app --framework angular --type ts --template scheduler --theme bootstrap5.3 --styling css
274
+ ```
275
+
276
+ ### Create a Vue Chart Application
277
+
278
+ ```bash
279
+ sf new my-vue-app --framework vue --type ts --template chart --theme tailwind3 --styling scss
280
+ ```
281
+
282
+ ## Support
283
+
284
+ Product support is available through following mediums.
285
+
286
+ * [Support ticket](https://support.syncfusion.com/support/tickets/create) - Guaranteed Response in 24 hours | Unlimited tickets | Holiday support
287
+ * [Community forum](https://www.syncfusion.com/forums/essential-js2?utm_source=npm&utm_medium=listing&utm_campaign=javascript-button-npm)
288
+ * [GitHub issues](https://github.com/syncfusion/ej2-javascript-ui-controls/issues/new)
289
+ * [Request feature or report bug](https://www.syncfusion.com/feedback/javascript?utm_source=npm&utm_medium=listing&utm_campaign=javascript-button-npm)
290
+ * Live chat
291
+
292
+ ## License and copyright
293
+
294
+ > This is a commercial product and requires a paid license for possession or use. Syncfusion<sup>®</sup> licensed software, including this component, is subject to the terms and conditions of Syncfusion<sup>®</sup> [EULA](https://www.syncfusion.com/eula/es/). To acquire a license for 140+ [JavaScript UI controls](https://www.syncfusion.com/javascript-ui-controls), you can [purchase](https://www.syncfusion.com/sales/products) or [start a free 30-day trial](https://www.syncfusion.com/account/manage-trials/start-trials).
295
+
296
+ > A [free community license](https://www.syncfusion.com/products/communitylicense) is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
297
+
298
+ See [LICENSE FILE](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/license?utm_source=npm&utm_campaign=button) for more info.
299
+
300
+ &copy; Copyright 2026 Syncfusion<sup>®</sup> Inc. All Rights Reserved. The Syncfusion<sup>®</sup> Essential Studio<sup>®</sup> license and copyright applies to this distribution.