typescript model
This commit is contained in:
1
TelosysTools/templates/infinimotion/angular/.npmrc.vm
Normal file
1
TelosysTools/templates/infinimotion/angular/.npmrc.vm
Normal file
@@ -0,0 +1 @@
|
||||
@InfiniMotion:registry=https://npm.pkg.github.com
|
||||
6
TelosysTools/templates/infinimotion/angular/Xmodel_ts.vm
Normal file
6
TelosysTools/templates/infinimotion/angular/Xmodel_ts.vm
Normal file
@@ -0,0 +1,6 @@
|
||||
#set( $env.language = 'TypeScript' )
|
||||
export default interface $entity.name {
|
||||
#foreach( $attribute in $entity.attributes )
|
||||
${attribute.name}: ${attribute.type};
|
||||
#end
|
||||
}
|
||||
9
TelosysTools/templates/infinimotion/angular/index_ts.vm
Normal file
9
TelosysTools/templates/infinimotion/angular/index_ts.vm
Normal file
@@ -0,0 +1,9 @@
|
||||
#foreach( $entity in $model.allEntities )
|
||||
import $entity.name from "./${entity.name}";
|
||||
#end
|
||||
|
||||
export type {
|
||||
#foreach( $entity in $model.allEntities )
|
||||
$entity.name,
|
||||
#end
|
||||
}
|
||||
27
TelosysTools/templates/infinimotion/angular/package_json.vm
Normal file
27
TelosysTools/templates/infinimotion/angular/package_json.vm
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@InfiniMotion/model-frontend",
|
||||
"version": "0.0.0",
|
||||
"description": "InfiniMotion Model for Frontend",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Lennart Heinrich",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.8.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"repository": "https://github.com/InfiniMotion/model.git",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
44
TelosysTools/templates/infinimotion/angular/tsconfig_json.vm
Normal file
44
TelosysTools/templates/infinimotion/angular/tsconfig_json.vm
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
// Visit https://aka.ms/tsconfig to read more about this file
|
||||
"compilerOptions": {
|
||||
// File Layout
|
||||
// "rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
|
||||
// Environment Settings
|
||||
// See also https://aka.ms/tsconfig/module
|
||||
"module": "nodenext",
|
||||
"target": "esnext",
|
||||
"types": ["node"],
|
||||
// For nodejs:
|
||||
// "lib": ["esnext"],
|
||||
// "types": ["node"],
|
||||
// and npm install -D @types/node
|
||||
|
||||
// Other Outputs
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
|
||||
// Stricter Typechecking Options
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
|
||||
// Style Options
|
||||
// "noImplicitReturns": true,
|
||||
// "noImplicitOverride": true,
|
||||
// "noUnusedLocals": true,
|
||||
// "noUnusedParameters": true,
|
||||
// "noFallthroughCasesInSwitch": true,
|
||||
// "noPropertyAccessFromIndexSignature": true,
|
||||
|
||||
// Recommended Options
|
||||
"strict": true,
|
||||
"jsx": "react-jsx",
|
||||
"verbatimModuleSyntax": false,
|
||||
"isolatedModules": true,
|
||||
"noUncheckedSideEffectImports": true,
|
||||
"moduleDetection": "force",
|
||||
"skipLibCheck": true,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { defineConfig } from "tsup";
|
||||
|
||||
export default defineConfig({
|
||||
entry: ["index.ts"],
|
||||
format: ["cjs", "esm"], // Build for commonJS and ESmodules
|
||||
dts: true, // Generate declaration file (.d.ts)
|
||||
splitting: false,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
});
|
||||
@@ -31,4 +31,12 @@ Tests : generic class ; JpaTest.java ; ${TEST_SRC}/${ROOT_PKG}/enti
|
||||
Tests : database init ; DatabaseInit.java ; ${TEST_SRC}/${ROOT_PKG}/entities/tooling ; test-java/DatabaseInit_java.vm ; 1
|
||||
Tests : entity tests ; ${BEANNAME}JpaTest.java ; ${TEST_SRC}/${ROOT_PKG}/entities ; test-java/XxxJpaTest_java.vm ; *
|
||||
#--- src/test/resources
|
||||
Tests : persistence.xml ; persistence.xml ; ${TEST_RES}/META-INF ; test-resources/persistence_xml.vm ; 1
|
||||
Tests : persistence.xml ; persistence.xml ; ${TEST_RES}/META-INF ; test-resources/persistence_xml.vm ; 1
|
||||
|
||||
# Angular
|
||||
.npmrc ; .npmrc ; angular ; angular/.npmrc.vm ; 1
|
||||
package.json ; package.json ; angular ; angular/package_json.vm ; 1
|
||||
tsconfig.json ; tsconfig.json ; angular ; angular/tsconfig_json.vm ; 1
|
||||
tsup.config.ts ; tsup.config.ts ; angular ; angular/tsup.config_ts.vm ; 1
|
||||
index.ts ; index.ts ; angular ; angular/index_ts.vm ; 1
|
||||
TypeScript Models ; ${BEANNAME}.ts ; angular ; angular/Xmodel_ts.vm
|
||||
Reference in New Issue
Block a user