typescript configuration
This commit is contained in:
parent
b8515c222a
commit
aea4314d82
3
.gitignore
vendored
3
.gitignore
vendored
@ -179,4 +179,5 @@ local.properties
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
/simulator/www/simulator.js
|
||||
*.js.map
|
||||
|
3
simulator/build.sh
Executable file
3
simulator/build.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
cd src
|
||||
../node_modules/typescript/bin/tsc
|
14
simulator/package-lock.json
generated
Normal file
14
simulator/package-lock.json
generated
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "simulator",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"typescript": {
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz",
|
||||
"integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
}
|
21
simulator/package.json
Normal file
21
simulator/package.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "simulator",
|
||||
"version": "1.0.0",
|
||||
"description": "Vehicle energy consumption and production simulator",
|
||||
"main": "index.js",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [
|
||||
"vehicle",
|
||||
"energy",
|
||||
"simulator",
|
||||
"simulation"
|
||||
],
|
||||
"author": "vhelio",
|
||||
"license": "ISC"
|
||||
}
|
3
simulator/src/test.ts
Normal file
3
simulator/src/test.ts
Normal file
@ -0,0 +1,3 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.getElementById('test').innerText = "Hello world!";
|
||||
});
|
11
simulator/src/tsconfig.json
Normal file
11
simulator/src/tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"noImplicitAny": true,
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"outFile": "../www/simulator.js",
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["./**/*"]
|
||||
}
|
7
simulator/www/simulator.html
Normal file
7
simulator/www/simulator.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p id="test"></p>
|
||||
|
||||
<script type="text/javascript" src="simulator.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user