Skip to content

Commit df1b293

Browse files
committed
chore(cellnav): add support for typescript
1 parent fc29bb4 commit df1b293

File tree

6 files changed

+120
-3
lines changed

6 files changed

+120
-3
lines changed

package-lock.json

+90-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@
108108
"shelljs": "^0.8.2",
109109
"text-loader": "^0.0.1",
110110
"time-grunt": "^1.4.0",
111+
"ts-loader": "^9.5.1",
112+
"typescript": "^5.4.5",
111113
"validate-commit-message": "^3.0.1",
112114
"webdriver-manager": "^12.1.7",
113115
"webpack": "^5.74.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export const FEATURE_NAME = 'gridCellNav';
2+
export const CELL_NAV_EVENT = 'cellNav';
3+
export const direction = {LEFT: 0, RIGHT: 1, UP: 2, DOWN: 3, PG_UP: 4, PG_DOWN: 5};
4+
export const EVENT_TYPE = {
5+
KEYDOWN: 0,
6+
CLICK: 1,
7+
CLEAR: 2
8+
};

packages/cellnav/tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["./**/*.ts"]
4+
}

tsconfig.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "./dist/",
4+
"noImplicitAny": true,
5+
"module": "es6",
6+
"target": "es5",
7+
"allowJs": true,
8+
"moduleResolution": "node"
9+
},
10+
"include": ["./packages/**/*.ts"]
11+
}

webpack.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ module.exports = {
1414
},
1515
module: {
1616
rules: [
17+
{
18+
test: /\.ts?$/,
19+
use: 'ts-loader',
20+
exclude: /node_modules/,
21+
},
1722
{
1823
test: /\.html$/i,
1924
include,

0 commit comments

Comments
 (0)