Skip to content

Commit 1ca365e

Browse files
Merge template changes from devextreme-examples-template
2 parents daef0b8 + be29bb4 commit 1ca365e

File tree

13 files changed

+239
-79
lines changed

13 files changed

+239
-79
lines changed

ASP.NET Core/Readme.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
# ASP.NET Core
1+
# ASP.NET Core DevExtreme Example
22

33
## Installation
44

5-
Download the example and use Visual Studio 2019 to open the project.
5+
Download the example and use Visual Studio 2022 (or later) or Visual Studio Code to open the project. This project targets .NET 8.0.
66

77
## Client-side resources and bundling
88

9+
<<<<<<< HEAD
910
This project uses [NPM](https://www.npmjs.com/) and [Gulp.js](https://gulpjs.com/) to install client-side libraries. The project restores NPM packages before the first build. Then, Gulp bundles required scripts and CSS files into the resulting package during the first and every next build.
11+
=======
12+
This project uses [NPM](https://www.npmjs.com/) and [Gulp.js](https://gulpjs.com/) to install client-side libraries. The project restores NPM packages before the first build. Then, Gulp bundles required scripts and CSS files into the resulting package during the first and every next build.
13+
14+
The project includes:
15+
- DevExtreme 24.2.3
16+
- DevExtreme.AspNet.Core 24.2.*
17+
- DevExtreme.AspNet.Data 5.*
18+
- jQuery 3.7.1
19+
- Bootstrap 5.3.3
20+
>>>>>>> template/25.1.2+
1021
1122
The resulted bundles will be located in the `wwwroot` folder:
1223
* `css/vendor.css` - a file with all CSS styles.
@@ -19,11 +30,11 @@ The default bundle includes jQuery, Bootstrap, and DevExtreme.
1930

2031
The main logic is located in the the `gulpfile.js` file at the root application level. The file contains two tasks:
2132

22-
* the `add-resouces` task
33+
* the `add-resources` task
2334

24-
* copies JavaScript files located in the `scripts` array and adds them to `vendor.js`. The script bundle is moved to `wwwroot\scripts`.
25-
* copies CSS styles located in the `styles` array and merges them into the `styles.css` bundle. Then, this bundle is moved to `wwwroot\styles`
26-
* copies DevExtreme `fonts` and `icons` folders from NPM to `wwwroot\styles`
35+
* copies JavaScript files located in the `scripts` array and adds them to `vendor.js`. The script bundle is moved to `wwwroot\js`.
36+
* copies CSS styles located in the `styles` array and merges them into the `vendor.css` bundle. Then, this bundle is moved to `wwwroot\css`
37+
* copies DevExtreme `fonts` and `icons` folders from NPM to `wwwroot\css`
2738

2839
* the `clean` task removes all previously created files (`vendor.js` and `vendor.css`) and folders (`icons` and `fonts`)
2940

@@ -37,13 +48,32 @@ If you need to include more features, you can uncomment one of the following sec
3748

3849
## Code
3950

40-
Take a look at the following files of this example to see the required code:
51+
Take a look at the following files of this example to see the required code:
52+
53+
**Controllers:**
54+
- `Controllers/HomeController.cs` - Main controller with Index action
55+
- `Controllers/SampleDataController.cs` - API controller for sample data
56+
57+
**Models:**
58+
- `Models/SampleData.cs` - Sample data model
59+
- `Models/SampleOrder.cs` - Sample order model
60+
61+
**Views:**
62+
- `Views/Home/Index.cshtml` - Main page with DevExtreme components
63+
- `Views/Shared/_Layout.cshtml` - Layout template
64+
- `Views/_ViewImports.cshtml` - Global imports
65+
- `Views/_ViewStart.cshtml` - View start configuration
4166

42-
A list of files goes here
67+
**Configuration:**
68+
- `Program.cs` - Application entry point
69+
- `Startup.cs` - Service configuration
70+
- `gulpfile.js` - Build automation
71+
- `package.json` - NPM dependencies
72+
- `ASP.NET Core.csproj` - Project file
4373

4474
## Development server
4575

46-
Use the Visual Studio `Run (F5)` command to run the project.
76+
Use the Visual Studio `Run (F5)` command or `dotnet run` command to run the project. The application will be available at `https://localhost:5001` (HTTPS) or `http://localhost:5000` (HTTP).
4777

4878
## Further help
4979

@@ -53,6 +83,6 @@ The client-side API is based on jQuery [jQuery documentation](https://api.jquery
5383
* [Call Methods](https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Call_Methods)
5484
* [Get a UI Component Instance](https://js.devexpress.com/DevExtreme/Guide/jQuery_Components/Component_Configuration_Syntax/#Get_a_UI_Component_Instance)
5585

56-
To get more help on DevExtreme submit an issue in the [Support Center](https://www.devexpress.com/Support/Center/Question/Create)
86+
To get more help on DevExtreme submit an issue in the [Support Center](https://supportcenter.devexpress.com/ticket/create)
5787

5888

ASP.NET Core/package-lock.json

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASP.NET Core/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"private": true,
55
"dependencies": {
66
"jquery": "3.7.1",
7+
<<<<<<< HEAD
78
"file-saver": "2.0.5",
9+
=======
10+
>>>>>>> template/25.1.2+
811
"devextreme-dist": "^24.2.3",
912
"devextreme-aspnet-data": "^5.0.0",
1013
"bootstrap": "^5.3.3"

Angular/README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
1-
# AngularTest
1+
# Angular DevExtreme Example
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.1.3.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.4 and includes DevExtreme Angular components version 24.2.3.
44

55
## Development server
66

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
7+
Run `npm start` or `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
88

99
## Code scaffolding
1010

1111
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
1212

1313
## Build
1414

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
15+
Run `npm run build` or `ng build` to build the project. The build artifacts will be stored in the `dist/Angular/` directory.
1616

1717
## Running unit tests
1818

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
19+
Run `npm test` or `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Linting
22+
23+
Run `npm run lint` to execute linting checks for TypeScript, CSS/SCSS, and HTML formatting.
24+
- `npm run lint-ts` - ESLint for TypeScript files
25+
- `npm run lint-css` - Stylelint for CSS/SCSS files
26+
- `npm run lint-html` - Prettier for HTML formatting
2027

2128
## Running end-to-end tests
2229

2330
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
2431

2532
## Further help
2633

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://v17.angular.io/cli) page.
28-
To get more help on DevExtreme submit an issue on [GitHub](https://github.com/DevExpress/devextreme/issues) or [Support Center](https://www.devexpress.com/Support/Center/Question/Create)
34+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
35+
To get more help on DevExtreme submit an issue on [GitHub](https://github.com/DevExpress/devextreme/issues) or [Support Center](https://supportcenter.devexpress.com/ticket/create)

React/README.md

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,78 @@
1-
# React + TypeScript + Vite
1+
# React + TypeScript + Vite + DevExtreme
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
This template provides a minimal setup to get React working in Vite with HMR, ESLint rules, and DevExtreme components.
4+
5+
This project includes:
6+
- React 18.2.0
7+
- TypeScript 5.8.2
8+
- Vite for fast development and building
9+
- DevExtreme React 24.2.3
10+
- Vitest for testing
11+
- ESLint and Stylelint for code quality
412

513
Currently, two official plugins are available:
614

715
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
816
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
917

18+
## Getting Started
19+
20+
### Installation
21+
22+
```bash
23+
npm install
24+
```
25+
26+
### Development
27+
28+
Start the development server:
29+
```bash
30+
npm run dev
31+
```
32+
33+
The application will be available at `http://localhost:5173/`
34+
35+
### Building
36+
37+
Build the project for production:
38+
```bash
39+
npm run build
40+
```
41+
42+
### Testing
43+
44+
Run tests:
45+
```bash
46+
npm test
47+
npm run test:watch # Run tests in watch mode
48+
```
49+
50+
### Linting
51+
52+
Run linting checks:
53+
```bash
54+
npm run lint # Run all linting checks
55+
npm run lint-ts # ESLint for TypeScript files
56+
npm run lint-css # Stylelint for CSS files
57+
```
58+
59+
## Code Structure
60+
61+
**Source Files:**
62+
- `src/App.tsx` - Main React component with DevExtreme Button example
63+
- `src/App.test.tsx` - Tests for the main component
64+
- `src/main.tsx` - Application entry point
65+
- `src/App.css` - Component styles
66+
- `src/index.css` - Global styles
67+
- `src/setupTests.ts` - Test setup configuration
68+
- `src/vite-env.d.ts` - Vite environment type definitions
69+
70+
**Configuration Files:**
71+
- `vite.config.ts` - Vite configuration
72+
- `package.json` - Dependencies and scripts
73+
- `tsconfig.json` - TypeScript configuration
74+
- `vitest.config.ts` - Vitest testing configuration
75+
1076
## Expanding the ESLint configuration
1177

1278
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
@@ -55,6 +121,8 @@ export default tseslint.config({
55121

56122
## Further help
57123

58-
You can learn more about React in the [React documentation](https://18.react.dev/learn).
124+
You can learn more about React in the [React documentation](https://react.dev/learn).
125+
You can learn more about Vite in the [Vite documentation](https://vite.dev/).
126+
You can learn more about DevExtreme React components in the [DevExtreme React documentation](https://js.devexpress.com/React/).
59127

60-
To get more help on DevExtreme submit an issue in the [Support Center](https://www.devexpress.com/Support/Center/Question/Create)
128+
To get more help on DevExtreme submit an issue in the [Support Center](https://supportcenter.devexpress.com/ticket/create)

React/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"build": "tsc -b && vite build",
99
"test": "vitest",
1010
"test:watch": "vitest --watch",
11-
"lint-js": "eslint .",
11+
"lint-ts": "eslint .",
1212
"lint-css": "stylelint src/**/*.css --allow-empty-input",
13-
"lint": "npm-run-all -p -c lint-js lint-css",
13+
"lint": "npm-run-all -p -c lint-ts lint-css",
1414
"preview": "vite preview"
1515
},
1616

React/public/index.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)