{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"skipLibCheck": true,
"lib": [ "es2015.promise", "es2015", "dom" ]
},
"include": [
"Scripts/**/*.ts"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
} |
const path = require('path');
const webpack = require('webpack');
const ROOT = path.resolve(__dirname, 'Scripts');
const DESTINATION = path.resolve(__dirname, 'wwwroot/js');
module.exports = {
context: ROOT,
entry: {
'index': './grid.js'
},
output: {
filename: '[name].bundle.js',
path: DESTINATION
}
}; |
{
"name": "razor",
"version": "1.0.0",
"description": "",
"private": true,
"main": "grid.js",
"scripts": {
"build": "webpack --config webpack.config.js"
},
"devDependencies": {
"@syncfusion/ej2-calendars": "16.3.21",
"@syncfusion/ej2-grids": "16.4.46",
"source-map-loader": "0.1.6",
"webpack": "2.2.1",
"webpack-cli": "^3.0.2",
"ts-loader": "^2.3.4",
"typescript": "^2.4.2"
}
} |
...
let data: Object = new DataManager(orderData as JSON[]).executeLocal(new Query().take(15));
let grid: Grid = new Grid(
{
...
created: created
});
grid.appendTo('#Grid');
function created() {
document.getElementById('Grid').addEventListener("click", function () {
alert("you clicked grid...");
})
} |