Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 3d8c35f

Browse files
committed
feat: add BS5 support for ng add
1 parent 47bdfe9 commit 3d8c35f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

schematics/src/ng-add/models/style-options.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export enum ADTStyleOptions {
22
DT="dt",
33
BS3="bs3",
44
BS4="bs4",
5+
BS5="bs5",
56
}
67

78
export const ADT_SUPPORTED_STYLES = [
@@ -34,4 +35,14 @@ export const ADT_SUPPORTED_STYLES = [
3435
{ path: 'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.min.js', target: 'scripts', fancyName: 'DataTables.net Bootstrap 4 JS' },
3536
]
3637
},
38+
{
39+
style: ADTStyleOptions.BS5,
40+
packageJson: [
41+
{ version: '^1.11.3', name: 'datatables.net-bs5', isDev: false },
42+
],
43+
angularJson: [
44+
{ path: 'node_modules/datatables.net-bs5/css/dataTables.bootstrap5.min.css', target: 'styles', fancyName: 'DataTables.net Bootstrap 5 CSS' },
45+
{ path: 'node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js', target: 'scripts', fancyName: 'DataTables.net Bootstrap 5 JS' },
46+
]
47+
},
3748
]

schematics/src/ng-add/schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"description": "The styling library to use for Datatables.",
1717
"type": "string",
1818
"default": "dt",
19-
"enum": ["dt", "bs3", "bs4"],
19+
"enum": ["dt", "bs3", "bs4", "bs5"],
2020
"x-prompt": {
2121
"message": "Which styling library would you like to use for DataTables?",
2222
"type": "list",
@@ -29,6 +29,10 @@
2929
{
3030
"value": "bs4",
3131
"label": "Bootstrap 4"
32+
},
33+
{
34+
"value": "bs5",
35+
"label": "Bootstrap 5"
3236
}
3337
]
3438
}

0 commit comments

Comments
 (0)